From bc1d085a7ae2745673103696afdebe299143d2ce Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 23 Oct 2016 19:50:16 -0300 Subject: [PATCH] test --- src/komodo.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index 3285c687a..c983fde35 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -424,6 +424,11 @@ int32_t komodo_chosennotary(int32_t *notaryidp,int32_t height,uint8_t *pubkey33) void komodo_notarized_update(int32_t nHeight,int32_t notarized_height,uint256 notarized_hash,uint256 notarized_btctxid) { struct notarized_checkpoint *np; + if ( notarized_height > nHeight ) + { + printf("komodo_notarized_update REJECT notarized_height %d > %d nHeight\n",notarized_height,nHeight); + return; + } NPOINTS = (struct notarized_checkpoint *)realloc(NPOINTS,(NUM_NPOINTS+1) * sizeof(*NPOINTS)); np = &NPOINTS[NUM_NPOINTS++]; memset(np,0,sizeof(*np)); @@ -748,14 +753,14 @@ int32_t komodo_voutupdate(int32_t notaryid,uint8_t *scriptbuf,int32_t scriptlen, //for (k=0; k NOTARIZED_HEIGHT ) + if ( *notarizedheightp > NOTARIZED_HEIGHT && *notarizedheightp < height ) { + printf("ht.%d NOTARIZED.%d KMD.%s BTCTXID.%s (%s)\n",height,*notarizedheightp,kmdtxid.ToString().c_str(),btctxid.ToString().c_str(),(char *)&scriptbuf[len]); NOTARIZED_HEIGHT = *notarizedheightp; NOTARIZED_HASH = kmdtxid; NOTARIZED_BTCTXID = btctxid; komodo_stateupdate(height,0,0,0,zero,0,0,0,0); - } + } else printf("reject ht.%d NOTARIZED.%d KMD.%s BTCTXID.%s (%s)\n",height,*notarizedheightp,kmdtxid.ToString().c_str(),btctxid.ToString().c_str(),(char *)&scriptbuf[len]); } else if ( i == 0 && scriptbuf[len] == 'P' ) {