bool myAddtomempool(CTransaction &tx)
This commit is contained in:
@@ -52,6 +52,7 @@ bool GetAddressUnspent(uint160 addressHash, int type,std::vector<std::pair<CAddr
|
||||
static const uint256 zeroid;
|
||||
bool myGetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock);
|
||||
int32_t is_hexstr(char *str,int32_t n);
|
||||
bool myAddtomempool(CTransaction &tx);
|
||||
|
||||
// CCcustom
|
||||
CPubKey GetUnspendable(struct CCcontract_info *cp,uint8_t *unspendablepriv);
|
||||
|
||||
@@ -126,12 +126,7 @@ 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);
|
||||
}
|
||||
myAddtomempool(tx);
|
||||
RelayTransaction(tx);
|
||||
fprintf(stderr,"%s\nresult.(%s)\n",res.c_str(),uint256_str(str,txid));
|
||||
}
|
||||
|
||||
@@ -1603,6 +1603,14 @@ bool GetAddressUnspent(uint160 addressHash, int type,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool myAddtomempool(CTransaction &tx)
|
||||
{
|
||||
CValidationState state; bool fMissingInputs,fOverrideFees = false;
|
||||
if ( mempool.exists(tx) == 0 )
|
||||
return(AcceptToMemoryPool(mempool, state, tx, false, &fMissingInputs, !fOverrideFees));
|
||||
else return(false);
|
||||
}
|
||||
|
||||
bool myGetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock)
|
||||
{
|
||||
// need a GetTransaction without lock so the validation code for assets can run without deadlock
|
||||
|
||||
Reference in New Issue
Block a user