Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Akohjesse committed Nov 22, 2024
1 parent c44d923 commit 22a0fd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eth/fetcher/block_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,9 @@ func (f *BlockFetcher) loop() {
case res := <-resCh:
res.Done <- nil
f.FilterHeaders(peer, *res.Res.(*eth.BlockHeadersRequest), time.Now(), announcedAt)
log.Error("peer", "this is the peer id", peer)
// begin plugeth injection
pluginPeerEval(peer, *res.Res.(*eth.BlockHeadersRequest))
// end plugeth injection

case <-timeout.C:
// The peer didn't respond in time. The request
Expand Down
2 changes: 2 additions & 0 deletions eth/fetcher/xplugeth_hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ package fetcher

import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
"github.com/openrelayxyz/xplugeth"
"github.com/openrelayxyz/xplugeth/hooks/blockchain"
)

func pluginPeerEval(id string, headers []*types.Header) {
log.Error("peer", "peer id", id)
for _, m := range xplugeth.GetModules[blockchain.PeerEvalPlugin]() {
m.PeerEval(id, headers)
}
Expand Down

0 comments on commit 22a0fd4

Please sign in to comment.