try this first
This commit is contained in:
@@ -246,8 +246,8 @@ obj/build.h: FORCE
|
|||||||
libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h
|
libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h
|
||||||
|
|
||||||
# server: zcashd
|
# server: zcashd
|
||||||
libbitcoin_server_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS)
|
libbitcoin_server_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS) -DSERVER
|
||||||
libbitcoin_server_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
libbitcoin_server_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -DSEVER
|
||||||
libbitcoin_server_a_SOURCES = \
|
libbitcoin_server_a_SOURCES = \
|
||||||
sendalert.cpp \
|
sendalert.cpp \
|
||||||
addrman.cpp \
|
addrman.cpp \
|
||||||
|
|||||||
@@ -20,8 +20,6 @@
|
|||||||
|
|
||||||
#include "notaries_staked.h"
|
#include "notaries_staked.h"
|
||||||
|
|
||||||
extern int32_t pubkey2address(char *destaddr,uint8_t *pubkey33) ;
|
|
||||||
|
|
||||||
#define KOMODO_MAINNET_START 178999
|
#define KOMODO_MAINNET_START 178999
|
||||||
|
|
||||||
extern char NOTARYADDRS[18][64];
|
extern char NOTARYADDRS[18][64];
|
||||||
@@ -234,9 +232,11 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam
|
|||||||
n0 = (int32_t)(sizeof(Notaries_elected0)/sizeof(*Notaries_elected0));
|
n0 = (int32_t)(sizeof(Notaries_elected0)/sizeof(*Notaries_elected0));
|
||||||
for (i=0; i<n0; i++) {
|
for (i=0; i<n0; i++) {
|
||||||
decode_hex(elected_pubkeys0[i],33,(char *)Notaries_elected0[i][1]);
|
decode_hex(elected_pubkeys0[i],33,(char *)Notaries_elected0[i][1]);
|
||||||
|
#ifdef SERVER
|
||||||
pthread_mutex_lock(&komodo_mutex);
|
pthread_mutex_lock(&komodo_mutex);
|
||||||
pubkey2address((char *)NOTARYADDRS[i],(uint8_t *)Notaries_elected0[i][1]);
|
pubkey2address((char *)NOTARYADDRS[i],(uint8_t *)Notaries_elected0[i][1]);
|
||||||
pthread_mutex_unlock(&komodo_mutex);
|
pthread_mutex_unlock(&komodo_mutex);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
did0 = 1;
|
did0 = 1;
|
||||||
}
|
}
|
||||||
@@ -252,9 +252,11 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam
|
|||||||
n1 = (int32_t)(sizeof(Notaries_elected1)/sizeof(*Notaries_elected1));
|
n1 = (int32_t)(sizeof(Notaries_elected1)/sizeof(*Notaries_elected1));
|
||||||
for (i=0; i<n1; i++) {
|
for (i=0; i<n1; i++) {
|
||||||
decode_hex(elected_pubkeys1[i],33,(char *)Notaries_elected1[i][1]);
|
decode_hex(elected_pubkeys1[i],33,(char *)Notaries_elected1[i][1]);
|
||||||
|
#ifdef SERVER
|
||||||
pthread_mutex_lock(&komodo_mutex);
|
pthread_mutex_lock(&komodo_mutex);
|
||||||
pubkey2address((char *)NOTARYADDRS[i],(uint8_t *)Notaries_elected1[i][1]);
|
pubkey2address((char *)NOTARYADDRS[i],(uint8_t *)Notaries_elected1[i][1]);
|
||||||
pthread_mutex_unlock(&komodo_mutex);
|
pthread_mutex_unlock(&komodo_mutex);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 )
|
if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 )
|
||||||
fprintf(stderr,"%s height.%d t.%u elected.%d notaries2\n",ASSETCHAINS_SYMBOL,height,timestamp,n1);
|
fprintf(stderr,"%s height.%d t.%u elected.%d notaries2\n",ASSETCHAINS_SYMBOL,height,timestamp,n1);
|
||||||
@@ -277,9 +279,11 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam
|
|||||||
ns1 = num_notaries_STAKED1;
|
ns1 = num_notaries_STAKED1;
|
||||||
for (i=0; i<ns1; i++) {
|
for (i=0; i<ns1; i++) {
|
||||||
decode_hex(staked_pubkeys1[i],33,(char *)notaries_STAKED1[i][1]);
|
decode_hex(staked_pubkeys1[i],33,(char *)notaries_STAKED1[i][1]);
|
||||||
|
#ifdef SERVER
|
||||||
pthread_mutex_lock(&komodo_mutex);
|
pthread_mutex_lock(&komodo_mutex);
|
||||||
pubkey2address((char *)NOTARYADDRS[i],(uint8_t *)notaries_STAKED1[i][1]);
|
pubkey2address((char *)NOTARYADDRS[i],(uint8_t *)notaries_STAKED1[i][1]);
|
||||||
pthread_mutex_unlock(&komodo_mutex);
|
pthread_mutex_unlock(&komodo_mutex);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
didstaked1 = 1;
|
didstaked1 = 1;
|
||||||
didstaked2 = 0;
|
didstaked2 = 0;
|
||||||
@@ -296,9 +300,11 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam
|
|||||||
ns2 = num_notaries_STAKED2;
|
ns2 = num_notaries_STAKED2;
|
||||||
for (i=0; i<ns2; i++) {
|
for (i=0; i<ns2; i++) {
|
||||||
decode_hex(staked_pubkeys2[i],33,(char *)notaries_STAKED2[i][1]);
|
decode_hex(staked_pubkeys2[i],33,(char *)notaries_STAKED2[i][1]);
|
||||||
|
#ifdef SERVER
|
||||||
pthread_mutex_lock(&komodo_mutex);
|
pthread_mutex_lock(&komodo_mutex);
|
||||||
pubkey2address((char *)NOTARYADDRS[i],(uint8_t *)notaries_STAKED2[i][1]);
|
pubkey2address((char *)NOTARYADDRS[i],(uint8_t *)notaries_STAKED2[i][1]);
|
||||||
pthread_mutex_unlock(&komodo_mutex);
|
pthread_mutex_unlock(&komodo_mutex);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
didstaked2 = 1;
|
didstaked2 = 1;
|
||||||
didstaked3 = 0;
|
didstaked3 = 0;
|
||||||
@@ -314,9 +320,11 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam
|
|||||||
ns3 = num_notaries_STAKED3;
|
ns3 = num_notaries_STAKED3;
|
||||||
for (i=0; i<ns3; i++) {
|
for (i=0; i<ns3; i++) {
|
||||||
decode_hex(staked_pubkeys3[i],33,(char *)notaries_STAKED3[i][1]);
|
decode_hex(staked_pubkeys3[i],33,(char *)notaries_STAKED3[i][1]);
|
||||||
|
#ifdef SERVER
|
||||||
pthread_mutex_lock(&komodo_mutex);
|
pthread_mutex_lock(&komodo_mutex);
|
||||||
pubkey2address((char *)NOTARYADDRS[i],(uint8_t *)notaries_STAKED3[i][1]);
|
pubkey2address((char *)NOTARYADDRS[i],(uint8_t *)notaries_STAKED3[i][1]);
|
||||||
pthread_mutex_unlock(&komodo_mutex);
|
pthread_mutex_unlock(&komodo_mutex);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
didstaked3 = 1;
|
didstaked3 = 1;
|
||||||
didstaked4 = 0;
|
didstaked4 = 0;
|
||||||
@@ -331,9 +339,11 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam
|
|||||||
ns4 = num_notaries_STAKED4;
|
ns4 = num_notaries_STAKED4;
|
||||||
for (i=0; i<ns4; i++) {
|
for (i=0; i<ns4; i++) {
|
||||||
decode_hex(staked_pubkeys4[i],33,(char *)notaries_STAKED4[i][1]);
|
decode_hex(staked_pubkeys4[i],33,(char *)notaries_STAKED4[i][1]);
|
||||||
|
#ifdef SERVER
|
||||||
pthread_mutex_lock(&komodo_mutex);
|
pthread_mutex_lock(&komodo_mutex);
|
||||||
pubkey2address((char *)NOTARYADDRS[i],(uint8_t *)notaries_STAKED4[i][1]);
|
pubkey2address((char *)NOTARYADDRS[i],(uint8_t *)notaries_STAKED4[i][1]);
|
||||||
pthread_mutex_unlock(&komodo_mutex);
|
pthread_mutex_unlock(&komodo_mutex);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
didstaked4 = 1;
|
didstaked4 = 1;
|
||||||
printf("%s IS A STAKED CHAIN and is era 4 \n",ASSETCHAINS_SYMBOL);
|
printf("%s IS A STAKED CHAIN and is era 4 \n",ASSETCHAINS_SYMBOL);
|
||||||
|
|||||||
Reference in New Issue
Block a user