routing: deep copy any transaciton we obtain from GetBlock call.

This commit is contained in:
Mohamed Awnallah committed 2024-01-15 11:35:55 +02:00
1 parent 2f04ce7c6e
commit 99908ed2dc
11 files changed
+20 -16

No files matched your search

+1 -1
View File
@@ -264,7 +264,7 @@ func (b *BitcoindFilteredChainView) chainFilterer() {
continue
}
filteredTxns = append(filteredTxns, tx)
filteredTxns = append(filteredTxns, tx.Copy())
txAlreadyFiltered = true
}
}
+1 -1
View File
@@ -283,7 +283,7 @@ func (b *BtcdFilteredChainView) chainFilterer() {
continue
}
filteredTxns = append(filteredTxns, tx)
filteredTxns = append(filteredTxns, tx.Copy())
txAlreadyFiltered = true
}
+1 -1
View File
@@ -296,7 +296,7 @@ func (c *CfFilteredChainView) FilterBlock(blockHash *chainhash.Hash) (*FilteredB
if ok {
filteredBlock.Transactions = append(
filteredBlock.Transactions,
tx.MsgTx(),
tx.MsgTx().Copy(),
)
c.filterMtx.Lock()