myGettxout

This commit is contained in:
jl777
2018-08-02 00:04:29 -11:00
parent b0a85aec3f
commit 1f9a4106c5
3 changed files with 16 additions and 1 deletions

View File

@@ -1603,6 +1603,19 @@ bool GetAddressUnspent(uint160 addressHash, int type,
return true;
}
uint64_t myGettxout(uint256 hash,int32_t n)
{
CCoins coins;
LOCK(cs_main);
LOCK(mempool.cs);
CCoinsViewMemPool view(pcoinsTip, mempool);
if (!view.GetCoins(hash, coins))
return(0);
if ( n<0 || (unsigned int)n>=coins.vout.size() || coins.vout[n].IsNull() )
return(0);
else return(coins.vout[n].nValue);
}
bool myAddtomempool(CTransaction &tx)
{
CValidationState state; CTransaction Ltx; bool fMissingInputs,fOverrideFees = false;