mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
Modify variable names for entry height and priority
This commit is contained in:
@@ -19,9 +19,9 @@
|
||||
using namespace std;
|
||||
|
||||
CTxMemPoolEntry::CTxMemPoolEntry(const CTransaction& _tx, const CAmount& _nFee,
|
||||
int64_t _nTime, double _dPriority,
|
||||
unsigned int _nHeight, bool poolHasNoInputsOf):
|
||||
tx(_tx), nFee(_nFee), nTime(_nTime), dPriority(_dPriority), nHeight(_nHeight),
|
||||
int64_t _nTime, double _entryPriority,
|
||||
unsigned int _entryHeight, bool poolHasNoInputsOf):
|
||||
tx(_tx), nFee(_nFee), nTime(_nTime), entryPriority(_entryPriority), entryHeight(_entryHeight),
|
||||
hadNoDependencies(poolHasNoInputsOf)
|
||||
{
|
||||
nTxSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION);
|
||||
@@ -42,8 +42,8 @@ double
|
||||
CTxMemPoolEntry::GetPriority(unsigned int currentHeight) const
|
||||
{
|
||||
CAmount nValueIn = tx.GetValueOut()+nFee;
|
||||
double deltaPriority = ((double)(currentHeight-nHeight)*nValueIn)/nModSize;
|
||||
double dResult = dPriority + deltaPriority;
|
||||
double deltaPriority = ((double)(currentHeight-entryHeight)*nValueIn)/nModSize;
|
||||
double dResult = entryPriority + deltaPriority;
|
||||
return dResult;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user