Closed yyforyongyu closed 1 year ago
Unfortunately the optimization doesn't work based pprof, will investigate more.
Replaced by #877 which focuses on removing the redundant Add
. I don't think the maps in mempool
can be optimized more, given most of the inputs don't share the same tx hash, and most spending txes are consuming inputs from different parent txes. Plus the space overhead of using nested maps, my pprof says it actually takes more space.
Depends on #872, this PR removes a redundant
Add(tx)
for bitcoind ZMQ events, and optimized the memory usage of mempool based on the fact that, multiple inputs may share the same tx hash that leaves room for optimization.