16 return GetTx()->Equals(*
_tx.GetTx(), {.include_script_sig = false, .include_witness_data = false});
64 throw std::ios_base::failure(
"Unable to write wtxvariant record");
91 throw std::ios_base::failure(
"Unable to write tx record");
#define Assert(val)
Identity function.
#define Assume(val)
Assume is the identity function.
Interface giving clients (wallet processes, maybe other analysis tools in the future) ability to acce...
virtual bool findBlock(const uint256 &hash, const FoundBlock &block={})=0
Return whether node has the block and optionally return block metadata or contents.
Helper for findBlock to selectively return pieces of block data.
A transaction with a bunch of additional info that only the owner cares about.
bool Update(CTransactionRef tx, const TxState &new_state, WalletBatch &batch, bool metadata_changed)
const Txid & GetHash() const LIFETIMEBOUND
std::map< Wtxid, CTransactionRef > m_txs
void updateState(interfaces::Chain &chain)
Update transaction state when attaching to a chain, filling in heights of conflicted and confirmed bl...
unsigned int nTimeReceived
time received by this node
int64_t GetTxTime() const
CTransactionRef GetTx() const
bool IsMalleation(const CWalletTx &tx) const
True if tx is a malleation of this, i.e.
void RecomputeCanonical()
Set m_canonical_wtxid to the best variant under the unconfirmed rule (witnessed preferred,...
unsigned int nTimeSmart
Stable timestamp that never changes, and reflects the order a transaction was added to the wallet.
Access to the wallet database.
bool WriteTxMetadata(const CWalletTx &wtx)
bool WriteWtxVariant(const Txid &txid, const CTransactionRef &tx)
static int32_t GetTransactionWeight(const CTransaction &tx)
std::variant< TxStateConfirmed, TxStateInMempool, TxStateBlockConflicted, TxStateInactive, TxStateUnrecognized > TxState
All possible CWalletTx states.
static int TxStateSerializedIndex(const TxState &state)
Get TxState serialized block index. Inverse of TxStateInterpretSerialized.
static uint256 TxStateSerializedBlockHash(const TxState &state)
Get TxState serialized block hash. Inverse of TxStateInterpretSerialized.
std::shared_ptr< const CTransaction > CTransactionRef
State of transaction not confirmed or conflicting with a known block and not in the mempool.
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.