mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
eth/protocols/eth: add doc for NewNodeFilter
This commit is contained in:
parent
0113cebed9
commit
77d9ec95f6
1 changed files with 2 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue