This commit is contained in:
blackjok3r
2018-11-12 01:33:57 +08:00
parent eb7f16be6a
commit 7c50dd216c
3 changed files with 3 additions and 4 deletions

View File

@@ -155,7 +155,6 @@ bool PreventCC(Eval* eval,const CTransaction &tx,int32_t preventCCvins,int32_t n
bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey);
std::vector<uint8_t> Mypubkey();
bool Myprivkey(uint8_t myprivkey[]);
bool pubkey2addr(char *destaddr,uint8_t *pubkey33);
int64_t CCduration(int32_t &numblocks,uint256 txid);
bool isCCTxNotarizedConfirmed(uint256 txid);
// CCtx

View File

@@ -674,7 +674,7 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey,int32_t nHeight,in
}
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
{

View File

@@ -5085,7 +5085,7 @@ extern std::string NOTARY_PUBKEY,NOTARY_ADDRESS;
UniValue setpubkey(const UniValue& params, bool fHelp)
{
UniValue result(UniValue::VOBJ);
if ( fHelp || params.size() != 1 )
if ( fHelp || params.size() > 1 )
throw runtime_error(
"setpubkey\n"
"\nSets the -pubkey if the daemon was not started with it, if it was already set, it returns the pubkey.\n"
@@ -5128,10 +5128,10 @@ UniValue setpubkey(const UniValue& params, bool fHelp)
if ( (IS_STAKED_NOTARY= StakedNotaryID(notaryname, Raddress)) > -1 ) {
result.push_back(Pair("IsNotary", notaryname));
IS_KOMODO_NOTARY = 0;
USE_EXTERNAL_PUBKEY = 1;
}
NOTARY_PUBKEY = params[0].get_str();
decode_hex(NOTARY_PUBKEY33,33,(char *)NOTARY_PUBKEY.c_str());
USE_EXTERNAL_PUBKEY = 1;
}
} else
result.push_back(Pair("error", "pubkey entered is invalid."));