downloader: add missing inteface methods in downloader tests

This commit is contained in:
Martin Holst Swende 2018-02-02 22:27:20 +01:00
parent d90c7c1378
commit f10832685c
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -282,6 +282,18 @@ func (dl *downloadTester) CurrentFastBlock() *types.Block {
} }
return dl.genesis 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. // FastSyncCommitHead manually sets the head block to a given hash.
func (dl *downloadTester) FastSyncCommitHead(hash common.Hash) error { func (dl *downloadTester) FastSyncCommitHead(hash common.Hash) error {