Merge branch 'beta' into mergemaster

# Conflicts:
#	src/main.cpp
This commit is contained in:
jl777
2018-04-16 10:16:01 +03:00
parent 9226f69ef1
commit e73b2055c6
910 changed files with 112009 additions and 11364 deletions

View File

@@ -198,8 +198,6 @@ const char *Notaries_elected1[][2] =
{"xrobesx_NA", "03f0cc6d142d14a40937f12dbd99dbd9021328f45759e26f1877f2a838876709e1" },
};
uint32_t komodo_heightstamp(int32_t height);
int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestamp)
{
static uint8_t elected_pubkeys0[64][33],elected_pubkeys1[64][33],did0,did1; static int32_t n0,n1;
@@ -544,5 +542,38 @@ void komodo_init(int32_t height)
didinit = 1;
komodo_stateupdate(0,0,0,0,zero,0,0,0,0,0,0,0,0,0,0);
}
}
}
/*void komodo_assetchain_pubkeys(char *jsonstr)
{
cJSON *array; int32_t i,n; uint8_t pubkeys[64][33]; char *hexstr;
memset(pubkeys,0,sizeof(pubkeys));
if ( (array= cJSON_Parse(jsonstr)) != 0 )
{
if ( (n= cJSON_GetArraySize(array)) > 0 )
{
for (i=0; i<n; i++)
{
if ( (hexstr= jstri(array,i)) != 0 && is_hexstr(hexstr,0) == 66 )
{
decode_hex(pubkeys[i],33,hexstr);
fprintf(stderr,"i.%d of n.%d pubkey.(%s)\n",i,n,hexstr);
}
else
{
fprintf(stderr,"illegal hexstr.(%s) i.%d of n.%d\n",hexstr,i,n);
break;
}
}
if ( i == n )
{
komodo_init(-1);
komodo_notarysinit(0,pubkeys,n);
KOMODO_EXTERNAL_NOTARIES = 1;
//printf("initialize pubkeys[%d]\n",n);
} else fprintf(stderr,"komodo_assetchain_pubkeys i.%d vs n.%d\n",i,n);
} else fprintf(stderr,"assetchain pubkeys n.%d\n",n);
}
//else if ( jsonstr != 0 )
// fprintf(stderr,"assetchain pubkeys couldnt parse.(%s)\n",jsonstr);
}*/