This commit is contained in:
jl777
2016-12-01 17:00:36 -03:00
parent e68d4d63b7
commit ba0a297f16

View File

@@ -376,13 +376,19 @@ uint256 _komodo_getblockhash(int32_t height);
uint64_t komodo_seed(int32_t height)
{
uint256 hash; uint64_t seed = 0; CBlockIndex *pindex;
uint256 hash,zero; uint64_t seed = 0; CBlockIndex *pindex;
memset(&hash,0,sizeof(hash));
memset(&zero,0,sizeof(zero));
if ( height > 10 )
height -= 10;
if ( ASSETCHAINS_SYMBOL[0] == 0 )
{
hash = _komodo_getblockhash(height);
while ( memcmp(&hash,&zero,sizeof(hash)) == 0 )
{
fprintf(stderr,"null seed for height.%d, sleep\n",height);
sleep(3);
}
int32_t i;
for (i=0; i<32; i++)
printf("%02x",((uint8_t *)&hash)[i]);