From 7974e977adb025181b8a9a3f9cf613b0b3aa55fc Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 16 Mar 2018 23:57:56 +0200 Subject: [PATCH] Test --- iguana/dpow/dpow_fsm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iguana/dpow/dpow_fsm.c b/iguana/dpow/dpow_fsm.c index a61eac335..0bfe1f3ef 100755 --- a/iguana/dpow/dpow_fsm.c +++ b/iguana/dpow/dpow_fsm.c @@ -256,7 +256,7 @@ bits256 dpow_calcMoM(uint32_t *MoMdepthp,struct supernet_info *myinfo,struct igu merkles = calloc(maxdepth,sizeof(*merkles)); merkles[MoMdepth++] = merkle; ht = height - MoMdepth; - while ( MoMdepth < maxdepth && MoMdepth < height && ht >= breakht ) + while ( MoMdepth < maxdepth && ht >= breakht && ht > 0 ) { blockhash = dpow_getblockhash(myinfo,coin,ht); if ( (blockjson= dpow_getblock(myinfo,coin,blockhash)) != 0 ) @@ -300,6 +300,7 @@ bits256 dpow_calcMoM(uint32_t *MoMdepthp,struct supernet_info *myinfo,struct igu } else printf("%s.ht%d null merkles\n",coin->symbol,height); } else printf("%s.ht%d null block\n",coin->symbol,height); *MoMdepthp = MoMdepth; + printf("done MoM calc %s height.%d MoMdepth.%d\n",coin->symbol,height,MoMdepth); return(MoM); }