From 1c48dae76fc808bf7154aca976e7303364c56509 Mon Sep 17 00:00:00 2001 From: MacroFake Date: Tue, 18 Oct 2022 17:32:44 +0200 Subject: [PATCH] test: Use C++11 member initializers for TestMemPoolEntryHelper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Aurèle Oulès --- src/test/util/txmempool.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/test/util/txmempool.h b/src/test/util/txmempool.h index 8c4f3a35812..70b9ed88dba 100644 --- a/src/test/util/txmempool.h +++ b/src/test/util/txmempool.h @@ -16,17 +16,13 @@ CTxMemPool::Options MemPoolOptionsForTest(const node::NodeContext& node); struct TestMemPoolEntryHelper { // Default values - CAmount nFee; - int64_t nTime; - unsigned int nHeight; - bool spendsCoinbase; - unsigned int sigOpCost; + CAmount nFee{0}; + int64_t nTime{0}; + unsigned int nHeight{1}; + bool spendsCoinbase{false}; + unsigned int sigOpCost{4}; LockPoints lp; - TestMemPoolEntryHelper() : - nFee(0), nTime(0), nHeight(1), - spendsCoinbase(false), sigOpCost(4) { } - CTxMemPoolEntry FromTx(const CMutableTransaction& tx) const; CTxMemPoolEntry FromTx(const CTransactionRef& tx) const;