Test
This commit is contained in:
@@ -325,7 +325,7 @@ bool ProcessAssets(Eval* eval, std::vector<uint8_t> paramsNull,const CTransactio
|
|||||||
static uint256 zero,prevtxid;
|
static uint256 zero,prevtxid;
|
||||||
CTransaction createTx; uint256 txid,assetid,assetid2,hashBlock; uint8_t funcid; int32_t i,n; uint64_t amount; std::vector<uint8_t> origpubkey;
|
CTransaction createTx; uint256 txid,assetid,assetid2,hashBlock; uint8_t funcid; int32_t i,n; uint64_t amount; std::vector<uint8_t> origpubkey;
|
||||||
txid = ctx.GetHash();
|
txid = ctx.GetHash();
|
||||||
//if ( txid == prevtxid )
|
if ( txid == prevtxid )
|
||||||
return(true);
|
return(true);
|
||||||
fprintf(stderr,"ProcessAssets\n");
|
fprintf(stderr,"ProcessAssets\n");
|
||||||
if ( paramsNull.size() != 0 ) // Don't expect params
|
if ( paramsNull.size() != 0 ) // Don't expect params
|
||||||
@@ -338,6 +338,7 @@ bool ProcessAssets(Eval* eval, std::vector<uint8_t> paramsNull,const CTransactio
|
|||||||
return eval->Invalid("cant find asset create txid");
|
return eval->Invalid("cant find asset create txid");
|
||||||
if ( assetid2 != zero && eval->GetTxUnconfirmed(assetid2,createTx,hashBlock) == 0 )
|
if ( assetid2 != zero && eval->GetTxUnconfirmed(assetid2,createTx,hashBlock) == 0 )
|
||||||
return eval->Invalid("cant find asset2 create txid");
|
return eval->Invalid("cant find asset2 create txid");
|
||||||
|
return(true);
|
||||||
if ( AssetValidate(eval,ctx,n,funcid,assetid,assetid2,amount,origpubkey) != 0 )
|
if ( AssetValidate(eval,ctx,n,funcid,assetid,assetid2,amount,origpubkey) != 0 )
|
||||||
{
|
{
|
||||||
prevtxid = txid;
|
prevtxid = txid;
|
||||||
|
|||||||
@@ -94,14 +94,13 @@ UniValue getinfo(const UniValue& params, bool fHelp)
|
|||||||
//#ifdef ENABLE_WALLET
|
//#ifdef ENABLE_WALLET
|
||||||
// LOCK2(cs_main, pwalletMain ? &pwalletMain->cs_wallet : NULL);
|
// LOCK2(cs_main, pwalletMain ? &pwalletMain->cs_wallet : NULL);
|
||||||
//#else
|
//#else
|
||||||
fprintf(stderr,"in getinfo %u\n",(uint32_t)time(NULL));
|
|
||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
proxyType proxy;
|
proxyType proxy;
|
||||||
GetProxy(NET_IPV4, proxy);
|
GetProxy(NET_IPV4, proxy);
|
||||||
notarized_height = komodo_notarized_height(&prevMoMheight,¬arized_hash,¬arized_desttxid);
|
notarized_height = komodo_notarized_height(&prevMoMheight,¬arized_hash,¬arized_desttxid);
|
||||||
fprintf(stderr,"after notarized_height %u\n",(uint32_t)time(NULL));
|
//fprintf(stderr,"after notarized_height %u\n",(uint32_t)time(NULL));
|
||||||
|
|
||||||
UniValue obj(UniValue::VOBJ);
|
UniValue obj(UniValue::VOBJ);
|
||||||
obj.push_back(Pair("version", CLIENT_VERSION));
|
obj.push_back(Pair("version", CLIENT_VERSION));
|
||||||
@@ -112,14 +111,13 @@ UniValue getinfo(const UniValue& params, bool fHelp)
|
|||||||
obj.push_back(Pair("notarizedhash", notarized_hash.ToString()));
|
obj.push_back(Pair("notarizedhash", notarized_hash.ToString()));
|
||||||
obj.push_back(Pair("notarizedtxid", notarized_desttxid.ToString()));
|
obj.push_back(Pair("notarizedtxid", notarized_desttxid.ToString()));
|
||||||
txid_height = notarizedtxid_height(ASSETCHAINS_SYMBOL[0] != 0 ? (char *)"KMD" : (char *)"BTC",(char *)notarized_desttxid.ToString().c_str(),&kmdnotarized_height);
|
txid_height = notarizedtxid_height(ASSETCHAINS_SYMBOL[0] != 0 ? (char *)"KMD" : (char *)"BTC",(char *)notarized_desttxid.ToString().c_str(),&kmdnotarized_height);
|
||||||
fprintf(stderr,"after notarizedtxid_height %u\n",(uint32_t)time(NULL));
|
|
||||||
if ( txid_height > 0 )
|
if ( txid_height > 0 )
|
||||||
obj.push_back(Pair("notarizedtxid_height", txid_height));
|
obj.push_back(Pair("notarizedtxid_height", txid_height));
|
||||||
else obj.push_back(Pair("notarizedtxid_height", "mempool"));
|
else obj.push_back(Pair("notarizedtxid_height", "mempool"));
|
||||||
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
||||||
obj.push_back(Pair("KMDnotarized_height", kmdnotarized_height));
|
obj.push_back(Pair("KMDnotarized_height", kmdnotarized_height));
|
||||||
obj.push_back(Pair("notarized_confirms", txid_height < kmdnotarized_height ? (kmdnotarized_height - txid_height + 1) : 0));
|
obj.push_back(Pair("notarized_confirms", txid_height < kmdnotarized_height ? (kmdnotarized_height - txid_height + 1) : 0));
|
||||||
fprintf(stderr,"after notarized_confirms %u\n",(uint32_t)time(NULL));
|
//fprintf(stderr,"after notarized_confirms %u\n",(uint32_t)time(NULL));
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
if (pwalletMain) {
|
if (pwalletMain) {
|
||||||
obj.push_back(Pair("walletversion", pwalletMain->GetVersion()));
|
obj.push_back(Pair("walletversion", pwalletMain->GetVersion()));
|
||||||
@@ -128,11 +126,11 @@ UniValue getinfo(const UniValue& params, bool fHelp)
|
|||||||
obj.push_back(Pair("interest", ValueFromAmount(KOMODO_INTERESTSUM))); //komodo_interestsum()
|
obj.push_back(Pair("interest", ValueFromAmount(KOMODO_INTERESTSUM))); //komodo_interestsum()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
fprintf(stderr,"after wallet %u\n",(uint32_t)time(NULL));
|
//fprintf(stderr,"after wallet %u\n",(uint32_t)time(NULL));
|
||||||
obj.push_back(Pair("blocks", (int)chainActive.Height()));
|
obj.push_back(Pair("blocks", (int)chainActive.Height()));
|
||||||
if ( (longestchain= KOMODO_LONGESTCHAIN) != 0 && chainActive.Height() > longestchain )
|
if ( (longestchain= KOMODO_LONGESTCHAIN) != 0 && chainActive.Height() > longestchain )
|
||||||
longestchain = chainActive.Height();
|
longestchain = chainActive.Height();
|
||||||
fprintf(stderr,"after longestchain %u\n",(uint32_t)time(NULL));
|
//fprintf(stderr,"after longestchain %u\n",(uint32_t)time(NULL));
|
||||||
obj.push_back(Pair("longestchain", longestchain));
|
obj.push_back(Pair("longestchain", longestchain));
|
||||||
obj.push_back(Pair("timeoffset", GetTimeOffset()));
|
obj.push_back(Pair("timeoffset", GetTimeOffset()));
|
||||||
if ( chainActive.LastTip() != 0 )
|
if ( chainActive.LastTip() != 0 )
|
||||||
|
|||||||
Reference in New Issue
Block a user