This commit implements a new struct, cachedInputs, to provide faster lookup when removing inputs based on a given transaction. Instead of iterating all the inputs to decide whether they should be removed, we now cache txid -> inputs so we can update our local mempool faster by iterating much less data.
This commit implements a new struct,
cachedInputs
, to provide faster lookup when removing inputs based on a given transaction. Instead of iterating all the inputs to decide whether they should be removed, we now cachetxid -> inputs
so we can update our local mempool faster by iterating much less data.