|
@ -13,6 +13,8 @@ |
|
|
* * |
|
|
* * |
|
|
******************************************************************************/ |
|
|
******************************************************************************/ |
|
|
|
|
|
|
|
|
|
|
|
#define DPOW_BLACKLIST -100000 |
|
|
|
|
|
|
|
|
void dpow_bestmask_update(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow_block *bp,uint8_t nn_senderind,int8_t nn_bestk,uint64_t nn_bestmask) |
|
|
void dpow_bestmask_update(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow_block *bp,uint8_t nn_senderind,int8_t nn_bestk,uint64_t nn_bestmask) |
|
|
{ |
|
|
{ |
|
|
int32_t startscore; |
|
|
int32_t startscore; |
|
@ -32,7 +34,7 @@ void dpow_bestmask_update(struct supernet_info *myinfo,struct dpow_info *dp,stru |
|
|
else if ( bp->scores[nn_senderind] < 1 ) |
|
|
else if ( bp->scores[nn_senderind] < 1 ) |
|
|
bp->scores[nn_senderind] = 1; |
|
|
bp->scores[nn_senderind] = 1; |
|
|
else bp->scores[nn_senderind]++; |
|
|
else bp->scores[nn_senderind]++; |
|
|
if ( startscore > -1000000 && bp->scores[nn_senderind] <= -1000000 ) |
|
|
if ( startscore > DPOW_BLACKLIST && bp->scores[nn_senderind] <= DPOW_BLACKLIST ) |
|
|
printf(">>>>>>>>>>>>> nn_senderind.%d %llx MIA, skip this node for now\n",nn_senderind,(long long)(1LL << nn_senderind)); |
|
|
printf(">>>>>>>>>>>>> nn_senderind.%d %llx MIA, skip this node for now\n",nn_senderind,(long long)(1LL << nn_senderind)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -45,7 +47,7 @@ uint64_t dpow_lastk_mask(struct dpow_block *bp,int8_t *lastkp) |
|
|
for (j=0; j<bp->numnotaries; j++) |
|
|
for (j=0; j<bp->numnotaries; j++) |
|
|
{ |
|
|
{ |
|
|
k = DPOW_MODIND(bp,j); |
|
|
k = DPOW_MODIND(bp,j); |
|
|
if ( (bp->require0 == 0 || k != 0) && bp->scores[k] < -1000000 ) |
|
|
if ( (bp->require0 == 0 || k != 0) && bp->scores[k] < DPOW_BLACKLIST ) |
|
|
continue; |
|
|
continue; |
|
|
if ( bits256_nonz(bp->notaries[k].src.prev_hash) != 0 && bits256_nonz(bp->notaries[k].dest.prev_hash) != 0 ) |
|
|
if ( bits256_nonz(bp->notaries[k].src.prev_hash) != 0 && bits256_nonz(bp->notaries[k].dest.prev_hash) != 0 ) |
|
|
{ |
|
|
{ |
|
@ -80,7 +82,7 @@ uint64_t dpow_maskmin(uint64_t refmask,struct dpow_block *bp,int8_t *lastkp) |
|
|
for (j=0; j<bp->numnotaries; j++) |
|
|
for (j=0; j<bp->numnotaries; j++) |
|
|
{ |
|
|
{ |
|
|
k = DPOW_MODIND(bp,j); |
|
|
k = DPOW_MODIND(bp,j); |
|
|
if ( (bp->require0 == 0 || k != 0) && bp->scores[k] < -1000000 ) |
|
|
if ( (bp->require0 == 0 || k != 0) && bp->scores[k] < DPOW_BLACKLIST ) |
|
|
continue; |
|
|
continue; |
|
|
if ( bits256_nonz(bp->notaries[k].src.prev_hash) != 0 && bits256_nonz(bp->notaries[k].dest.prev_hash) != 0 ) |
|
|
if ( bits256_nonz(bp->notaries[k].src.prev_hash) != 0 && bits256_nonz(bp->notaries[k].dest.prev_hash) != 0 ) |
|
|
{ |
|
|
{ |
|
|