jl777 8 years ago
parent
commit
a2296611d1
  1. 4
      iguana/dpow/dpow_fsm.c

4
iguana/dpow/dpow_fsm.c

@ -158,7 +158,7 @@ void dpow_datahandler(struct supernet_info *myinfo,uint32_t channel,uint32_t hei
int32_t dpow_update(struct supernet_info *myinfo,struct dpow_block *bp,uint32_t utxochannel,uint32_t sigchannel,uint32_t txidchannel,bits256 srchash,int32_t myind) int32_t dpow_update(struct supernet_info *myinfo,struct dpow_block *bp,uint32_t utxochannel,uint32_t sigchannel,uint32_t txidchannel,bits256 srchash,int32_t myind)
{ {
struct dpow_entry *ep; int32_t len; uint8_t data[sizeof(*ep)]; struct dpow_entry *ep; int32_t len; bits256 hash; uint8_t data[sizeof(*ep)];
ep = &bp->notaries[myind]; ep = &bp->notaries[myind];
if ( (bp->bestk= dpow_bestk(bp,&bp->bestmask)) >= 0 ) if ( (bp->bestk= dpow_bestk(bp,&bp->bestmask)) >= 0 )
{ {
@ -168,6 +168,8 @@ int32_t dpow_update(struct supernet_info *myinfo,struct dpow_block *bp,uint32_t
} }
else else
{ {
hash = srchash;
hash.uints[0] = rand();
if ( (len= dpow_rwutxobuf(1,data,&bp->hashmsg,&bp->notaries[myind])) > 0 ) if ( (len= dpow_rwutxobuf(1,data,&bp->hashmsg,&bp->notaries[myind])) > 0 )
dpow_send(myinfo,bp,srchash,bp->hashmsg,utxochannel,bp->height,data,len,bp->utxocrcs); dpow_send(myinfo,bp,srchash,bp->hashmsg,utxochannel,bp->height,data,len,bp->utxocrcs);
} }

Loading…
Cancel
Save