Check bettxid in mempool

This commit is contained in:
jl777
2018-11-06 21:38:36 -11:00
parent cd5fa72d42
commit 00f28499e9
3 changed files with 29 additions and 6 deletions

View File

@@ -378,6 +378,18 @@ bool myIsutxo_spentinmempool(uint256 txid,int32_t vout)
return(false);
}
bool mytxid_inmempool(uint256 txid)
{
BOOST_FOREACH(const CTxMemPoolEntry &e,mempool.mapTx)
{
const CTransaction &tx = e.GetTx();
const uint256 &hash = tx.GetHash();
if ( txid == hash )
return(true);
}
return(false);
}
UniValue mempoolToJSON(bool fVerbose = false)
{
if (fVerbose)