routing: deep copy any transaciton we obtain from GetBlock call.
This commit is contained in:
11 files changed
+20
-16
No files matched your search
@@ -1168,10 +1168,12 @@ func testListTransactionDetails(miner *rpctest.Harness,
|
||||
t.Fatalf("err fetching block: %s", err)
|
||||
}
|
||||
|
||||
transactions :=
|
||||
make(map[chainhash.Hash][]*wire.TxOut, len(fetchedBlock.Transactions))
|
||||
transactions := make(
|
||||
map[chainhash.Hash][]*wire.TxOut,
|
||||
len(fetchedBlock.Transactions),
|
||||
)
|
||||
for _, tx := range fetchedBlock.Transactions {
|
||||
transactions[tx.TxHash()] = tx.TxOut
|
||||
transactions[tx.TxHash()] = tx.Copy().TxOut
|
||||
}
|
||||
|
||||
blockTxOuts[fetchedBlock.BlockHash()] = transactions
|
||||
|
||||
Reference in new issue
Block a user