Added caching for block chain. Currently set to 10k

This commit is contained in:
obscuren
2015-03-20 15:54:42 +01:00
parent 01ff0b3176
commit deee9cb170
4 changed files with 136 additions and 2 deletions

View File

@ -69,7 +69,7 @@ func printChain(bc *ChainManager) {
func testChain(chainB types.Blocks, bman *BlockProcessor) (*big.Int, error) {
td := new(big.Int)
for _, block := range chainB {
td2, err := bman.bc.processor.Process(block)
td2, _, err := bman.bc.processor.Process(block)
if err != nil {
if IsKnownBlockErr(err) {
continue