Browse Source

test minconfirms

release/v0.1
jl777 8 years ago
parent
commit
a48ce33f6f
  1. 0
      iguana/coins/genanc
  2. 0
      iguana/coins/genanc.json
  3. 2
      iguana/coins/genbtcd
  4. 0
      iguana/coins/genbtm
  5. 0
      iguana/coins/genbtm.json
  6. 0
      iguana/coins/gencarb
  7. 0
      iguana/coins/gencarb.json
  8. 0
      iguana/coins/genfrk
  9. 0
      iguana/coins/genfrk.json
  10. 0
      iguana/coins/genvia
  11. 2
      iguana/iguana_chains.c
  12. 4
      iguana/iguana_realtime.c
  13. 4
      iguana/iguana_spendvectors.c
  14. 2
      iguana/iguana_tx.c
  15. 0
      iguana/tests/json_extract.c
  16. 0
      iguana/tests/json_extracta.c
  17. 0
      iguana/tests/json_extractd.c
  18. 0
      iguana/tests/json_extracti.c
  19. 0
      iguana/tests/jsoncmp.c
  20. 0
      iguana/tests/peers.txt
  21. 0
      iguana/tests/txdata

0
iguana/coins/genanc

0
iguana/coins/genanc.json

2
iguana/coins/genbtcd

@ -1 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"prefetchlag\":11,\"poll\":50,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTCD\",\"startpend\":64,\"endpend\":64,\"services\":129,\"maxpeers\":512,\"RELAY\":1,\"VALIDATE\":1,\"portp2p\":14631,\"rpc\":14632}"
curl --url "http://127.0.0.1:7778" --data "{\"prefetchlag\":11,\"poll\":50,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTCD\",\"startpend\":64,\"endpend\":64,\"services\":129,\"maxpeers\":512,\"RELAY\":1,\"VALIDATE\":1,\"portp2p\":14631,\"rpc\":14632,\"minconfirms\":7}"

0
iguana/coins/genbtm

0
iguana/coins/genbtm.json

0
iguana/coins/gencarb

0
iguana/coins/gencarb.json

0
iguana/coins/genfrk

0
iguana/coins/genfrk.json

0
iguana/coins/genvia

2
iguana/iguana_chains.c

@ -385,7 +385,7 @@ void iguana_chainparms(struct supernet_info *myinfo,struct iguana_chain *chain,c
decode_hex((uint8_t *)&chain->wiftype,1,hexstr);
}
}
printf("addrtypes.(%02x %02x %02x) (%d %d %d)\n",chain->pubtype,chain->p2shtype,chain->wiftype,chain->pubtype,chain->p2shtype,chain->wiftype);
printf("MINCONFIRMS.%d addrtypes.(%02x %02x %02x) (%d %d %d)\n",chain->minconfirms,chain->pubtype,chain->p2shtype,chain->wiftype,chain->pubtype,chain->p2shtype,chain->wiftype);
if ( (hexstr= jstr(argjson,"netmagic")) != 0 && strlen(hexstr) == 8 )
decode_hex((uint8_t *)chain->netmagic,4,hexstr);
if ( (hexstr= jstr(argjson,"unitval")) != 0 && strlen(hexstr) == 2 )

4
iguana/iguana_realtime.c

@ -768,9 +768,9 @@ void iguana_RTnewblock(struct supernet_info *myinfo,struct iguana_info *coin,str
iguana_RTbalance_verify("start iterate",coin);
if ( strcmp(coin->symbol,"BTC") != 0 && strcmp(coin->symbol,"LTC") != 0 )
{
if ( block->height < coin->firstRTheight+2 )
if ( block->height < coin->firstRTheight+coin->minconfirms )
return;
if ( (block= iguana_blockfind("RTnew",coin,iguana_blockhash(coin,block->height-2))) == 0 )
if ( (block= iguana_blockfind("RTnew",coin,iguana_blockhash(coin,block->height-coin->minconfirms))) == 0 )
return;
}
if ( block->height < coin->firstRTheight || block->height >= coin->firstRTheight+sizeof(coin->RTblocks)/sizeof(*coin->RTblocks) )

4
iguana/iguana_spendvectors.c

@ -1140,7 +1140,7 @@ int32_t iguana_bundlevalidate(struct supernet_info *myinfo,struct iguana_info *c
if ( (len= iguana_peerblockrequest(myinfo,coin,blockspace,max,0,bp->hashes[i],1)) < 0 )
{
errs++;
printf("bundlevalidate: delete [%d:%d]\n",bp->hdrsi,i);
printf("bundlevalidate: %s delete [%d:%d]\n",coin->symbol,bp->hdrsi,i);
iguana_blockunmark(coin,bp->blocks[i],bp,i,1);
totalerrs++;
}
@ -1151,7 +1151,7 @@ int32_t iguana_bundlevalidate(struct supernet_info *myinfo,struct iguana_info *c
}
}
free(blockspace);
printf("VALIDATED.[%d] ht.%d duration.%d errs.%d total.%lld %u | total errs.%d validated.%d %llx\n",bp->hdrsi,bp->bundleheight,(uint32_t)time(NULL) - now,errs,(long long)total,bp->validated,totalerrs,totalvalidated,(long long)validatehash.txid);
printf("%s VALIDATED.[%d] ht.%d duration.%d errs.%d total.%lld %u | total errs.%d validated.%d %llx\n",coin->symbol,bp->hdrsi,bp->bundleheight,(uint32_t)time(NULL) - now,errs,(long long)total,bp->validated,totalerrs,totalvalidated,(long long)validatehash.txid);
if ( totalerrs == 0 )
bp->validated = (uint32_t)time(NULL);
else bp->startutxo = bp->utxofinish = 0;

2
iguana/iguana_tx.c

@ -337,7 +337,7 @@ int32_t iguana_peerblockrequest(struct supernet_info *myinfo,struct iguana_info
//printf("validated.[%d:%d] len.%d\n",bp->hdrsi,bundlei,total);
return(total);
}
} else printf("iguana_peerblockrequest: error merkle cmp tx.[%d] for ht.%d\n",i,bp->bundleheight+bundlei);
} else printf("iguana_peerblockrequest: %s error merkle cmp tx.[%d] for ht.%d\n",coin->symbol,i,bp->bundleheight+bundlei);
} else printf("iguana_peerblockrequest: error merkle verify tx.[%d] for ht.%d\n",i,bp->bundleheight+bundlei);
} else printf("%s iguana_peerblockrequest: error getting tx.[%d] for ht.%d block.%p main.%d ht.%d\n",coin->symbol,i,bp->bundleheight+bundlei,block,block!=0?block->mainchain:-1,block!=0?block->height:-1);
}

0
iguana/tests/json_extract.c

0
iguana/tests/json_extracta.c

0
iguana/tests/json_extractd.c

0
iguana/tests/json_extracti.c

0
iguana/tests/jsoncmp.c

0
iguana/tests/peers.txt

0
iguana/tests/txdata

Loading…
Cancel
Save