good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
8927f772
Unverified
Commit
8927f772
authored
Oct 31, 2019
by
Péter Szilágyi
Browse files
Options
Downloads
Patches
Plain Diff
cmd/devp2p, core/forkid: make forkid.Filter API uniform
parent
93422e9d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmd/devp2p/nodesetcmd.go
+1
-1
1 addition, 1 deletion
cmd/devp2p/nodesetcmd.go
core/forkid/forkid.go
+2
-2
2 additions, 2 deletions
core/forkid/forkid.go
with
3 additions
and
3 deletions
cmd/devp2p/nodesetcmd.go
+
1
−
1
View file @
8927f772
...
...
@@ -155,7 +155,7 @@ func minAgeFilter(args []string) (nodeFilter, error) {
}
func
ethFilter
(
args
[]
string
)
(
nodeFilter
,
error
)
{
var
filter
func
(
forkid
.
ID
)
erro
r
var
filter
forkid
.
Filte
r
switch
args
[
0
]
{
case
"mainnet"
:
filter
=
forkid
.
NewStaticFilter
(
params
.
MainnetChainConfig
,
params
.
MainnetGenesisHash
)
...
...
This diff is collapsed.
Click to expand it.
core/forkid/forkid.go
+
2
−
2
View file @
8927f772
...
...
@@ -96,7 +96,7 @@ func NewFilter(chain *core.BlockChain) Filter {
}
// NewStaticFilter creates a filter at block zero.
func
NewStaticFilter
(
config
*
params
.
ChainConfig
,
genesis
common
.
Hash
)
func
(
id
ID
)
erro
r
{
func
NewStaticFilter
(
config
*
params
.
ChainConfig
,
genesis
common
.
Hash
)
Filte
r
{
head
:=
func
()
uint64
{
return
0
}
return
newFilter
(
config
,
genesis
,
head
)
}
...
...
@@ -104,7 +104,7 @@ func NewStaticFilter(config *params.ChainConfig, genesis common.Hash) func(id ID
// newFilter is the internal version of NewFilter, taking closures as its arguments
// instead of a chain. The reason is to allow testing it without having to simulate
// an entire blockchain.
func
newFilter
(
config
*
params
.
ChainConfig
,
genesis
common
.
Hash
,
headfn
func
()
uint64
)
func
(
id
ID
)
erro
r
{
func
newFilter
(
config
*
params
.
ChainConfig
,
genesis
common
.
Hash
,
headfn
func
()
uint64
)
Filte
r
{
// Calculate the all the valid fork hash and fork next combos
var
(
forks
=
gatherForks
(
config
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment