|
|
@ -945,7 +945,7 @@ uint32_t dpow_statemachineiterate(struct supernet_info *myinfo,struct dpow_info |
|
|
|
switch ( bp->state ) |
|
|
|
{ |
|
|
|
case 0: |
|
|
|
if ( (haveutxo= dpow_haveutxo(myinfo,coin,&bp->notaries[myind].prev_hash,&bp->notaries[myind].prev_vout,coinaddr)) != 0 ) |
|
|
|
if ( (haveutxo= dpow_haveutxo(myinfo,coin,&bp->notaries[myind].prev_hash,&bp->notaries[myind].prev_vout,coinaddr)) != 0 && bits256_nonz(bp->notaries[myind].prev_hash) != 0 ) |
|
|
|
bp->state = 1; |
|
|
|
if ( haveutxo < 10 && time(NULL) > dp->lastsplit+600 ) |
|
|
|
{ |
|
|
@ -965,14 +965,11 @@ uint32_t dpow_statemachineiterate(struct supernet_info *myinfo,struct dpow_info |
|
|
|
} |
|
|
|
break; |
|
|
|
case 1: |
|
|
|
if ( (haveutxo= dpow_haveutxo(myinfo,coin,&bp->notaries[myind].prev_hash,&bp->notaries[myind].prev_vout,coinaddr)) != 0 && bp->notaries[myind].prev_vout >= 0 && bp->notaries[myind].prev_vout < 0x100 ) |
|
|
|
{ |
|
|
|
bp->recvmask |= (1LL << myind); |
|
|
|
dpow_lastk_mask(bp,&lastk); |
|
|
|
if ( (len= dpow_rwutxobuf(1,data,&bp->hashmsg,&bp->notaries[myind].prev_hash,&bp->notaries[myind].prev_vout,&bp->commit,bp->notaries[myind].pubkey,&lastk,&bp->recvmask)) > 0 ) |
|
|
|
dpow_send(myinfo,bp,srchash,bp->hashmsg,channel,bp->height,data,len,bp->utxocrcs); |
|
|
|
bp->recvmask |= (1LL << myind); |
|
|
|
bp->state = 2; |
|
|
|
} |
|
|
|
break; |
|
|
|
default: |
|
|
|
dpow_update(myinfo,bp,channel,sigchannel,txidchannel,srchash,myind); |
|
|
|