From 5a286a6fef608ebba63b03673747986ea4fd72ef Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 14 Nov 2016 11:45:26 -0300 Subject: [PATCH] test --- src/komodo.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index 2c8859164..8ef1678af 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -276,7 +276,7 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scriptbuf,int32_t scriptlen,int32_t height,uint256 txhash,int32_t i,int32_t j,uint64_t *voutmaskp,int32_t *specialtxp,int32_t *notarizedheightp,uint64_t value) { - static uint256 zero; int32_t opretlen,nid,len = 0; uint256 kmdtxid,desttxid; uint8_t crypto777[33]; + static uint256 zero; int32_t opretlen,nid,k,len = 0; uint256 kmdtxid,desttxid; uint8_t crypto777[33]; if ( scriptlen == 35 && scriptbuf[0] == 33 && scriptbuf[34] == 0xac ) { decode_hex(crypto777,33,(char *)CRYPTO777_PUBSECPSTR); @@ -344,7 +344,10 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr if ( opretlen >= 32*2+4 && strcmp(ASSETCHAINS_SYMBOL[0]==0?"KMD":ASSETCHAINS_SYMBOL,(char *)&scriptbuf[len+32*2+4]) == 0 ) { iguana_rwbignum(0,&scriptbuf[len],32,(uint8_t *)&kmdtxid); - if ( bits256_nonz(kmdtxid) == 0 ) + for (k=0; k<32; k++) + if ( scriptbuf[len+k] != 0 ) + break; + if ( k == 32 ) { *isratificationp = 1; printf("ISRATIFICATION (%s)\n",(char *)&scriptbuf[len+32*2+4]);