jl777 8 years ago
parent
commit
3e89f834aa
  1. 9
      iguana/iguana_notary.c

9
iguana/iguana_notary.c

@ -679,7 +679,7 @@ void dpow_rawtxsign(struct supernet_info *myinfo,struct iguana_info *coin,struct
{ {
vins = jduplicate(jobj(txobj,"vin")); vins = jduplicate(jobj(txobj,"vin"));
free_json(txobj); free_json(txobj);
printf("generated vins.(%s)\n",jprint(vins,0)); //printf("generated vins.(%s)\n",jprint(vins,0));
} }
free(rawtx2); free(rawtx2);
} }
@ -694,7 +694,7 @@ void dpow_rawtxsign(struct supernet_info *myinfo,struct iguana_info *coin,struct
if ( ++k >= bp->numnotaries ) if ( ++k >= bp->numnotaries )
k = 0; k = 0;
item = jitem(vins,i); item = jitem(vins,i);
printf("(%s) i.%d of %d, (%d) k.%d bestmask.%llx\n",jprint(item,0),i,n,(bp->height % bp->numnotaries) % bp->numnotaries,k,(long long)bestmask); //printf("(%s) i.%d of %d, (%d) k.%d bestmask.%llx\n",jprint(item,0),i,n,(bp->height % bp->numnotaries) % bp->numnotaries,k,(long long)bestmask);
if ( bits256_nonz(bp->notaries[k].prev_hash) == 0 ) if ( bits256_nonz(bp->notaries[k].prev_hash) == 0 )
{ {
bp->notaries[k].prev_hash = jbits256(item,"txid"); bp->notaries[k].prev_hash = jbits256(item,"txid");
@ -708,9 +708,8 @@ void dpow_rawtxsign(struct supernet_info *myinfo,struct iguana_info *coin,struct
if ( i < n-1 ) if ( i < n-1 )
k++; k++;
} }
if ( k == bestk ) if ( k != bestk )
printf("extracted uxto for bestk.%d %llx\n",bestk,(long long)bestmask); printf("extracted uxto k.%d != bestk.%d\n",k,bestk);
else printf("extracted uxto k.%d != bestk.%d\n",k,bestk);
} }
} }
m = 0; m = 0;

Loading…
Cancel
Save