mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
downloader: add missing inteface methods in downloader tests
This commit is contained in:
parent
d90c7c1378
commit
f10832685c
1 changed files with 12 additions and 0 deletions
|
|
@ -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 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue