aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.h
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-10-07 03:26:08 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-10-07 03:26:08 +0200
commit65aaf9495d19ea3fb875228a7e14aab6c1f2986d (patch)
tree22156b2599b7f0ac67fe8e5c84c17bbb13f2fa51 /src/txmempool.h
parent9947ce62626c05bd186ae8a4864aa382f673ec1a (diff)
downloadbitcoin-65aaf9495d19ea3fb875228a7e14aab6c1f2986d.tar.xz
refactor: move `update_*` structs from txmempool.h to .cpp file
These helpers are exclusively used in txmempool.cpp, hence they should also be moved there. Can be reviewed with "--color-moved=dimmed-zebra".
Diffstat (limited to 'src/txmempool.h')
-rw-r--r--src/txmempool.h52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/txmempool.h b/src/txmempool.h
index 0be51db181..273d5d281f 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -159,58 +159,6 @@ public:
mutable Epoch::Marker m_epoch_marker; //!< epoch when last touched, useful for graph algorithms
};
-// Helpers for modifying CTxMemPool::mapTx, which is a boost multi_index.
-struct update_descendant_state
-{
- update_descendant_state(int64_t _modifySize, CAmount _modifyFee, int64_t _modifyCount) :
- modifySize(_modifySize), modifyFee(_modifyFee), modifyCount(_modifyCount)
- {}
-
- void operator() (CTxMemPoolEntry &e)
- { e.UpdateDescendantState(modifySize, modifyFee, modifyCount); }
-
- private:
- int64_t modifySize;
- CAmount modifyFee;
- int64_t modifyCount;
-};
-
-struct update_ancestor_state
-{
- update_ancestor_state(int64_t _modifySize, CAmount _modifyFee, int64_t _modifyCount, int64_t _modifySigOpsCost) :
- modifySize(_modifySize), modifyFee(_modifyFee), modifyCount(_modifyCount), modifySigOpsCost(_modifySigOpsCost)
- {}
-
- void operator() (CTxMemPoolEntry &e)
- { e.UpdateAncestorState(modifySize, modifyFee, modifyCount, modifySigOpsCost); }
-
- private:
- int64_t modifySize;
- CAmount modifyFee;
- int64_t modifyCount;
- int64_t modifySigOpsCost;
-};
-
-struct update_fee_delta
-{
- explicit update_fee_delta(int64_t _feeDelta) : feeDelta(_feeDelta) { }
-
- void operator() (CTxMemPoolEntry &e) { e.UpdateFeeDelta(feeDelta); }
-
-private:
- int64_t feeDelta;
-};
-
-struct update_lock_points
-{
- explicit update_lock_points(const LockPoints& _lp) : lp(_lp) { }
-
- void operator() (CTxMemPoolEntry &e) { e.UpdateLockPoints(lp); }
-
-private:
- const LockPoints& lp;
-};
-
// extracts a transaction hash from CTxMemPoolEntry or CTransactionRef
struct mempoolentry_txid
{