Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
c31b346832
  1. 2
      iguana/SuperNET.c
  2. 8
      iguana/iguana_tx.c

2
iguana/SuperNET.c

@ -475,7 +475,7 @@ int32_t iguana_send_supernet(struct iguana_info *coin,struct iguana_peer *addr,c
iguana_setkeys(myinfo,addr,&privkey,&pubkey,&destpub,&nextprivkey,&nextpubkey,&nextdestpub); iguana_setkeys(myinfo,addr,&privkey,&pubkey,&destpub,&nextprivkey,&nextpubkey,&nextdestpub);
if ( juint(json,"plaintext") == 0 && juint(json,"broadcast") == 0 && memcmp(destpub.bytes,GENESIS_PUBKEY.bytes,sizeof(pubkey)) == 0 ) if ( juint(json,"plaintext") == 0 && juint(json,"broadcast") == 0 && memcmp(destpub.bytes,GENESIS_PUBKEY.bytes,sizeof(pubkey)) == 0 )
{ {
printf("reject broadcasting non-plaintext! (%s)\n",jsonstr); //getchar(); //printf("reject broadcasting non-plaintext! (%s)\n",jsonstr); //getchar();
free_json(json); free_json(json);
return(-1); return(-1);
} }

8
iguana/iguana_tx.c

@ -218,7 +218,9 @@ int32_t iguana_peerblockrequest(struct iguana_info *coin,uint8_t *blockspace,int
total = iguana_rwblock(1,&checkhash2,&blockspace[sizeof(struct iguana_msghdr) + 0],&msgB); total = iguana_rwblock(1,&checkhash2,&blockspace[sizeof(struct iguana_msghdr) + 0],&msgB);
if ( bits256_cmp(checkhash2,block->RO.hash2) != 0 ) if ( bits256_cmp(checkhash2,block->RO.hash2) != 0 )
{ {
printf("iguana_peerblockrequest: blockhash mismatch ht.%d\n",bp->bundleheight+bundlei); static int counter;
if ( counter++ < 100 )
printf("iguana_peerblockrequest: blockhash mismatch ht.%d\n",bp->bundleheight+bundlei);
return(-1); return(-1);
} }
for (i=0; i<block->RO.txn_count; i++) for (i=0; i<block->RO.txn_count; i++)
@ -229,8 +231,10 @@ int32_t iguana_peerblockrequest(struct iguana_info *coin,uint8_t *blockspace,int
total += len; total += len;
else else
{ {
static int counter;
char str[65],str2[65]; char str[65],str2[65];
printf("error getting txi.%d [%d:%d] cmp.%s %s\n",i,bp->hdrsi,bundlei,bits256_str(str,checktxid),bits256_str(str2,T.txid)); if ( counter++ < 100 )
printf("error getting txi.%d [%d:%d] cmp.%s %s\n",i,bp->hdrsi,bundlei,bits256_str(str,checktxid),bits256_str(str2,T.txid));
break; break;
} }
} }

Loading…
Cancel
Save