|
@ -223,9 +223,10 @@ void dpow_statemachinestart(void *ptr) |
|
|
{ |
|
|
{ |
|
|
item = jitem(ratified,i); |
|
|
item = jitem(ratified,i); |
|
|
hexstr = handle = 0; |
|
|
hexstr = handle = 0; |
|
|
if ( (hexstr= jstr(item,"pubkey")) != 0 && is_hexstr(hexstr,0) == 66 && (handle= jstr(item,"handle")) != 0 ) |
|
|
if ( (hexstr= jstr(item,"pubkey")) != 0 && is_hexstr(hexstr,0) == 66 ) |
|
|
{ |
|
|
{ |
|
|
decode_hex(bp->ratified_pubkeys[i],33,hexstr); |
|
|
decode_hex(bp->ratified_pubkeys[i],33,hexstr); |
|
|
|
|
|
if ( (handle= jstr(item,"handle")) != 0 ) |
|
|
safecopy(bp->handles[i],handle,sizeof(bp->handles[i])); |
|
|
safecopy(bp->handles[i],handle,sizeof(bp->handles[i])); |
|
|
if ( i == 0 ) |
|
|
if ( i == 0 ) |
|
|
{ |
|
|
{ |
|
@ -303,7 +304,12 @@ void dpow_statemachinestart(void *ptr) |
|
|
} |
|
|
} |
|
|
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 ) |
|
|
{ |
|
|
{ |
|
|
printf("cant change notary0\n"); |
|
|
for (i=0; i<33; i++) |
|
|
|
|
|
printf("%02x",bp->notaries[0].pubkey[i]); |
|
|
|
|
|
printf(" current vs "); |
|
|
|
|
|
for (i=0; i<33; i++) |
|
|
|
|
|
printf("%02x",bp->ratified_pubkeys[0][i]); |
|
|
|
|
|
printf(" new, cant change notary0\n"); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
printf(" myind.%d myaddr.(%s %s)\n",myind,srcaddr,destaddr); |
|
|
printf(" myind.%d myaddr.(%s %s)\n",myind,srcaddr,destaddr); |
|
|