diff --git a/iguana/iguana_notary.c b/iguana/iguana_notary.c index bb2f26606..be0feb90b 100755 --- a/iguana/iguana_notary.c +++ b/iguana/iguana_notary.c @@ -371,7 +371,7 @@ int32_t dpow_message_utxo(bits256 *hashmsgp,bits256 *txidp,int32_t *voutp,cJSON int32_t dpow_message_most(uint8_t *k_masks,int32_t num,cJSON *json,int32_t lastflag) { - cJSON *msgobj,*item; uint8_t key[BASILISK_KEYSIZE],data[128]; char *keystr,*hexstr; int32_t duplicate,i,j,n,datalen,most = 0; + cJSON *msgobj,*item; uint8_t key[BASILISK_KEYSIZE],data[512]; char *keystr,*hexstr; int32_t duplicate,i,j,n,datalen,most = 0; if ( (msgobj= jarray(&n,json,"messages")) != 0 ) { for (i=0; i>= 1; - if ( datalen < sizeof(data) ) + if ( datalen <= sizeof(data) ) { decode_hex(data,datalen,hexstr); for (j=duplicate=0; j= maxlen.%d\n",datalen,(int32_t)sizeof(data)); @@ -699,7 +700,7 @@ int32_t dpow_mostsignedtx(struct supernet_info *myinfo,struct dpow_info *dp,stru srchash.bytes[j] = notaries[i].pubkey[j+1]; if ( (retarray= basilisk_channelget(myinfo,srchash,desthash,channel,height,0)) != 0 ) { - printf("RETARRAY.(%s)\n",jprint(retarray,0)); + //printf("RETARRAY.(%s)\n",jprint(retarray,0)); if ( (m= cJSON_GetArraySize(retarray)) != 0 ) { for (k=0; k