This commit is contained in:
jl777
2016-10-21 16:44:49 -03:00
parent 2fe65b37f5
commit 8a9bc02778
5 changed files with 31 additions and 25 deletions

View File

@@ -383,28 +383,7 @@ const CScript &CCoinsViewCache::GetSpendFor(const CTxIn& input) const
return coins->vout[input.prevout.n].scriptPubKey;
}
uint32_t komodo_txtime(uint256 hash)
{
CTransaction tx;
uint256 hashBlock;
if (!GetTransaction(hash, tx, hashBlock, true))
{
//printf("null GetTransaction\n");
return(tx.nLockTime);
}
if (!hashBlock.IsNull()) {
BlockMap::iterator mi = mapBlockIndex.find(hashBlock);
if (mi != mapBlockIndex.end() && (*mi).second)
{
CBlockIndex* pindex = (*mi).second;
if (chainActive.Contains(pindex))
return(pindex->GetBlockTime());
}
//printf("cant find in iterator\n");
}
//printf("null hashBlock\n");
return(tx.nLockTime);
}
uint32_t komodo_txtime(uint256 hash);
CAmount CCoinsViewCache::GetValueIn(const CTransaction& tx,uint32_t blocktime) const
{