Skip to content

Commit

Permalink
eth/downloader: fix case in downloader_test
Browse files Browse the repository at this point in the history
  • Loading branch information
buddh0 committed Sep 13, 2024
1 parent ec96477 commit 10b714a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions eth/downloader/downloader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,12 @@ type downloadTesterPeer struct {
func (dlp *downloadTesterPeer) MarkLagging() {
}

// Head constructs a function to retrieve a peer's current head hash
// and total difficulty.
func (dlp *downloadTesterPeer) Head() (common.Hash, *big.Int) {
// Head constructs a function to retrieve a peer's current head hash,
// justifiedNumber and total difficulty.
func (dlp *downloadTesterPeer) Head() (common.Hash, *uint64, *big.Int) {
head := dlp.chain.CurrentBlock()
return head.Hash(), dlp.chain.GetTd(head.Hash(), head.Number.Uint64())
justifiedNumber := dlp.chain.GetJustifiedNumber(head)
return head.Hash(), &justifiedNumber, dlp.chain.GetTd(head.Hash(), head.Number.Uint64())
}

func unmarshalRlpHeaders(rlpdata []rlp.RawValue) []*types.Header {
Expand Down

0 comments on commit 10b714a

Please sign in to comment.