-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
sig/src/shred_network/collector/duplicate_shred_handler.zig
Lines 289 to 305 in 52eaf1d
| pub fn serializeDuplicateProof( | |
| allocator: std.mem.Allocator, | |
| shred_payload: []const u8, | |
| other_payload: []const u8, | |
| ) ![]const u8 { | |
| // TODO validate the shreds. Implement check_shreds in Agave | |
| // https://github.com/Syndica/sig/issues/1225 | |
| const proof = sig.ledger.meta.DuplicateSlotProof{ | |
| .shred1 = shred_payload, | |
| .shred2 = other_payload, | |
| }; | |
| var proof_data: std.ArrayListUnmanaged(u8) = .empty; | |
| errdefer proof_data.deinit(allocator); | |
| try bincode.write(proof_data.writer(allocator), proof, bincode.Params.standard); | |
| const bytes = try proof_data.toOwnedSlice(allocator); | |
| return bytes; | |
| } |
This was added in #1172, which was a revival of an older PR. The intentions behind the TODO aren't totally clear, but this is being noted for verification at some point in case it's relevant.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status