|
|
@ -854,11 +854,14 @@ void dpow_channelget(struct supernet_info *myinfo,struct dpow_block *bp,uint32_t |
|
|
|
|
|
|
|
int32_t dpow_update(struct supernet_info *myinfo,struct dpow_block *bp,uint32_t channel,uint32_t sigchannel,uint32_t txidchannel,bits256 srchash,int32_t myind) |
|
|
|
{ |
|
|
|
uint64_t mask; int32_t len; int8_t lastk; uint8_t data[4096]; struct dpow_entry *ep; |
|
|
|
uint64_t mask; int32_t i,len; int8_t lastk; uint8_t data[4096]; struct dpow_entry *ep; |
|
|
|
ep = &bp->notaries[myind]; |
|
|
|
mask = dpow_lastk_mask(bp,&lastk); |
|
|
|
len = dpow_rwutxobuf(1,data,&bp->hashmsg,&bp->notaries[myind].prev_hash,&bp->notaries[myind].prev_vout,&bp->commit,myinfo->DPOW.minerkey33,&lastk,&mask); |
|
|
|
dpow_send(myinfo,bp,srchash,bp->hashmsg,channel,bp->height,data,len,bp->utxocrcs); |
|
|
|
for (i=0; i<bp->numnotaries; i++) |
|
|
|
{ |
|
|
|
len = dpow_rwutxobuf(1,data,&bp->hashmsg,&bp->notaries[myind].prev_hash,&bp->notaries[myind].prev_vout,&bp->commit,bp->notaries[i].pubkey,&lastk,&mask); |
|
|
|
dpow_send(myinfo,bp,srchash,bp->hashmsg,channel,bp->height,data,len,bp->utxocrcs); |
|
|
|
} |
|
|
|
dpow_channelget(myinfo,bp,channel); |
|
|
|
bp->bestk = dpow_bestk(bp,&bp->bestmask); |
|
|
|
if ( bp->bestk >= 0 ) |
|
|
|