mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-14 01:27:24 +02:00
txgraph: pass fallback_order to TxGraph (preparation)
This adds an std::function<strong_ordering(Ref&,Ref&)> argument to the MakeTxGraph function, which can be used by the caller (e.g., mempool code) to provide a fallback order to TxGraph. This is just preparation; TxGraph does not yet use this fallback order for anything.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <uint256.h>
|
||||
#include <util/types.h>
|
||||
|
||||
#include <compare>
|
||||
#include <cstddef>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
@@ -42,7 +43,7 @@ public:
|
||||
template <typename Other>
|
||||
bool operator==(const Other& other) const { return Compare(other) == 0; }
|
||||
template <typename Other>
|
||||
bool operator<(const Other& other) const { return Compare(other) < 0; }
|
||||
std::strong_ordering operator<=>(const Other& other) const { return Compare(other) <=> 0; }
|
||||
|
||||
const uint256& ToUint256() const LIFETIMEBOUND { return m_wrapped; }
|
||||
static transaction_identifier FromUint256(const uint256& id) { return {id}; }
|
||||
|
||||
Reference in New Issue
Block a user