diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-02-11 22:39:09 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-11 22:39:09 +0800 |
commit | aa9432b8168734aed4e8180eb59f456b0ae2a74c (patch) | |
tree | ad49cf70d6e62c92356b394d013c9f0a24e971d8 /eth/downloader/downloader_test.go | |
parent | 7a0019c63b1297cb5c9a6fdfc4cb00fdae9b05aa (diff) | |
parent | 96dad6b6f6f8db88cca7496665016152272881cb (diff) | |
download | dexon-aa9432b8168734aed4e8180eb59f456b0ae2a74c.tar dexon-aa9432b8168734aed4e8180eb59f456b0ae2a74c.tar.gz dexon-aa9432b8168734aed4e8180eb59f456b0ae2a74c.tar.bz2 dexon-aa9432b8168734aed4e8180eb59f456b0ae2a74c.tar.lz dexon-aa9432b8168734aed4e8180eb59f456b0ae2a74c.tar.xz 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.go | 11 |
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. |