Browse Source

mor fix

patch-14
blackjok3r 6 years ago
parent
commit
8702a185f4
  1. 2
      iguana/dPoW.h
  2. 1
      iguana/dpow/dpow_fsm.c
  3. 10
      iguana/dpow/dpow_network.c

2
iguana/dPoW.h

@ -116,7 +116,7 @@ struct dpow_block
struct dpow_recvdata recv[64];
struct dpow_entry notaries[DPOW_MAXRELAYS];
uint32_t MoMdepth,state,starttime,timestamp,waiting,sigcrcs[2],txidcrcs[2],utxocrcs[2],lastepoch,paxwdcrc,lastnanosend;
int32_t rawratifiedlens[2],height,numnotaries,numerrors,completed,minsigs,duration,numratified,isratify,require0,scores[DPOW_MAXRELAYS];
int32_t rawratifiedlens[2],height,numnotaries,numerrors,completed,minsigs,duration,numratified,isratify,require0,scores[DPOW_MAXRELAYS],destht_start;
int8_t myind,bestk,ratifybestk,pendingbestk,pendingratifybestk,matches,bestmatches;
cJSON *ratified;
uint16_t CCid;

1
iguana/dpow/dpow_fsm.c

@ -309,6 +309,7 @@ void dpow_statemachinestart(void *ptr)
bp->srccoin = src;
bp->destcoin = dest;
bp->myind = -1;
bp->destht_start = dp->DESTHEIGHT;
for (i=0; i<sizeof(bp->notaries)/sizeof(*bp->notaries); i++)
bp->notaries[i].bestk = -1;
bp->opret_symbol = dp->symbol;

10
iguana/dpow/dpow_network.c

@ -2002,16 +2002,16 @@ void dpow_notarize_update(struct supernet_info *myinfo,struct dpow_info *dp,stru
// check that block has advanced by 1 on KMD before allowing bestmask to be calculated
if ( strcmp(bp->destcoin->symbol,"KMD") != 0 )
if ( strcmp(bp->destcoin->symbol,"KMD") == 0 )
{
fprintf(stderr, "X->KMD: checkpoint ht.%i vs longestchain.%i\n", bp->height, bp->srccoin->longestchain);
if ( bp->height == bp->srccoin->longestchain )
fprintf(stderr, "X->KMD: checkpoint ht.%i vs longestchain.%i\n", bp->destht_start, bp->destcoin->longestchain);
if ( bp->destht_start == bp->destcoin->longestchain )
return;
}
else
{
fprintf(stderr, "KMD->BTC: checkpoint ht.%i vs longestchain.%i\n", bp->height, bp->destcoin->longestchain);
if ( bp->height == bp->destcoin->longestchain )
fprintf(stderr, "KMD->BTC: checkpoint ht.%i vs longestchain.%i\n", bp->height , bp->srccoin->longestchain);
if ( bp->height == bp->srccoin->longestchain )
return;
}

Loading…
Cancel
Save