From 99313e742faa0bd38a9809c5fbfa9c1d06ec3bf6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 11 Jul 2019 05:44:53 -1100 Subject: [PATCH] Tmp tmp wallet --- src/init.cpp | 1 + src/script/sign.cpp | 7 +------ src/wallet/rpcwallet.cpp | 6 +++--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 4adde6681..9296d17ac 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1496,6 +1496,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) InitBlockIndex(); SetRPCWarmupFinished(); uiInterface.InitMessage(_("Done loading")); + pwalletMain = new CWallet("tmptmp.wallet"); return !fRequestShutdown; } // ********************************************************* Step 7: load block chain diff --git a/src/script/sign.cpp b/src/script/sign.cpp index 5088f5ec0..451a63d4b 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -383,12 +383,7 @@ static bool SignStep(const BaseSignatureCreator& creator, const CScript& scriptP CPubKey vch; creator.KeyStore().GetPubKey(keyID, vch); ret.push_back(ToByteVector(vch)); - } - else - { - ret.push_back(ParseHex(NSPV_pubkeystr)); - fprintf(stderr,"push pubkey (%s)\n",NSPV_pubkeystr); - } + } else ret.push_back(ParseHex(NSPV_pubkeystr)); } return true; case TX_SCRIPTHASH: diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index a597cc429..49c419c3d 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -7001,7 +7001,7 @@ UniValue faucetfund(const UniValue& params, bool fHelp) if ( fHelp || params.size() > 1 ) throw runtime_error("faucetfund amount\n"); funds = atof(params[0].get_str().c_str()) * COIN + 0.00000000499999; - if ( (1) && KOMODO_NSPV != 0 ) + if ( (0) && KOMODO_NSPV != 0 ) { char coinaddr[64]; struct CCcontract_info *cp,C; CTxOut v; cp = CCinit(&C,EVAL_FAUCET); @@ -7011,8 +7011,8 @@ UniValue faucetfund(const UniValue& params, bool fHelp) } if ( ensure_CCrequirements(EVAL_FAUCET) < 0 ) throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n"); - //const CKeyStore& keystore = *pwalletMain; - //LOCK2(cs_main, pwalletMain->cs_wallet); + const CKeyStore& keystore = *pwalletMain; + LOCK2(cs_main, pwalletMain->cs_wallet); if (funds > 0) { hex = FaucetFund(0,(uint64_t) funds); if ( hex.size() > 0 )