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;
|
static const uint256 zeroid;
|
||||||
bool myGetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock);
|
bool myGetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock);
|
||||||
int32_t is_hexstr(char *str,int32_t n);
|
int32_t is_hexstr(char *str,int32_t n);
|
||||||
|
bool myAddtomempool(CTransaction &tx);
|
||||||
|
|
||||||
// CCcustom
|
// CCcustom
|
||||||
CPubKey GetUnspendable(struct CCcontract_info *cp,uint8_t *unspendablepriv);
|
CPubKey GetUnspendable(struct CCcontract_info *cp,uint8_t *unspendablepriv);
|
||||||
|
|||||||
@@ -126,12 +126,7 @@ void *dicefinish(void *_ptr)
|
|||||||
if ( DecodeHexTx(tx,res) != 0 )
|
if ( DecodeHexTx(tx,res) != 0 )
|
||||||
{
|
{
|
||||||
txid = tx.GetHash();
|
txid = tx.GetHash();
|
||||||
if ( mempool.exists(tx) == 0 )
|
myAddtomempool(tx);
|
||||||
{
|
|
||||||
CValidationState state;
|
|
||||||
bool fMissingInputs,fOverrideFees = false;
|
|
||||||
AcceptToMemoryPool(mempool, state, tx, false, &fMissingInputs, !fOverrideFees);
|
|
||||||
}
|
|
||||||
RelayTransaction(tx);
|
RelayTransaction(tx);
|
||||||
fprintf(stderr,"%s\nresult.(%s)\n",res.c_str(),uint256_str(str,txid));
|
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;
|
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)
|
bool myGetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock)
|
||||||
{
|
{
|
||||||
// need a GetTransaction without lock so the validation code for assets can run without deadlock
|
// need a GetTransaction without lock so the validation code for assets can run without deadlock
|
||||||
|
|||||||
Reference in New Issue
Block a user