diff --git a/src/main.cpp b/src/main.cpp index 90dac54aa..b3e31681c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1047,20 +1047,16 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state, int32_t komodo_isnotaryvout(char *coinaddr) // from ac_private chains only { - static int32_t didinit; static char notaryaddrs[num_notaries_STAKED1 + 1][64]; + char notaryaddrs[num_notaries_STAKED1 + 1][64]; int32_t i; - if ( didinit == 0 ) - { - 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); - } - didinit = 1; - } + 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 ( strcmp(coinaddr,notaryaddrs[i]) == 0 ) return(1);