diff options
Diffstat (limited to 'dex/downloader/fakepeer.go')
-rw-r--r-- | dex/downloader/fakepeer.go | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/dex/downloader/fakepeer.go b/dex/downloader/fakepeer.go index 3e29357ba..f0d596a4b 100644 --- a/dex/downloader/fakepeer.go +++ b/dex/downloader/fakepeer.go @@ -88,7 +88,14 @@ func (p *FakePeer) RequestHeadersByHash(hash common.Hash, amount int, skip int, } } } - p.dl.DeliverHeaders(p.id, headers) + + // TODO(sonic): fix this + var headersWithGovState []*types.HeaderWithGovState + for _, h := range headers { + headersWithGovState = append(headersWithGovState, + &types.HeaderWithGovState{Header: h}) + } + p.dl.DeliverHeaders(p.id, headersWithGovState) return nil } @@ -115,7 +122,13 @@ func (p *FakePeer) RequestHeadersByNumber(number uint64, amount int, skip int, r } headers = append(headers, origin) } - p.dl.DeliverHeaders(p.id, headers) + // TODO(sonic): fix this + var headersWithGovState []*types.HeaderWithGovState + for _, h := range headers { + headersWithGovState = append(headersWithGovState, + &types.HeaderWithGovState{Header: h}) + } + p.dl.DeliverHeaders(p.id, headersWithGovState) return nil } |