From c95fd5e040e29d77e5cda8dda2cadba3f88c81a9 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 3 Oct 2016 08:30:09 -0300 Subject: [PATCH] fix args --- src/bitcoind.cpp | 4 ---- src/init.cpp | 5 +++++ src/miner.cpp | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 380919979..cb787357d 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -118,10 +118,6 @@ bool AppInit(int argc, char* argv[]) fprintf(stderr, "Error: There is no RPC client functionality in komodod. Use the komodo-cli utility instead.\n"); exit(1); } - extern int32_t IS_KOMODO_NOTARY; - extern std::string NOTARY_PUBKEY; - IS_KOMODO_NOTARY = GetBoolArg("-notary", false); - NOTARY_PUBKEY = GetArg("-pubkey", ""); #ifndef WIN32 fDaemon = GetBoolArg("-daemon", false); diff --git a/src/init.cpp b/src/init.cpp index c169d10c4..5ce21da94 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1479,6 +1479,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) // Generate coins in the background if (pwalletMain) GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", 1)); + extern int32_t IS_KOMODO_NOTARY; + extern std::string NOTARY_PUBKEY; + IS_KOMODO_NOTARY = GetBoolArg("-notary", false); + NOTARY_PUBKEY = GetArg("-pubkey", ""); + #endif // ********************************************************* Step 11: finished diff --git a/src/miner.cpp b/src/miner.cpp index c7b3a1768..c049dc548 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -410,16 +410,16 @@ extern std::string NOTARY_PUBKEY; CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) { - CPubKey pubkey; + CPubKey pubkey; CScript scriptPubKey; if ( IS_KOMODO_NOTARY == 0 ) { if (!reservekey.GetReservedKey(pubkey)) return NULL; - CScript scriptPubKey = CScript() << ToByteVector(pubkey) << OP_CHECKSIG; + scriptPubKey = CScript() << ToByteVector(pubkey) << OP_CHECKSIG; } else { - CScript scriptPubKey = CScript() << ParseHex(NOTARY_PUBKEY.get_str()) << OP_CHECKSIG; + scriptPubKey = CScript() << ParseHex(NOTARY_PUBKEY) << OP_CHECKSIG; } return CreateNewBlock(scriptPubKey); }