This commit is contained in:
jl777
2018-04-10 00:09:41 +03:00
parent 9465da966b
commit 8d584a9c91
3 changed files with 13 additions and 9 deletions

View File

@@ -557,11 +557,11 @@ uint64_t komodo_seed(int32_t height)
return(seed);
}
uint32_t komodo_txtime(uint64_t *valuep,uint256 hash,int32_t n)
uint32_t komodo_txtime(uint64_t *valuep,uint256 hash,int32_t n,char *address)
{
CTransaction tx;
uint256 hashBlock;
CTxDestination address; CTransaction tx; uint256 hashBlock;
*valuep = 0;
address[0] = 0;
if (!GetTransaction(hash, tx,
#ifndef KOMODO_ZCASH
Params().GetConsensus(),
@@ -573,7 +573,11 @@ uint32_t komodo_txtime(uint64_t *valuep,uint256 hash,int32_t n)
}
//fprintf(stderr,"%s/v%d locktime.%u\n",hash.ToString().c_str(),n,(uint32_t)tx.nLockTime);
if ( n < tx.vout.size() )
{
*valuep = tx.vout[n].nValue;
if (ExtractDestination(tx.scriptPubKey, address))
strcpy(address,CBitcoinAddress(address).ToString().c_str());
}
return(tx.nLockTime);
}