mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Merge #12949: tests: Avoid copies of CTransaction
fae58eca93 tests: Avoid copies of CTransaction (MarcoFalke)
Pull request description:
Avoid the copy (or move) constructor of `CTransaction` in test code, whereever a simple reference can be used instead.
Tree-SHA512: 8ef2077a277d6182996f4671722fdc01a90909ae7431c1e52604aab8ed028910615028caf9b4cb07a9b15fdc04939dea2209cc3189dde7d38271256d9fe1076c
This commit is contained in:
commit
6b46288a08
10 changed files with 39 additions and 35 deletions
|
|
@ -48,7 +48,7 @@ BOOST_FIXTURE_TEST_CASE(tx_mempool_block_doublespend, TestChain100Setup)
|
|||
{
|
||||
spends[i].nVersion = 1;
|
||||
spends[i].vin.resize(1);
|
||||
spends[i].vin[0].prevout.hash = coinbaseTxns[0].GetHash();
|
||||
spends[i].vin[0].prevout.hash = m_coinbase_txns[0]->GetHash();
|
||||
spends[i].vin[0].prevout.n = 0;
|
||||
spends[i].vout.resize(1);
|
||||
spends[i].vout[0].nValue = 11*CENT;
|
||||
|
|
@ -167,7 +167,7 @@ BOOST_FIXTURE_TEST_CASE(checkinputs_test, TestChain100Setup)
|
|||
|
||||
spend_tx.nVersion = 1;
|
||||
spend_tx.vin.resize(1);
|
||||
spend_tx.vin[0].prevout.hash = coinbaseTxns[0].GetHash();
|
||||
spend_tx.vin[0].prevout.hash = m_coinbase_txns[0]->GetHash();
|
||||
spend_tx.vin[0].prevout.n = 0;
|
||||
spend_tx.vout.resize(4);
|
||||
spend_tx.vout[0].nValue = 11*CENT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue