mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
node: Avoid potential UB by asserting assumptions
This commit is contained in:
@@ -38,6 +38,7 @@ TransactionError BroadcastTransaction(NodeContext& node, const CTransactionRef t
|
||||
bool callback_set = false;
|
||||
|
||||
{ // cs_main scope
|
||||
assert(node.chainman);
|
||||
LOCK(cs_main);
|
||||
assert(std::addressof(::ChainstateActive()) == std::addressof(node.chainman->ActiveChainstate()));
|
||||
// If the transaction is already confirmed in the chain, don't do anything
|
||||
|
||||
Reference in New Issue
Block a user