From 8c072b0bce0e2ee47df31c11b49d13239354d3ff Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 1 Dec 2016 17:04:15 -0300 Subject: [PATCH] test --- src/komodo_bitcoind.h | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index 62cb18f0e..8b3ede994 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -382,19 +382,14 @@ uint64_t komodo_seed(int32_t height) 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]); - printf(" seed.%d\n",height); - } else hash = komodo_getblockhash(height); - seed = arith_uint256(hash.GetHex()).GetLow64(); + if ( memcmp(&hash,&zero,sizeof(hash)) == 0 ) + hash = komodo_getblockhash(height); + int32_t i; + for (i=0; i<32; i++) + printf("%02x",((uint8_t *)&hash)[i]); + printf(" seed.%d\n",height); + seed = arith_uint256(hash.GetHex()).GetLow64(); return(seed); }