mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
node: Avoid potential UB by asserting assumptions
This commit is contained in:
parent
1dd8ed7a84
commit
88aead263c
2 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue