Add autofill to mempool

This commit is contained in:
jl777
2018-08-01 04:20:21 -11:00
parent 65ec050833
commit 4d332fc027
2 changed files with 7 additions and 1 deletions

View File

@@ -126,6 +126,12 @@ void *dicefinish(void *_ptr)
if ( DecodeHexTx(tx,res) != 0 )
{
txid = tx.GetHash();
if ( mempool.exists(tx) == 0 )
{
CValidationState state;
bool fMissingInputs,fOverrideFees = false;
AcceptToMemoryPool(mempool, state, tx, false, &fMissingInputs, !fOverrideFees);
}
RelayTransaction(tx);
fprintf(stderr,"%s\nresult.(%s)\n",res.c_str(),uint256_str(str,txid));
}

View File

@@ -1137,7 +1137,7 @@ UniValue sendrawtransaction(const UniValue& params, bool fHelp)
}
} else if (fHaveChain) {
throw JSONRPCError(RPC_TRANSACTION_ALREADY_IN_CHAIN, "transaction already in block chain");
}
}
RelayTransaction(tx);
return hashTx.GetHex();