mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-24 20:37:17 +00:00
eth/downloader: fixed test
This commit is contained in:
parent
f6669db001
commit
cfb2b51b74
@ -81,7 +81,7 @@ func testChain(chainB types.Blocks, bman *BlockProcessor) (*big.Int, error) {
|
||||
return nil, err
|
||||
}
|
||||
parent := bman.bc.GetBlock(block.ParentHash())
|
||||
block.Td = CalculateTD(block, parent)
|
||||
block.Td = CalcTD(block, parent)
|
||||
td = block.Td
|
||||
|
||||
bman.bc.mu.Lock()
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/event"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -67,7 +68,8 @@ func newTester(t *testing.T, hashes []common.Hash, blocks map[common.Hash]*types
|
||||
|
||||
done: make(chan bool),
|
||||
}
|
||||
downloader := New(tester.hasBlock, tester.getBlock)
|
||||
var mux event.TypeMux
|
||||
downloader := New(&mux, tester.hasBlock, tester.getBlock)
|
||||
tester.downloader = downloader
|
||||
|
||||
return tester
|
||||
|
Loading…
Reference in New Issue
Block a user