Fix mempool bug where fees are mis-calculated when fSkipExpiry is used
This commit is contained in:
@@ -1950,12 +1950,13 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
|
|||||||
}
|
}
|
||||||
|
|
||||||
CAmount nValueOut = tx.GetValueOut();
|
CAmount nValueOut = tx.GetValueOut();
|
||||||
CAmount nFees = nValueIn-nValueOut;
|
double dPriority = 0;
|
||||||
double dPriority = 0;
|
CAmount nFees = 0;
|
||||||
|
|
||||||
if (!fSkipExpiry)
|
if (!fSkipExpiry)
|
||||||
{
|
{
|
||||||
dPriority = view.GetPriority(tx, chainActive.Height());
|
dPriority = view.GetPriority(tx, chainActive.Height());
|
||||||
nFees = 0;
|
nFees = nValueIn-nValueOut;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( nValueOut > 777777*COIN && KOMODO_VALUETOOBIG(nValueOut - 777777*COIN) != 0 ) // some room for blockreward and txfees
|
if ( nValueOut > 777777*COIN && KOMODO_VALUETOOBIG(nValueOut - 777777*COIN) != 0 ) // some room for blockreward and txfees
|
||||||
@@ -1973,7 +1974,6 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//fprintf(stderr,"addmempool 5\n");
|
|
||||||
|
|
||||||
// Grab the branch ID we expect this transaction to commit to. We don't
|
// Grab the branch ID we expect this transaction to commit to. We don't
|
||||||
// yet know if it does, but if the entry gets added to the mempool, then
|
// yet know if it does, but if the entry gets added to the mempool, then
|
||||||
|
|||||||
Reference in New Issue
Block a user