diff --git a/src/crosschain_authority.cpp b/src/crosschain_authority.cpp index aa2188457..1b41c2aad 100644 --- a/src/crosschain_authority.cpp +++ b/src/crosschain_authority.cpp @@ -7,7 +7,7 @@ int GetSymbolAuthority(const char* symbol) { if (strncmp(symbol, "TXSCL", 5) == 0) return CROSSCHAIN_TXSCL; - if (is_STAKED() != 0) + if (is_STAKED(symbol) != 0) printf("RETURNED CROSSCHAIN STAKED AS TRUE\n"); return CROSSCHAIN_STAKED; return CROSSCHAIN_KOMODO; diff --git a/src/komodo_notary.h b/src/komodo_notary.h index 4f1645f98..1b572b17c 100644 --- a/src/komodo_notary.h +++ b/src/komodo_notary.h @@ -215,7 +215,7 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam else if ( ASSETCHAINS_SYMBOL[0] == 0 ) timestamp = 0; // If this chain is not a staked chain, use the normal Komodo logic to determine notaries. This allows KMD to still sync and use its proper pubkeys for dPoW. - if (is_STAKED() == 0) + if (is_STAKED(ASSETCHAINS_SYMBOL) == 0) { if ( height >= KOMODO_NOTARIES_HARDCODED || ASSETCHAINS_SYMBOL[0] != 0 ) { diff --git a/src/main.cpp b/src/main.cpp index 596518ecf..89aea8360 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5954,7 +5954,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, CAddress addrFrom; uint64_t nNonce = 1; vRecv >> pfrom->nVersion >> pfrom->nServices >> nTime >> addrMe; - if ( is_STAKED() != 0 ) + if ( is_STAKED(ASSETCHAINS_SYMBOL) != 0 ) { if (pfrom->nVersion < STAKEDMIN_PEER_PROTO_VERSION) { diff --git a/src/notaries_staked.cpp b/src/notaries_staked.cpp index 81d249d96..33dfa8bb5 100644 --- a/src/notaries_staked.cpp +++ b/src/notaries_staked.cpp @@ -2,8 +2,6 @@ #include "notaries_staked.h" #include -extern char ASSETCHAINS_SYMBOL[65]; - // Era 0 set of pubkeys const char *notaries_STAKED[][2] = { @@ -100,9 +98,9 @@ const char *notaries_STAKED3[][2] = int num_notaries_STAKED3 = (sizeof(notaries_STAKED3)/sizeof(*notaries_STAKED3)); -int is_STAKED() { +int is_STAKED(const *char chain_name) { int STAKED = 0; - if ( (strncmp(ASSETCHAINS_SYMBOL, "STKD", 4) == 0) || (strncmp(ASSETCHAINS_SYMBOL, "STAKED", 6) == 0) ) + if ( (strncmp(chain_name, "STKD", 4) == 0) || (strncmp(chain_name, "STAKED", 6) == 0) ) STAKED = 1; return(STAKED); }; diff --git a/src/notaries_staked.h b/src/notaries_staked.h index 84296d4e5..7d3748d4e 100644 --- a/src/notaries_staked.h +++ b/src/notaries_staked.h @@ -19,7 +19,7 @@ extern int num_notaries_STAKED2; extern const char *notaries_STAKED3[][2]; extern int num_notaries_STAKED3; -int is_STAKED(); +int is_STAKED(const *char chain_name); int STAKED_era(int timestamp); #endif