This commit is contained in:
jl777
2016-10-18 19:00:22 -03:00
parent 5fbcb13099
commit 651989c73c
3 changed files with 22 additions and 15 deletions

View File

@@ -460,6 +460,18 @@ Value gettxout(const Array& params, bool fHelp)
return ret;
}
char *komodo_gettxout(bits256 hash,int32_t n)
{
CCoins coins; CBlockIndex *pindex;
if ( pcoinsTip->GetCoins(hash,coins) == 0 )
return(0);
if ( n < 0 || (unsigned int)n >= coins.vout.size() || coins.vout[n].IsNull() )
return(0);
BlockMap::iterator it = mapBlockIndex.find(pcoinsTip->GetBestBlock());
pindex = it->second;
return(coins.vout[n].scriptPubKey.ToString().c_str());
}
Value verifychain(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 2)