From 5f60266446ad4c334b18dcccf3b638ca8d06d87b Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 12 Jul 2019 03:29:06 -1100 Subject: [PATCH] Fix tokeninfo --- src/cc/CCtokens.cpp | 6 +++--- src/cc/CCtx.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/cc/CCtokens.cpp b/src/cc/CCtokens.cpp index 5da6e97c8..39daede80 100644 --- a/src/cc/CCtokens.cpp +++ b/src/cc/CCtokens.cpp @@ -870,11 +870,11 @@ std::string TokenTransfer(int64_t txfee, uint256 tokenid, vscript_t destpubkey, if (txfee == 0) txfee = 10000; mypk = pubkey2pk(Mypubkey()); - if ( cp->tokens1of2addr[0] == 0 ) + /*if ( cp->tokens1of2addr[0] == 0 ) { GetTokensCCaddress(cp, cp->tokens1of2addr, mypk); fprintf(stderr,"set tokens1of2addr <- %s\n",cp->tokens1of2addr); - } + }*/ if (AddNormalinputs(mtx, mypk, txfee, 3) > 0) { mask = ~((1LL << mtx.vin.size()) - 1); // seems, mask is not used anymore @@ -957,7 +957,7 @@ UniValue TokenInfo(uint256 tokenid) result.push_back(Pair("error", "cant find tokenid")); return(result); } - if (hashBlock.IsNull()) { + if ( KOMODO_NSPV == 0 && hashBlock.IsNull()) { result.push_back(Pair("result", "error")); result.push_back(Pair("error", "the transaction is still in mempool")); return(result); diff --git a/src/cc/CCtx.cpp b/src/cc/CCtx.cpp index 84f876fb3..ab21cdc3b 100644 --- a/src/cc/CCtx.cpp +++ b/src/cc/CCtx.cpp @@ -279,12 +279,12 @@ fprintf(stderr,"FinalizeCCTx() matched %s cp->tokens1of2addr!\n", cp->tokens1of2 } } uint256 sighash = SignatureHash(CCPubKey(cond), mtx, i, SIGHASH_ALL,utxovalues[i],consensusBranchId, &txdata); + int32_t z; + for (z=0; z<32; z++) + fprintf(stderr,"%02x",((uint8_t *)sighash.begin())[z]); + fprintf(stderr," sighash [%d] %.8f %x\n",i,(double)utxovalues[i]/COIN,consensusBranchId); if ( cc_signTreeSecp256k1Msg32(cond,privkey,sighash.begin()) != 0 ) { - //int32_t z; - //for (z=0; z<32; z++) - // fprintf(stderr,"%02x",((uint8_t *)sighash.begin())[z]); - //fprintf(stderr," sighash [%d] %.8f %x\n",i,(double)utxovalues[i]/COIN,consensusBranchId); //for (z=0; z<32; z++) // fprintf(stderr,"%02x",privkey[z]); //fprintf(stderr," signed with privkey\n");