mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
Merge bitcoin/bitcoin#28385: [refactor] rewrite DisconnectedBlockTransactions to not use boost
4313c77400make DisconnectedBlockTransactions responsible for its own memory management (glozow)cf5f1faa03MOVEONLY: DisconnectedBlockTransactions to its own file (glozow)2765d6f343rewrite DisconnectedBlockTransactions as a list + map (glozow)79ce9f0aa4add std::list to memusage (glozow)59a35a7398[bench] DisconnectedBlockTransactions (glozow)925bb723ca[refactor] batch-add transactions to DisconnectedBlockTransactions (glozow) Pull request description: Motivation - I think it's preferable to use stdlib data structures instead of depending on boost if we can achieve the same thing. - Also see #28335 for further context/motivation. This PR simplifies that one. Things done in this PR: - Add a bench for `DisconnectedBlockTransactions` where we reorg and the new chain has {100%, 90%, 10%} of the same transactions. AFAIU in practice, it's usually close to 100%. - Rewrite `DisconnectedBlockTransactions` as a `std::list` + `unordered_map` instead of a boost multi index container. - On my machine, the bench suggests the performance is very similar. - Move `DisconnectedBlockTransactions` from txmempool.h to its own kernel/disconnected_transactions.h. This struct isn't used by txmempool and doesn't have much to do with txmempool. My guess is that it's been living there for convenience since the boost includes are there. ACKs for top commit: ismaelsadeeq: Tested ACK4313c77400stickies-v: ACK4313c77400TheCharlatan: ACK4313c77400Tree-SHA512: 273c80866bf3acd39b2a039dc082b7719d2d82e0940e1eb6c402f1c0992e997256722b85c7e310c9811238a770cfbdeb122ea4babbc23835d17128f214a1ef9e
This commit is contained in:
@@ -50,7 +50,7 @@ class Chainstate;
|
||||
class CTxMemPool;
|
||||
class ChainstateManager;
|
||||
struct ChainTxData;
|
||||
struct DisconnectedBlockTransactions;
|
||||
class DisconnectedBlockTransactions;
|
||||
struct PrecomputedTransactionData;
|
||||
struct LockPoints;
|
||||
struct AssumeutxoData;
|
||||
|
||||
Reference in New Issue
Block a user