diff options
author | Suhas Daftuar <sdaftuar@gmail.com> | 2020-01-30 09:35:00 -0500 |
---|---|---|
committer | Suhas Daftuar <sdaftuar@gmail.com> | 2020-07-19 02:05:29 -0400 |
commit | ac88e2eb619821ad7ae1d45d4b40be69051d3999 (patch) | |
tree | 41670146c75c72c3923056642609093a15d8857a /src/node/transaction.cpp | |
parent | 8e68fc246d09f1e6c6dfa8c676969d97c2eb4334 (diff) | |
download | bitcoin-ac88e2eb619821ad7ae1d45d4b40be69051d3999.tar.xz |
Add support for tx-relay via wtxid
This adds a field to CNodeState that tracks whether to relay transactions with
that peer via wtxid, instead of txid. As of this commit the field will always
be false, but in a later commit we will add a way to negotiate turning this on
via p2p messages exchanged with the peer.
Diffstat (limited to 'src/node/transaction.cpp')
-rw-r--r-- | src/node/transaction.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node/transaction.cpp b/src/node/transaction.cpp index a571e3b02a..5633abe817 100644 --- a/src/node/transaction.cpp +++ b/src/node/transaction.cpp @@ -82,7 +82,8 @@ TransactionError BroadcastTransaction(NodeContext& node, const CTransactionRef t // best-effort of initial broadcast node.mempool->AddUnbroadcastTx(hashTx, tx->GetWitnessHash()); - RelayTransaction(hashTx, *node.connman); + LOCK(cs_main); + RelayTransaction(hashTx, tx->GetWitnessHash(), *node.connman); } return TransactionError::OK; |