aboutsummaryrefslogtreecommitdiff
path: root/src/txorphanage.h
diff options
context:
space:
mode:
authordergoegge <n.goeggi@gmail.com>2023-07-19 15:56:37 +0200
committerdergoegge <n.goeggi@gmail.com>2023-10-12 11:56:37 +0100
commit940a49978c70453e1aaf2c4a0bcb382872b844a5 (patch)
tree9cf2a48ae6fd7e9951d8f9175e7cbd450adc05bc /src/txorphanage.h
parented70e6501648466b9ca91a39b83775363e9a726d (diff)
downloadbitcoin-940a49978c70453e1aaf2c4a0bcb382872b844a5.tar.xz
Use type-safe txid types in orphanage
Diffstat (limited to 'src/txorphanage.h')
-rw-r--r--src/txorphanage.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/txorphanage.h b/src/txorphanage.h
index a4705bf382..2196ed4c85 100644
--- a/src/txorphanage.h
+++ b/src/txorphanage.h
@@ -34,7 +34,7 @@ public:
CTransactionRef GetTxToReconsider(NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(!m_mutex);
/** Erase an orphan by txid */
- int EraseTx(const uint256& txid) EXCLUSIVE_LOCKS_REQUIRED(!m_mutex);
+ int EraseTx(const Txid& txid) EXCLUSIVE_LOCKS_REQUIRED(!m_mutex);
/** Erase all orphans announced by a peer (eg, after that peer disconnects) */
void EraseForPeer(NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(!m_mutex);
@@ -71,10 +71,10 @@ protected:
/** Map from txid to orphan transaction record. Limited by
* -maxorphantx/DEFAULT_MAX_ORPHAN_TRANSACTIONS */
- std::map<uint256, OrphanTx> m_orphans GUARDED_BY(m_mutex);
+ std::map<Txid, OrphanTx> m_orphans GUARDED_BY(m_mutex);
/** Which peer provided the orphans that need to be reconsidered */
- std::map<NodeId, std::set<uint256>> m_peer_work_set GUARDED_BY(m_mutex);
+ std::map<NodeId, std::set<Txid>> m_peer_work_set GUARDED_BY(m_mutex);
using OrphanMap = decltype(m_orphans);
@@ -96,10 +96,10 @@ protected:
/** Index from wtxid into the m_orphans to lookup orphan
* transactions using their witness ids. */
- std::map<uint256, OrphanMap::iterator> m_wtxid_to_orphan_it GUARDED_BY(m_mutex);
+ std::map<Wtxid, OrphanMap::iterator> m_wtxid_to_orphan_it GUARDED_BY(m_mutex);
/** Erase an orphan by txid */
- int EraseTxNoLock(const uint256& txid) EXCLUSIVE_LOCKS_REQUIRED(m_mutex);
+ int EraseTxNoLock(const Txid& txid) EXCLUSIVE_LOCKS_REQUIRED(m_mutex);
};
#endif // BITCOIN_TXORPHANAGE_H