test: Use C++11 member initializers for TestMemPoolEntryHelper

Co-authored-by: Aurèle Oulès <aurele@oules.com>
This commit is contained in:
MacroFake 2022-10-18 17:32:44 +02:00 committed by GitHub
parent fad7f2239c
commit 1c48dae76f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,17 +16,13 @@ CTxMemPool::Options MemPoolOptionsForTest(const node::NodeContext& node);
struct TestMemPoolEntryHelper struct TestMemPoolEntryHelper
{ {
// Default values // Default values
CAmount nFee; CAmount nFee{0};
int64_t nTime; int64_t nTime{0};
unsigned int nHeight; unsigned int nHeight{1};
bool spendsCoinbase; bool spendsCoinbase{false};
unsigned int sigOpCost; unsigned int sigOpCost{4};
LockPoints lp; LockPoints lp;
TestMemPoolEntryHelper() :
nFee(0), nTime(0), nHeight(1),
spendsCoinbase(false), sigOpCost(4) { }
CTxMemPoolEntry FromTx(const CMutableTransaction& tx) const; CTxMemPoolEntry FromTx(const CMutableTransaction& tx) const;
CTxMemPoolEntry FromTx(const CTransactionRef& tx) const; CTxMemPoolEntry FromTx(const CTransactionRef& tx) const;