Skip to content

Commit

Permalink
Remove old commented code, adjust comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
InKryption committed Nov 6, 2024
1 parent 6ec0ecd commit 2d5918e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/accountsdb/db.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4211,9 +4211,6 @@ test "generate snapshot & update gossip snapshot hashes" {
const queue_item_0 = queue.items[0]; // should be from the full generation
const queue_item_1 = queue.items[1]; // should be from the incremental generation

// try std.testing.expect(try queue_item_0.verify(Pubkey.fromPublicKey(&my_keypair.public_key)));
// try std.testing.expect(try queue_item_1.verify(Pubkey.fromPublicKey(&my_keypair.public_key)));

try std.testing.expectEqual(.SnapshotHashes, std.meta.activeTag(queue_item_0));
try std.testing.expectEqual(.SnapshotHashes, std.meta.activeTag(queue_item_1));

Expand All @@ -4224,7 +4221,7 @@ test "generate snapshot & update gossip snapshot hashes" {
.from = Pubkey.fromPublicKey(&my_keypair.public_key),
.full = .{ .slot = full_slot, .hash = full_hash },
.incremental = SnapshotHashes.IncrementalSnapshotsList.EMPTY,
.wallclock = queue_item_0.SnapshotHashes.wallclock,
.wallclock = 0, // set to zero when pushed to the queue, because it would be set in `drainPushQueueToGossipTable`.
},
queue_item_0.SnapshotHashes,
);
Expand All @@ -4233,7 +4230,7 @@ test "generate snapshot & update gossip snapshot hashes" {
.from = Pubkey.fromPublicKey(&my_keypair.public_key),
.full = .{ .slot = full_slot, .hash = full_hash },
.incremental = SnapshotHashes.IncrementalSnapshotsList.initSingle(.{ .slot = inc_slot, .hash = inc_hash }),
.wallclock = queue_item_1.SnapshotHashes.wallclock,
.wallclock = 0, // set to zero when pushed to the queue, because it would be set in `drainPushQueueToGossipTable`.
},
queue_item_1.SnapshotHashes,
);
Expand Down

0 comments on commit 2d5918e

Please sign in to comment.