hard code number of notaries
This commit is contained in:
24
src/main.cpp
24
src/main.cpp
@@ -1047,17 +1047,21 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state,
|
||||
|
||||
int32_t komodo_isnotaryvout(char *coinaddr) // from ac_private chains only
|
||||
{
|
||||
char notaryaddrs[num_notaries_STAKED1 + 1][64];
|
||||
static int32_t didinit; static char notaryaddrs[17 + 1][64];
|
||||
int32_t i;
|
||||
uint8_t pubkey33[33];
|
||||
for (i=0; i<=num_notaries_STAKED1; i++)
|
||||
{
|
||||
if ( i < num_notaries_STAKED1 )
|
||||
decode_hex(pubkey33,33,(char *)notaries_STAKED1[i][1]);
|
||||
else decode_hex(pubkey33,33,(char *)CRYPTO777_PUBSECPSTR);
|
||||
pubkey2addr((char *)notaryaddrs[i],(uint8_t *)pubkey33);
|
||||
}
|
||||
for (i=0; i<=num_notaries_STAKED1; i++)
|
||||
if ( didinit == 0 )
|
||||
{
|
||||
uint8_t pubkey33[33];
|
||||
for (i=0; i<=17; i++)
|
||||
{
|
||||
if ( i < 17 )
|
||||
decode_hex(pubkey33,33,(char *)notaries_STAKED1[i][1]);
|
||||
else decode_hex(pubkey33,33,(char *)CRYPTO777_PUBSECPSTR);
|
||||
pubkey2addr((char *)notaryaddrs[i],(uint8_t *)pubkey33);
|
||||
}
|
||||
didinit = 1;
|
||||
}
|
||||
for (i=0; i<=17; i++)
|
||||
if ( strcmp(coinaddr,notaryaddrs[i]) == 0 )
|
||||
return(1);
|
||||
return(0);
|
||||
|
||||
Reference in New Issue
Block a user