From f2b6c7dcfefb2feac59984423faefd8ccf741308 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 15 Mar 2018 18:36:25 +0200 Subject: [PATCH] Test --- iguana/dpow/dpow_fsm.c | 5 +++++ iguana/dpow/dpow_rpc.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/iguana/dpow/dpow_fsm.c b/iguana/dpow/dpow_fsm.c index 07ef4b4fd..e4374efe3 100755 --- a/iguana/dpow/dpow_fsm.c +++ b/iguana/dpow/dpow_fsm.c @@ -256,6 +256,11 @@ bits256 dpow_calcMoM(uint32_t *MoMdepthp,struct supernet_info *myinfo,struct igu blockhash = dpow_getblockhash(myinfo,coin,ht); if ( (blockjson= dpow_getblock(myinfo,coin,blockhash)) != 0 ) { + if ( dpow_hasnotarization(myinfo,coin,blockjson) > 0 ) + { + free_json(blockjson); + break; + } merkle = jbits256(blockjson,"merkleroot"); free_json(blockjson); if ( bits256_nonz(merkle) != 0 ) diff --git a/iguana/dpow/dpow_rpc.c b/iguana/dpow/dpow_rpc.c index dde4d4a1c..8a4d72b6d 100755 --- a/iguana/dpow/dpow_rpc.c +++ b/iguana/dpow/dpow_rpc.c @@ -759,6 +759,8 @@ int32_t dpow_getchaintip(struct supernet_info *myinfo,bits256 *merklerootp,bits2 if ( (height= juint(json,"height")) != 0 && (*blocktimep= juint(json,"time")) != 0 ) { *merklerootp = jbits256(json,"merkleroot"); + if ( bits256_nonz(*merklerootp) == 0 ) + printf("block has no merkle? (%s)\n",jprint(json,0)); coin->lastbestheight = height; if ( height > coin->longestchain ) coin->longestchain = height;