From 665d5446d122f5a0cfba61d251d4fb87b69f9c33 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Thu, 6 Dec 2018 12:54:01 +0800 Subject: [PATCH] debug prints --- src/miner.cpp | 10 +++++++--- src/wallet/rpcwallet.cpp | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index fe9fff5bc..e8b1c211d 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -760,23 +760,27 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey, int32_t nHeight, } else if ( USE_EXTERNAL_PUBKEY != 0 ) { - //fprintf(stderr,"use notary pubkey\n"); + fprintf(stderr,"use notary pubkey\n"); scriptPubKey = CScript() << ParseHex(NOTARY_PUBKEY) << OP_CHECKSIG; } else { + fprintf(stderr,"do not use notary pubkey\n"); if (!isStake) { + fprintf(stderr,"is not stake.. whatever that means...\n"); if (!reservekey.GetReservedKey(pubkey)) { + fprintf(stderr,"returning null here\n"); return NULL; } scriptPubKey.resize(35); ptr = (uint8_t *)pubkey.begin(); scriptPubKey[0] = 33; - for (i=0; i<33; i++) + for (i=0; i<33; i++) { scriptPubKey[i+1] = ptr[i]; + fprintf(stderr,"%02x",scriptPubKey[i+1]); + } scriptPubKey[34] = OP_CHECKSIG; - //scriptPubKey = CScript() << ToByteVector(pubkey) << OP_CHECKSIG; } } return CreateNewBlock(scriptPubKey, gpucount, isStake); diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index aa308faee..c4204f8a0 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -7365,7 +7365,7 @@ UniValue getbalance64(const UniValue& params, bool fHelp) if ( out.nDepth < 100 ) nValues2[segid] += nValue, total2 += nValue; else nValues[segid] += nValue, total += nValue; - fprintf(stderr,"%s %.8f depth.%d segid.%d\n",(char *)CBitcoinAddress(address).ToString().c_str(),(double)nValue/COIN,(int32_t)out.nDepth,segid); + //fprintf(stderr,"%s %.8f depth.%d segid.%d\n",(char *)CBitcoinAddress(address).ToString().c_str(),(double)nValue/COIN,(int32_t)out.nDepth,segid); } else fprintf(stderr,"no destination\n"); } ret.push_back(Pair("mature",(double)total/COIN));