From f10832685c78024ebf56e5427a64ec7a1088af3a Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Fri, 2 Feb 2018 22:27:20 +0100 Subject: [PATCH] downloader: add missing inteface methods in downloader tests --- eth/downloader/downloader_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index cb671a7df4..066d8f8094 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -282,6 +282,18 @@ func (dl *downloadTester) CurrentFastBlock() *types.Block { } return dl.genesis } +func (dl *downloadTester) CurrentNumber() uint64 { + return dl.CurrentBlock().NumberU64() +} + +func (dl *downloadTester) CurrentFastNumber() uint64 { + return dl.CurrentFastBlock().NumberU64() +} + +func (dl *downloadTester) CurrentTD() *big.Int { + cur := dl.CurrentBlock() + return dl.GetTd(cur.Hash(), cur.NumberU64()) +} // FastSyncCommitHead manually sets the head block to a given hash. func (dl *downloadTester) FastSyncCommitHead(hash common.Hash) error {