test
This commit is contained in:
24
src/komodo.h
24
src/komodo.h
@@ -37,7 +37,6 @@ struct knotaries_entry { int32_t height,numnotaries; struct knotary_entry *Notar
|
||||
struct notarized_checkpoint { uint256 notarized_hash,notarized_btctxid; int32_t nHeight,notarized_height; } *NPOINTS; int32_t NUM_NPOINTS;
|
||||
|
||||
int32_t komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotaries,uint8_t notaryid,uint256 txhash,uint64_t voutmask,uint8_t numvouts);
|
||||
uint32_t komodo_txtime(uint256 hash);
|
||||
// add opreturn funcid
|
||||
// pricefeeds
|
||||
|
||||
@@ -247,6 +246,29 @@ int32_t komodo_threshold(int32_t height,uint64_t signedmask)
|
||||
else return(0);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
void komodo_nutxoadd(int32_t addflag,int32_t height,int32_t notaryid,uint256 txhash,uint64_t voutmask,int32_t numvouts)
|
||||
{
|
||||
struct nutxo_entry *np;
|
||||
|
||||
Reference in New Issue
Block a user