Merge pull request #1303 from jl777/jl777

Fix mempool acceptance bug
This commit is contained in:
jl777
2019-03-02 05:45:44 -11:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -2944,7 +2944,7 @@ int32_t dilithium_Qmsghash(uint8_t *msg,CTransaction tx,std::vector<uint256> vou
for (i=0; i<numvouts-1; i++)
vouts.push_back(tx.vout[i]);
data << E_MARSHAL(ss << vintxids << vinprevns << vouts << voutpubtxids);
fprintf(stderr,"size of data.%d\n",(int32_t)data.size());
//fprintf(stderr,"size of data.%d\n",(int32_t)data.size());
hash = Hash(data.begin(),data.end());
memcpy(msg,&hash,sizeof(hash));
return(0);

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_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
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