test
This commit is contained in:
@@ -383,7 +383,6 @@ const CScript &CCoinsViewCache::GetSpendFor(const CTxIn& input) const
|
|||||||
return coins->vout[input.prevout.n].scriptPubKey;
|
return coins->vout[input.prevout.n].scriptPubKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t komodo_txtime(uint256 hash);
|
|
||||||
uint64_t komodo_interest(uint64_t nValue,uint32_t nLockTime,uint32_t tiptime);
|
uint64_t komodo_interest(uint64_t nValue,uint32_t nLockTime,uint32_t tiptime);
|
||||||
|
|
||||||
CAmount CCoinsViewCache::GetValueIn(int64_t *interestp,const CTransaction& tx,uint32_t tiptime) const
|
CAmount CCoinsViewCache::GetValueIn(int64_t *interestp,const CTransaction& tx,uint32_t tiptime) const
|
||||||
@@ -397,7 +396,7 @@ CAmount CCoinsViewCache::GetValueIn(int64_t *interestp,const CTransaction& tx,ui
|
|||||||
{
|
{
|
||||||
value = GetOutputFor(tx.vin[i]).nValue;
|
value = GetOutputFor(tx.vin[i]).nValue;
|
||||||
nResult += value;
|
nResult += value;
|
||||||
interest = komodo_interest(value,komodo_txtime(tx.vin[i].prevout.hash),tiptime);
|
interest = komodo_interest(value,tx.nLockTime,tiptime);
|
||||||
nResult += interest;
|
nResult += interest;
|
||||||
(*interestp) += interest;
|
(*interestp) += interest;
|
||||||
}
|
}
|
||||||
|
|||||||
11
src/komodo.h
11
src/komodo.h
@@ -257,17 +257,6 @@ uint32_t komodo_txtime(uint256 hash)
|
|||||||
//printf("null GetTransaction\n");
|
//printf("null GetTransaction\n");
|
||||||
return(tx.nLockTime);
|
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(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user