diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-20 22:02:50 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-20 22:02:50 +0800 |
commit | 72d065d49102dd07c929d1e147186604c5e4ab05 (patch) | |
tree | db62f3c8eabf88269707eaba69b0755b920df50a /core/chain_manager_test.go | |
parent | 97a9753f87cce4f0072feba63f2e137138a16063 (diff) | |
download | go-tangerine-72d065d49102dd07c929d1e147186604c5e4ab05.tar.gz go-tangerine-72d065d49102dd07c929d1e147186604c5e4ab05.tar.zst go-tangerine-72d065d49102dd07c929d1e147186604c5e4ab05.zip |
core: force block process & fixed chain manager test
Diffstat (limited to 'core/chain_manager_test.go')
-rw-r--r-- | core/chain_manager_test.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index 19afe0d5c..f16c0f0c3 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -69,15 +69,16 @@ 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) + _, err := bman.bc.processor.Process(block) if err != nil { if IsKnownBlockErr(err) { continue } return nil, err } - block.Td = td2 - td = td2 + parent := bman.bc.GetBlock(block.ParentHash()) + block.Td = CalculateTD(block, parent) + td = block.Td bman.bc.mu.Lock() { |