This commit is contained in:
jl777
2016-10-03 08:30:09 -03:00
parent 998397aa2c
commit c95fd5e040
3 changed files with 8 additions and 7 deletions

View File

@@ -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);

View File

@@ -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

View File

@@ -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);
}