aboutsummaryrefslogtreecommitdiffstats
path: root/eth/downloader/downloader_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-02-11 22:39:09 +0800
committerGitHub <noreply@github.com>2018-02-11 22:39:09 +0800
commitaa9432b8168734aed4e8180eb59f456b0ae2a74c (patch)
treead49cf70d6e62c92356b394d013c9f0a24e971d8 /eth/downloader/downloader_test.go
parent7a0019c63b1297cb5c9a6fdfc4cb00fdae9b05aa (diff)
parent96dad6b6f6f8db88cca7496665016152272881cb (diff)
downloaddexon-aa9432b8168734aed4e8180eb59f456b0ae2a74c.tar.gz
dexon-aa9432b8168734aed4e8180eb59f456b0ae2a74c.tar.zst
dexon-aa9432b8168734aed4e8180eb59f456b0ae2a74c.zip
Merge pull request #16061 from karalabe/downloader-nostate-ancestor-lookup
eth/downloader: don't require state for ancestor lookups
Diffstat (limited to 'eth/downloader/downloader_test.go')
-rw-r--r--eth/downloader/downloader_test.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go
index d94d55f11..cb671a7df 100644
--- a/eth/downloader/downloader_test.go
+++ b/eth/downloader/downloader_test.go
@@ -221,14 +221,9 @@ func (dl *downloadTester) HasHeader(hash common.Hash, number uint64) bool {
return dl.GetHeaderByHash(hash) != nil
}
-// HasBlockAndState checks if a block and associated state is present in the testers canonical chain.
-func (dl *downloadTester) HasBlockAndState(hash common.Hash, number uint64) bool {
- block := dl.GetBlockByHash(hash)
- if block == nil {
- return false
- }
- _, err := dl.stateDb.Get(block.Root().Bytes())
- return err == nil
+// HasBlock checks if a block is present in the testers canonical chain.
+func (dl *downloadTester) HasBlock(hash common.Hash, number uint64) bool {
+ return dl.GetBlockByHash(hash) != nil
}
// GetHeader retrieves a header from the testers canonical chain.