cap txfee at 5% in absurd

This commit is contained in:
jl777
2017-02-04 16:19:23 +02:00
parent 057d9ad834
commit f4cb12ab28

View File

@@ -1082,8 +1082,6 @@ CAmount GetMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowF
bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,bool* pfMissingInputs, bool fRejectAbsurdFee)
{
AssertLockHeld(cs_main);
if ( KOMODO_EXCHANGEWALLET != 0 )
fRejectAbsurdFee = false;
if (pfMissingInputs)
*pfMissingInputs = false;
auto verifier = libzcash::ProofVerifier::Strict();
@@ -1271,7 +1269,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
dFreeCount += nSize;
}
if (fRejectAbsurdFee && nFees > ::minRelayTxFee.GetFee(nSize) * 10000 && nFees > COIN )
if (fRejectAbsurdFee && nFees > ::minRelayTxFee.GetFee(nSize) * 10000 && nFees > nValueOut/20 )
{
fprintf(stderr,"accept failure.8\n");
return error("AcceptToMemoryPool: absurdly high fees %s, %d > %d",hash.ToString(), nFees, ::minRelayTxFee.GetFee(nSize) * 10000);