diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-04-17 13:25:34 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-04-17 13:28:12 -0400 |
commit | 6b46288a0853621bc911c26bb87bba22521059e7 (patch) | |
tree | 279c5ade6cebcfd997a480a072d860485dece10c /src/test/test_bitcoin.h | |
parent | a63b4e3493460a2cf5b7b3275a53140895cce529 (diff) | |
parent | fae58eca934b5c7165b589c3bec1751d1b432b48 (diff) | |
download | bitcoin-6b46288a0853621bc911c26bb87bba22521059e7.tar.xz |
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
Diffstat (limited to 'src/test/test_bitcoin.h')
-rw-r--r-- | src/test/test_bitcoin.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test_bitcoin.h b/src/test/test_bitcoin.h index 8136da3aa9..1f91eb622c 100644 --- a/src/test/test_bitcoin.h +++ b/src/test/test_bitcoin.h @@ -87,7 +87,7 @@ struct TestChain100Setup : public TestingSetup { ~TestChain100Setup(); - std::vector<CTransaction> coinbaseTxns; // For convenience, coinbase transactions + std::vector<CTransactionRef> m_coinbase_txns; // For convenience, coinbase transactions CKey coinbaseKey; // private/public key needed to spend coinbase transactions }; @@ -107,8 +107,8 @@ struct TestMemPoolEntryHelper nFee(0), nTime(0), nHeight(1), spendsCoinbase(false), sigOpCost(4) { } - CTxMemPoolEntry FromTx(const CMutableTransaction &tx); - CTxMemPoolEntry FromTx(const CTransaction &tx); + CTxMemPoolEntry FromTx(const CMutableTransaction& tx); + CTxMemPoolEntry FromTx(const CTransactionRef& tx); // Change the default value TestMemPoolEntryHelper &Fee(CAmount _fee) { nFee = _fee; return *this; } |