diff --git a/iguana/dpow/dpow_fsm.c b/iguana/dpow/dpow_fsm.c index b5742af38..cb88d28d8 100755 --- a/iguana/dpow/dpow_fsm.c +++ b/iguana/dpow/dpow_fsm.c @@ -305,6 +305,8 @@ void dpow_statemachinestart(void *ptr) bp->srccoin = src; bp->destcoin = dest; bp->myind = -1; + for (i=0; inotaries)/sizeof(*bp->notaries); i++) + bp->notaries[i].bestk = -1; bp->opret_symbol = dp->symbol; if ( jsonstr != 0 && (ratified= cJSON_Parse(jsonstr)) != 0 ) { diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index 4647e24d1..2907859ac 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -1838,8 +1838,9 @@ void dpow_notarize_update(struct supernet_info *myinfo,struct dpow_info *dp,stru { //fprintf(stderr,"{%d %x} ",senderind,paxwdcrc); } - if ( (bp->notaries[senderind].bestk= bestk) >= 0 ) + if ( bestk >= 0 || bp->notaries[senderind].bestk < 0 ) { + bp->notaries[senderind].bestk = bestk; if ( (bp->notaries[senderind].src.siglens[bestk]= siglens[0]) != 0 ) { memcpy(bp->notaries[senderind].src.sigs[bestk],sigs[0],siglens[0]);