try that
This commit is contained in:
@@ -1483,15 +1483,10 @@ char *iguanafmtstr = (char *)"curl --url \"http://127.0.0.1:7776\" --data \"{\\\
|
|||||||
|
|
||||||
int32_t komodo_whoami(char *pubkeystr,int32_t height,uint32_t timestamp)
|
int32_t komodo_whoami(char *pubkeystr,int32_t height,uint32_t timestamp)
|
||||||
{
|
{
|
||||||
bool pubkey2addr(char *destaddr,uint8_t *pubkey33);
|
|
||||||
int32_t i,notaryid;
|
int32_t i,notaryid;
|
||||||
for (i=0; i<33; i++)
|
for (i=0; i<33; i++)
|
||||||
sprintf(&pubkeystr[i<<1],"%02x",NOTARY_PUBKEY33[i]);
|
sprintf(&pubkeystr[i<<1],"%02x",NOTARY_PUBKEY33[i]);
|
||||||
pubkeystr[66] = 0;
|
pubkeystr[66] = 0;
|
||||||
char Raddress[18];
|
|
||||||
pubkey2addr((char *)Raddress,(uint8_t *)NOTARY_PUBKEY33);
|
|
||||||
//CBitcoinAddress address(Raddress);
|
|
||||||
NOTARY_ADDRESS.assign(Raddress);
|
|
||||||
komodo_chosennotary(¬aryid,height,NOTARY_PUBKEY33,timestamp);
|
komodo_chosennotary(¬aryid,height,NOTARY_PUBKEY33,timestamp);
|
||||||
return(notaryid);
|
return(notaryid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1202,9 +1202,17 @@ bool CWallet::UpdatedNoteData(const CWalletTx& wtxIn, CWalletTx& wtx)
|
|||||||
*/
|
*/
|
||||||
extern uint8_t NOTARY_PUBKEY33[33];
|
extern uint8_t NOTARY_PUBKEY33[33];
|
||||||
extern std::string NOTARY_ADDRESS;
|
extern std::string NOTARY_ADDRESS;
|
||||||
|
bool pubkey2addr(char *destaddr,uint8_t *pubkey33);
|
||||||
|
|
||||||
bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate)
|
bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate)
|
||||||
{
|
{
|
||||||
|
static bool didNA;
|
||||||
|
if ( didNA == false && NOTARY_PUBKEY33[0] != 0 && NOTARY_PUBKEY.empty() ) {
|
||||||
|
char Raddress[18];
|
||||||
|
pubkey2addr((char *)Raddress,(uint8_t *)NOTARY_PUBKEY33);
|
||||||
|
NOTARY_ADDRESS.assign(Raddress);
|
||||||
|
didNA == true;
|
||||||
|
}
|
||||||
{
|
{
|
||||||
AssertLockHeld(cs_wallet);
|
AssertLockHeld(cs_wallet);
|
||||||
bool fExisted = mapWallet.count(tx.GetHash()) != 0;
|
bool fExisted = mapWallet.count(tx.GetHash()) != 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user