|
@ -408,9 +408,9 @@ void dpow_statemachinestart(void *ptr) |
|
|
{ |
|
|
{ |
|
|
myind = i; |
|
|
myind = i; |
|
|
ep = &bp->notaries[myind]; |
|
|
ep = &bp->notaries[myind]; |
|
|
for (j=0; j<33; j++) |
|
|
//for (j=0; j<33; j++)
|
|
|
printf("%02x",dp->minerkey33[j]); |
|
|
// printf("%02x",dp->minerkey33[j]);
|
|
|
printf(" MYIND.%d <<<<<<<<<<<<<<<<<<<<<<\n",myind); |
|
|
//printf(" MYIND.%d <<<<<<<<<<<<<<<<<<<<<<\n",myind);
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if ( strcmp("KMD",src->symbol) == 0 ) |
|
|
if ( strcmp("KMD",src->symbol) == 0 ) |
|
@ -426,7 +426,7 @@ void dpow_statemachinestart(void *ptr) |
|
|
exit(-1); |
|
|
exit(-1); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
printf("myind.%d\n",myind); |
|
|
//printf("myind.%d\n",myind);
|
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
@ -437,10 +437,6 @@ void dpow_statemachinestart(void *ptr) |
|
|
} |
|
|
} |
|
|
bp->myind = myind; |
|
|
bp->myind = myind; |
|
|
printf("[%d] notarize %s->%s %s ht.%d minsigs.%d duration.%d start.%u MoM[%d] %s\n",bp->myind,dp->symbol,dp->dest,bits256_str(str,checkpoint.blockhash.hash),checkpoint.blockhash.height,minsigs,duration,checkpoint.timestamp,bp->MoMdepth,bits256_str(str2,bp->MoM)); |
|
|
printf("[%d] notarize %s->%s %s ht.%d minsigs.%d duration.%d start.%u MoM[%d] %s\n",bp->myind,dp->symbol,dp->dest,bits256_str(str,checkpoint.blockhash.hash),checkpoint.blockhash.height,minsigs,duration,checkpoint.timestamp,bp->MoMdepth,bits256_str(str2,bp->MoM)); |
|
|
{ |
|
|
|
|
|
if ( strcmp(dp->symbol,"CHIPS") == 0 && bp->myind == 0 ) |
|
|
|
|
|
dpow_signedtxgen(myinfo,dp,src,bp,bp->myind,1LL<<bp->myind,bp->myind,DPOW_SIGCHANNEL,0,0); |
|
|
|
|
|
} |
|
|
|
|
|
if ( bp->isratify != 0 && memcmp(bp->notaries[0].pubkey,bp->ratified_pubkeys[0],33) != 0 ) |
|
|
if ( bp->isratify != 0 && memcmp(bp->notaries[0].pubkey,bp->ratified_pubkeys[0],33) != 0 ) |
|
|
{ |
|
|
{ |
|
|
for (i=0; i<33; i++) |
|
|
for (i=0; i<33; i++) |
|
@ -490,6 +486,13 @@ void dpow_statemachinestart(void *ptr) |
|
|
bp->notaries[myind].ratifydestvout = ep->dest.prev_vout; |
|
|
bp->notaries[myind].ratifydestvout = ep->dest.prev_vout; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
if ( strcmp(dp->symbol,"CHIPS") == 0 && myind == 0 ) |
|
|
|
|
|
{ |
|
|
|
|
|
char str[65]; |
|
|
|
|
|
printf(">>>>>>> CHIPS myind.%d %s/v%d\n",myind,bits256_str(str,bp->notaries[myind].src.prev_hash),bp->notaries[myind].src.prev_vout); |
|
|
|
|
|
bp->desttxid = bp->notaries[myind].src.prev_hash; |
|
|
|
|
|
dpow_signedtxgen(myinfo,dp,src,bp,bp->myind,1LL<<bp->myind,bp->myind,DPOW_SIGCHANNEL,0,0); |
|
|
|
|
|
} |
|
|
bp->recvmask |= (1LL << myind); |
|
|
bp->recvmask |= (1LL << myind); |
|
|
bp->notaries[myind].othermask |= (1LL << myind); |
|
|
bp->notaries[myind].othermask |= (1LL << myind); |
|
|
dp->checkpoint = checkpoint; |
|
|
dp->checkpoint = checkpoint; |
|
|