@@ -37,19 +37,16 @@ extern RecursiveMutex cs_main;
37
37
/* * Fake height value used in Coin to signify they are only in the memory pool (since 0.8) */
38
38
static const uint32_t MEMPOOL_HEIGHT = 0x7FFFFFFF ;
39
39
40
- struct LockPoints
41
- {
40
+ struct LockPoints {
42
41
// Will be set to the blockchain height and median time past
43
42
// values that would be necessary to satisfy all relative locktime
44
43
// constraints (BIP68) of this tx given our view of block chain history
45
- int height;
46
- int64_t time;
44
+ int height{ 0 } ;
45
+ int64_t time{ 0 } ;
47
46
// As long as the current chain descends from the highest height block
48
47
// containing one of the inputs used in the calculation, then the cached
49
48
// values are still valid even after a reorg.
50
- CBlockIndex* maxInputBlock;
51
-
52
- LockPoints () : height(0 ), time(0 ), maxInputBlock(nullptr ) { }
49
+ CBlockIndex* maxInputBlock{nullptr };
53
50
};
54
51
55
52
struct CompareIteratorByHash {
@@ -98,27 +95,27 @@ class CTxMemPoolEntry
98
95
const unsigned int entryHeight; // !< Chain height when entering the mempool
99
96
const bool spendsCoinbase; // !< keep track of transactions that spend a coinbase
100
97
const int64_t sigOpCost; // !< Total sigop cost
101
- int64_t feeDelta; // !< Used for determining the priority of the transaction for mining in a block
98
+ int64_t feeDelta{ 0 }; // !< Used for determining the priority of the transaction for mining in a block
102
99
LockPoints lockPoints; // !< Track the height and time at which tx was final
103
100
104
101
// Information about descendants of this transaction that are in the
105
102
// mempool; if we remove this transaction we must remove all of these
106
103
// descendants as well.
107
- uint64_t nCountWithDescendants; // !< number of descendant transactions
104
+ uint64_t nCountWithDescendants{ 1 }; // !< number of descendant transactions
108
105
uint64_t nSizeWithDescendants; // !< ... and size
109
106
CAmount nModFeesWithDescendants; // !< ... and total fees (all including us)
110
107
111
108
// Analogous statistics for ancestor transactions
112
- uint64_t nCountWithAncestors;
109
+ uint64_t nCountWithAncestors{ 1 } ;
113
110
uint64_t nSizeWithAncestors;
114
111
CAmount nModFeesWithAncestors;
115
112
int64_t nSigOpCostWithAncestors;
116
113
117
114
public:
118
- CTxMemPoolEntry (const CTransactionRef& _tx, const CAmount& _nFee ,
119
- int64_t _nTime , unsigned int _entryHeight ,
120
- bool spendsCoinbase ,
121
- int64_t nSigOpsCost , LockPoints lp);
115
+ CTxMemPoolEntry (const CTransactionRef& tx, CAmount fee ,
116
+ int64_t time , unsigned int entry_height ,
117
+ bool spends_coinbase ,
118
+ int64_t sigops_cost , LockPoints lp);
122
119
123
120
const CTransaction& GetTx () const { return *this ->tx ; }
124
121
CTransactionRef GetSharedTx () const { return this ->tx ; }
0 commit comments