This commit is contained in:
blackjok3r
2018-09-21 03:10:28 +08:00
parent f58cc01b5e
commit 75a86d88a2
4 changed files with 6 additions and 3 deletions

View File

@@ -55,7 +55,7 @@ bool CheckTxAuthority(const CTransaction &tx, CrosschainAuthority auth)
const CrosschainAuthority auth_STAKED = [&](){
CrosschainAuthority auth;
auth.size = (int32_t)(sizeof(notaries_STAKED)/sizeof(*notaries_STAKED));
auth.size = num_notaries_STAKED;
auth.requiredSigs = 3;
for (int n=0; n<auth.size; n++)
for (size_t i=0; i<33; i++)

View File

@@ -232,7 +232,7 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam
{
if ( (strncmp(ASSETCHAINS_SYMBOL, "STKD", 4) == 0) || (strncmp(ASSETCHAINS_SYMBOL, "STAKED", 6) == 0) )
{
n1 = (int32_t)(sizeof(notaries_STAKED)/sizeof(*notaries_STAKED));
n1 = num_notaries_STAKED;
for (i=0; i<n1; i++)
decode_hex(elected_pubkeys1[i],33,(char *)notaries_STAKED[i][1]);
did1 = 1;

View File

@@ -22,8 +22,10 @@ const char *notaries_STAKED[][2] =
};
bool is_STAKED() {
int32_t STAKED = 0;
bool STAKED = 0;
if ( (strncmp(ASSETCHAINS_SYMBOL, "STKD", 4) == 0) || (strncmp(ASSETCHAINS_SYMBOL, "STAKED", 6) == 0) )
STAKED = 1;
return(STAKED)
};
int num_notaries_STAKED = (int32_t)(sizeof(notaries_STAKED)/sizeof(*notaries_STAKED));

View File

@@ -2,6 +2,7 @@
#define NOTARIES_STAKED_H
extern const char *notaries_STAKED[][2];
extern int num_notaries_STAKED;
bool is_STAKED();