Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eth: dial nodes from discv5 #30302

Merged
merged 6 commits into from
Aug 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
eth/protocols/eth: add doc for NewNodeFilter
  • Loading branch information
lightclient committed Aug 15, 2024
commit 77d9ec95f609da2428da558fce237e65227ee933
2 changes: 2 additions & 0 deletions eth/protocols/eth/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ func currentENREntry(chain *core.BlockChain) *enrEntry {
}
}

// NewNodeFilter returns a filtering function that returns whether the provided
// enode advertises a forkid compatible with the current chain.
func NewNodeFilter(chain *core.BlockChain) func(*enode.Node) bool {
filter := forkid.NewFilter(chain)
return func(n *enode.Node) bool {
Expand Down