change ac_private pubkeys to use STAKED notaries instead of elected
This commit is contained in:
12
src/main.cpp
12
src/main.cpp
@@ -34,6 +34,8 @@
|
|||||||
#include "wallet/asyncrpcoperation_sendmany.h"
|
#include "wallet/asyncrpcoperation_sendmany.h"
|
||||||
#include "wallet/asyncrpcoperation_shieldcoinbase.h"
|
#include "wallet/asyncrpcoperation_shieldcoinbase.h"
|
||||||
|
|
||||||
|
#include "notaries_staked.h"
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include <boost/algorithm/string/replace.hpp>
|
#include <boost/algorithm/string/replace.hpp>
|
||||||
@@ -1045,21 +1047,21 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state,
|
|||||||
|
|
||||||
int32_t komodo_isnotaryvout(char *coinaddr) // from ac_private chains only
|
int32_t komodo_isnotaryvout(char *coinaddr) // from ac_private chains only
|
||||||
{
|
{
|
||||||
static int32_t didinit; static char notaryaddrs[sizeof(Notaries_elected1)/sizeof(*Notaries_elected1) + 1][64];
|
static int32_t didinit; static char notaryaddrs[sizeof(notaries_STAKED1)/sizeof(*notaries_STAKED1) + 1][64];
|
||||||
int32_t i;
|
int32_t i;
|
||||||
if ( didinit == 0 )
|
if ( didinit == 0 )
|
||||||
{
|
{
|
||||||
uint8_t pubkey33[33];
|
uint8_t pubkey33[33];
|
||||||
for (i=0; i<=sizeof(Notaries_elected1)/sizeof(*Notaries_elected1); i++)
|
for (i=0; i<=sizeof(notaries_STAKED1)/sizeof(*notaries_STAKED1); i++)
|
||||||
{
|
{
|
||||||
if ( i < sizeof(Notaries_elected1)/sizeof(*Notaries_elected1) )
|
if ( i < sizeof(notaries_STAKED1)/sizeof(*notaries_STAKED1) )
|
||||||
decode_hex(pubkey33,33,(char *)Notaries_elected1[i][1]);
|
decode_hex(pubkey33,33,(char *)notaries_STAKED1[i][1]);
|
||||||
else decode_hex(pubkey33,33,(char *)CRYPTO777_PUBSECPSTR);
|
else decode_hex(pubkey33,33,(char *)CRYPTO777_PUBSECPSTR);
|
||||||
pubkey2addr((char *)notaryaddrs[i],(uint8_t *)pubkey33);
|
pubkey2addr((char *)notaryaddrs[i],(uint8_t *)pubkey33);
|
||||||
}
|
}
|
||||||
didinit = 1;
|
didinit = 1;
|
||||||
}
|
}
|
||||||
for (i=0; i<=sizeof(Notaries_elected1)/sizeof(*Notaries_elected1); i++)
|
for (i=0; i<=sizeof(notaries_STAKED1)/sizeof(*notaries_STAKED1); i++)
|
||||||
if ( strcmp(coinaddr,notaryaddrs[i]) == 0 )
|
if ( strcmp(coinaddr,notaryaddrs[i]) == 0 )
|
||||||
return(1);
|
return(1);
|
||||||
return(0);
|
return(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user