jl777 8 years ago
parent
commit
3592f3f6dc
  1. 2
      iguana/dPoW.h
  2. 4
      iguana/dpow/dpow_tx.c

2
iguana/dPoW.h

@ -22,7 +22,7 @@
#define DPOW_MINSIGS 7 #define DPOW_MINSIGS 7
#define DPOW_M(bp) ((bp)->minsigs) // (((bp)->numnotaries >> 1) + 1) #define DPOW_M(bp) ((bp)->minsigs) // (((bp)->numnotaries >> 1) + 1)
#define DPOW_MODIND(bp,offset) (((((bp)->height / DPOW_CHECKPOINTFREQ) % (bp)->numnotaries) + (offset)) % (bp)->numnotaries) #define DPOW_MODIND(bp,offset) (((((bp)->height / DPOW_CHECKPOINTFREQ) % (bp)->numnotaries) + (offset)) % (bp)->numnotaries)
#define DPOW_VERSION 0x0577 #define DPOW_VERSION 0x0567
#define DPOW_UTXOSIZE 10000 #define DPOW_UTXOSIZE 10000
#define DPOW_MINOUTPUT 6000 #define DPOW_MINOUTPUT 6000
#define DPOW_DURATION 300 #define DPOW_DURATION 300

4
iguana/dpow/dpow_tx.c

@ -15,10 +15,12 @@
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;
if ( nn_senderind < 0 || nn_senderind >= bp->numnotaries ) if ( nn_senderind < 0 || nn_senderind >= bp->numnotaries )
return; return;
bp->notaries[nn_senderind].bestk = nn_bestk; bp->notaries[nn_senderind].bestk = nn_bestk;
bp->notaries[nn_senderind].bestmask = nn_bestmask; bp->notaries[nn_senderind].bestmask = nn_bestmask;
startscore = bp->scores[nn_senderind];
if ( bp->bestk >= 0 ) if ( bp->bestk >= 0 )
{ {
if ( nn_bestk < 0 ) if ( nn_bestk < 0 )
@ -30,6 +32,8 @@ 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 > -100 && bp->scores[nn_senderind] <= -100 )
printf(">>>>>>>>>>>>> nn_senderind.%d %llx MIA, skip this node for now\n",nn_senderind,(long long)(1LL << nn_senderind));
} }
} }

Loading…
Cancel
Save