Skip to content

Commit 5cd9f5d

Browse files
committed
peerEval
1 parent f0ef135 commit 5cd9f5d

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

eth/downloader/queue.go

-4
Original file line numberDiff line numberDiff line change
@@ -720,10 +720,6 @@ func (q *queue) DeliverHeaders(id string, headers []*types.Header, hashes []comm
720720
q.lock.Lock()
721721
defer q.lock.Unlock()
722722

723-
//begin PluGeth code injection
724-
pluginPeerEval(id, headers, hashes)
725-
//end PluGeth code injection
726-
727723
var logger log.Logger
728724
if len(id) < 16 {
729725
// Tests use short IDs, don't choke on them

eth/fetcher/block_fetcher.go

+1
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ func (f *BlockFetcher) loop() {
515515
select {
516516
case res := <-resCh:
517517
res.Done <- nil
518+
pluginPeerEval(peer, *res.Res.(*eth.BlockHeadersRequest))
518519
f.FilterHeaders(peer, *res.Res.(*eth.BlockHeadersRequest), time.Now(), announcedAt)
519520

520521
case <-timeout.C:
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
package downloader
1+
package fetcher
22

33
import (
4-
"github.com/ethereum/go-ethereum/common"
54
"github.com/ethereum/go-ethereum/core/types"
65
"github.com/openrelayxyz/xplugeth"
76
"github.com/openrelayxyz/xplugeth/hooks/blockchain"
87
)
98

10-
func pluginPeerEval(id string, headers []*types.Header, hashes []common.Hash) {
9+
func pluginPeerEval(id string, headers []*types.Header) {
1110
for _, m := range xplugeth.GetModules[blockchain.PeerEvalPlugin]() {
12-
m.PeerEval(id, headers, hashes)
11+
m.PeerEval(id, headers)
1312
}
1413
}

0 commit comments

Comments
 (0)