From a372168e77a8a195613a02983f2589252698bf0f Mon Sep 17 00:00:00 2001 From: Mark Friedenbach Date: Tue, 22 Apr 2014 15:46:19 -0700 Subject: Use a typedef for monetary values --- src/txmempool.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/txmempool.h') diff --git a/src/txmempool.h b/src/txmempool.h index b9d50ee0bc..c35ea52d4e 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -29,7 +29,7 @@ class CTxMemPoolEntry { private: CTransaction tx; - int64_t nFee; // Cached to avoid expensive parent-transaction lookups + CAmount nFee; // Cached to avoid expensive parent-transaction lookups size_t nTxSize; // ... and avoid recomputing tx size size_t nModSize; // ... and modified size for priority int64_t nTime; // Local time when entering the mempool @@ -37,14 +37,14 @@ private: unsigned int nHeight; // Chain height when entering the mempool public: - CTxMemPoolEntry(const CTransaction& _tx, int64_t _nFee, + CTxMemPoolEntry(const CTransaction& _tx, const CAmount& _nFee, int64_t _nTime, double _dPriority, unsigned int _nHeight); CTxMemPoolEntry(); CTxMemPoolEntry(const CTxMemPoolEntry& other); const CTransaction& GetTx() const { return this->tx; } double GetPriority(unsigned int currentHeight) const; - int64_t GetFee() const { return nFee; } + CAmount GetFee() const { return nFee; } size_t GetTxSize() const { return nTxSize; } int64_t GetTime() const { return nTime; } unsigned int GetHeight() const { return nHeight; } @@ -76,7 +76,7 @@ public: mutable CCriticalSection cs; std::map mapTx; std::map mapNextTx; - std::map > mapDeltas; + std::map > mapDeltas; CTxMemPool(const CFeeRate& _minRelayFee); ~CTxMemPool(); @@ -102,8 +102,8 @@ public: void AddTransactionsUpdated(unsigned int n); /** Affect CreateNewBlock prioritisation of transactions */ - void PrioritiseTransaction(const uint256 hash, const std::string strHash, double dPriorityDelta, int64_t nFeeDelta); - void ApplyDeltas(const uint256 hash, double &dPriorityDelta, int64_t &nFeeDelta); + void PrioritiseTransaction(const uint256 hash, const std::string strHash, double dPriorityDelta, const CAmount& nFeeDelta); + void ApplyDeltas(const uint256 hash, double &dPriorityDelta, CAmount &nFeeDelta); void ClearPrioritisation(const uint256 hash); unsigned long size() -- cgit v1.2.3