try
This commit is contained in:
@@ -155,7 +155,6 @@ bool PreventCC(Eval* eval,const CTransaction &tx,int32_t preventCCvins,int32_t n
|
|||||||
bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey);
|
bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey);
|
||||||
std::vector<uint8_t> Mypubkey();
|
std::vector<uint8_t> Mypubkey();
|
||||||
bool Myprivkey(uint8_t myprivkey[]);
|
bool Myprivkey(uint8_t myprivkey[]);
|
||||||
bool pubkey2addr(char *destaddr,uint8_t *pubkey33);
|
|
||||||
int64_t CCduration(int32_t &numblocks,uint256 txid);
|
int64_t CCduration(int32_t &numblocks,uint256 txid);
|
||||||
bool isCCTxNotarizedConfirmed(uint256 txid);
|
bool isCCTxNotarizedConfirmed(uint256 txid);
|
||||||
// CCtx
|
// CCtx
|
||||||
|
|||||||
@@ -674,7 +674,7 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey,int32_t nHeight,in
|
|||||||
}
|
}
|
||||||
else if ( USE_EXTERNAL_PUBKEY != 0 )
|
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;
|
scriptPubKey = CScript() << ParseHex(NOTARY_PUBKEY) << OP_CHECKSIG;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5085,7 +5085,7 @@ extern std::string NOTARY_PUBKEY,NOTARY_ADDRESS;
|
|||||||
UniValue setpubkey(const UniValue& params, bool fHelp)
|
UniValue setpubkey(const UniValue& params, bool fHelp)
|
||||||
{
|
{
|
||||||
UniValue result(UniValue::VOBJ);
|
UniValue result(UniValue::VOBJ);
|
||||||
if ( fHelp || params.size() != 1 )
|
if ( fHelp || params.size() > 1 )
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"setpubkey\n"
|
"setpubkey\n"
|
||||||
"\nSets the -pubkey if the daemon was not started with it, if it was already set, it returns the pubkey.\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 ) {
|
if ( (IS_STAKED_NOTARY= StakedNotaryID(notaryname, Raddress)) > -1 ) {
|
||||||
result.push_back(Pair("IsNotary", notaryname));
|
result.push_back(Pair("IsNotary", notaryname));
|
||||||
IS_KOMODO_NOTARY = 0;
|
IS_KOMODO_NOTARY = 0;
|
||||||
USE_EXTERNAL_PUBKEY = 1;
|
|
||||||
}
|
}
|
||||||
NOTARY_PUBKEY = params[0].get_str();
|
NOTARY_PUBKEY = params[0].get_str();
|
||||||
decode_hex(NOTARY_PUBKEY33,33,(char *)NOTARY_PUBKEY.c_str());
|
decode_hex(NOTARY_PUBKEY33,33,(char *)NOTARY_PUBKEY.c_str());
|
||||||
|
USE_EXTERNAL_PUBKEY = 1;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
result.push_back(Pair("error", "pubkey entered is invalid."));
|
result.push_back(Pair("error", "pubkey entered is invalid."));
|
||||||
|
|||||||
Reference in New Issue
Block a user