|
|
@ -13,6 +13,7 @@ |
|
|
|
#include "timedata.h" |
|
|
|
#include "txmempool.h" |
|
|
|
#include "util.h" |
|
|
|
#include "notaries_staked.h" |
|
|
|
#ifdef ENABLE_WALLET |
|
|
|
#include "wallet/wallet.h" |
|
|
|
#include "wallet/walletdb.h" |
|
|
@ -50,11 +51,12 @@ int32_t komodo_notarized_height(int32_t *prevhtp,uint256 *hashp,uint256 *txidp); |
|
|
|
uint32_t komodo_chainactive_timestamp(); |
|
|
|
int32_t komodo_whoami(char *pubkeystr,int32_t height,uint32_t timestamp); |
|
|
|
extern uint64_t KOMODO_INTERESTSUM,KOMODO_WALLETBALANCE; |
|
|
|
extern int32_t KOMODO_LASTMINED,JUMBLR_PAUSE,KOMODO_LONGESTCHAIN; |
|
|
|
extern int32_t KOMODO_LASTMINED,JUMBLR_PAUSE,KOMODO_LONGESTCHAIN,IS_STAKED_NOTARY; |
|
|
|
extern char ASSETCHAINS_SYMBOL[KOMODO_ASSETCHAIN_MAXLEN]; |
|
|
|
uint32_t komodo_segid32(char *coinaddr); |
|
|
|
int64_t komodo_coinsupply(int64_t *zfundsp,int32_t height); |
|
|
|
int32_t notarizedtxid_height(char *dest,char *txidstr,int32_t *kmdnotarized_heightp); |
|
|
|
int8_t StakedNotaryID(std::string ¬aryname, char *Raddress); |
|
|
|
#define KOMODO_VERSION "0.2.1" |
|
|
|
extern uint16_t ASSETCHAINS_P2PPORT,ASSETCHAINS_RPCPORT; |
|
|
|
extern uint32_t ASSETCHAINS_CC; |
|
|
@ -152,13 +154,18 @@ UniValue getinfo(const UniValue& params, bool fHelp) |
|
|
|
obj.push_back(Pair("relayfee", ValueFromAmount(::minRelayTxFee.GetFeePerK()))); |
|
|
|
obj.push_back(Pair("errors", GetWarnings("statusbar"))); |
|
|
|
{ |
|
|
|
char pubkeystr[65]; int32_t notaryid; |
|
|
|
if ( (notaryid= komodo_whoami(pubkeystr,(int32_t)chainActive.LastTip()->nHeight,komodo_chainactive_timestamp())) >= 0 ) |
|
|
|
char pubkeystr[65]; int32_t notaryid; std::string notaryname; |
|
|
|
if ( (notaryid= komodo_whoami(pubkeystr,(int32_t)chainActive.LastTip()->nHeight,komodo_chainactive_timestamp())) >= 0 && ( IS_STAKED_NOTARY == 0 )) |
|
|
|
{ |
|
|
|
obj.push_back(Pair("notaryid", notaryid)); |
|
|
|
obj.push_back(Pair("pubkey", pubkeystr)); |
|
|
|
if ( KOMODO_LASTMINED != 0 ) |
|
|
|
obj.push_back(Pair("lastmined", KOMODO_LASTMINED)); |
|
|
|
} else if ( NOTARY_PUBKEY33[0] != 0 && IS_STAKED_NOTARY != 0 && NOTARY_ADDRESS.emtpy() == false ) { |
|
|
|
notaryid = StakedNotaryID(notaryname, NOTARY_ADDRESS.c_str()) |
|
|
|
obj.push_back(Pair("notaryid", notaryid)); |
|
|
|
obj.push_back(Pair("notaryname", notaryname)); |
|
|
|
obj.push_back(Pair("pubkey", NOTARY_PUBKEY)); |
|
|
|
} else if ( NOTARY_PUBKEY33[0] != 0 ) { |
|
|
|
obj.push_back(Pair("pubkey", NOTARY_PUBKEY)); |
|
|
|
} |
|
|
|