Billion at a time

This commit is contained in:
jl777
2019-03-02 02:55:51 -11:00
parent 0c03bfd48e
commit 16efbff11a
3 changed files with 16 additions and 5 deletions

View File

@@ -1808,7 +1808,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
CAmount nValueOut = tx.GetValueOut();
CAmount nFees = nValueIn-nValueOut;
double dPriority = view.GetPriority(tx, chainActive.Height());
if ( KOMODO_BIT63SET(nValueOut) != 0 )
if ( KOMODO_VALUETOOBIG(nValueOut) != 0 )
return state.DoS(100, error("AcceptToMemoryPool: GetValueOut too big"),REJECT_INVALID,"tx valueout is too big");
// Keep track of transactions that spend a coinbase, which we re-scan
@@ -3494,11 +3494,11 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
txdata.emplace_back(tx);
valueout = tx.GetValueOut();
if ( KOMODO_BIT63SET(valueout) != 0 )
if ( KOMODO_VALUETOOBIG(valueout) != 0 )
return state.DoS(100, error("ConnectBlock(): GetValueOut too big"),REJECT_INVALID,"tx valueout is too big");
prevsum = voutsum;
voutsum += valueout;
if ( KOMODO_BIT63SET(voutsum) != 0 )
if ( KOMODO_VALUETOOBIG(voutsum) != 0 )
{
fprintf(stderr,"voutsum %.8f too big\n",(double)voutsum/COIN);
return state.DoS(100, error("ConnectBlock(): voutsum too big"),REJECT_INVALID,"tx valueout is too big");