b3887af7c6
Duplicate-shreds handler is using a nested hash-map for the incomplete chunks buffered. This is resulting in a convoluted logic to limit the number of entries: https://github.com/solana-labs/solana/blob/427bd6264/gossip/src/duplicate_shred_handler.rs#L62 This commit instead uses a flat buffer mapping (Slot, Pubkey) pairs to the respective duplicate shreds chunks. The buffer is allowed to grow to twice the intended capacity, at which point the extraneous entries are removed in linear time, resulting an amortized O(1) performance. |
||
---|---|---|
.. | ||
benches | ||
src | ||
tests | ||
.gitignore | ||
Cargo.toml | ||
build.rs |