Browse Source

Allow crypto777 pub key

pull/4/head
jl777 6 years ago
parent
commit
fb11078137
  1. 7
      src/komodo_notary.h

7
src/komodo_notary.h

@ -197,15 +197,18 @@ const char *Notaries_elected1[][2] =
{"webworker01_NA", "03bb7d005e052779b1586f071834c5facbb83470094cff5112f0072b64989f97d7" },
{"xrobesx_NA", "03f0cc6d142d14a40937f12dbd99dbd9021328f45759e26f1877f2a838876709e1" },
};
#define CRYPTO777_PUBSECPSTR "020e46e79a2a8d12b9b5d12c7a91adb4e454edfae43c0a0cb805427d2ac7613fd9"
int32_t komodo_isnotaryvout(uint8_t *script) // from ac_private chains only
{
uint8_t pubkey33[33]; int32_t i;
if ( script[0] == 33 && script[34] == 0xac )
{
for (i=0; i<sizeof(Notaries_elected1)/sizeof(*Notaries_elected1); i++)
for (i=0; i<=sizeof(Notaries_elected1)/sizeof(*Notaries_elected1); i++)
{
decode_hex(pubkey33,33,(char *)Notaries_elected1[i][1]);
if ( i < sizeof(Notaries_elected1)/sizeof(*Notaries_elected1) )
decode_hex(pubkey33,33,(char *)Notaries_elected1[i][1]);
else decode_hex(pubkey33,33,(char *)CRYPTO777_PUBSECPSTR);
if ( memcmp(script+1,pubkey33,33) == 0 )
return(1);
}

Loading…
Cancel
Save