test
This commit is contained in:
@@ -116,9 +116,10 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height)
|
||||
{
|
||||
mask |= (1LL << kp->notaryid);
|
||||
memcpy(pubkeys[kp->notaryid],kp->pubkey,33);
|
||||
}
|
||||
} else printf("illegal notaryid.%d vs n.%d\n",kp->notaryid,n);
|
||||
}
|
||||
pthread_mutex_unlock(&komodo_mutex);
|
||||
printf("notaries ht.%d got mask.%llx for n.%d\n",height,(long long)mask,n);
|
||||
if ( mask == ((1LL << n)-1) )
|
||||
return(n);
|
||||
printf("error retrieving notaries ht.%d got mask.%llx for n.%d\n",height,(long long)mask,n);
|
||||
|
||||
@@ -389,7 +389,7 @@ char *bitcoin_address(char *coinaddr,uint8_t addrtype,uint8_t *pubkey_or_rmd160,
|
||||
|
||||
Value notaries(const Array& params, bool fHelp)
|
||||
{
|
||||
Array a; Object ret,item; int32_t i,j,n,m; char *hexstr; std::string hex,addr; uint8_t pubkeys[64][33]; char btcaddr[64],kmdaddr[64],*ptr;
|
||||
Array a; Object ret; int32_t i,j,n,m; char *hexstr; std::string hex,addr; uint8_t pubkeys[64][33]; char btcaddr[64],kmdaddr[64],*ptr;
|
||||
if ( fHelp || params.size() != 1 )
|
||||
throw runtime_error("notaries height\n");
|
||||
LOCK(cs_main);
|
||||
@@ -403,6 +403,7 @@ Value notaries(const Array& params, bool fHelp)
|
||||
{
|
||||
for (i=0; i<n; i++)
|
||||
{
|
||||
Object item;
|
||||
std::string btcaddress,kmdaddress;
|
||||
bitcoin_address(btcaddr,0,pubkeys[i],33);
|
||||
m = (int32_t)strlen(btcaddr);
|
||||
|
||||
Reference in New Issue
Block a user