Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

remove old fields consensus and finality #120

Merged
merged 1 commit into from
Jun 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 1 addition & 3 deletions lib/util/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,7 @@ async function parseGethParams (json) {
}
params.hardforks = hardforks.map(name => ({
name: name,
block: name === 'chainstart' ? 0 : json.config[forkMap[name]] || null,
consensus: json.config.clique ? 'poa' : 'pow',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was a bit unsure about the consensus part, since the PoA information is directly extracted from a geth configuration file, but the information is nowhere used within the client so I think it should be safe to remove. Can also be re-added later if necessary, eventually in another context then.

finality: name === 'hybridCasper' ? 'pos' : null
block: name === 'chainstart' ? 0 : json.config[forkMap[name]] || null
}))
return params
}
Expand Down
32 changes: 8 additions & 24 deletions test/util/params.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,43 +22,27 @@
"bootstrapNodes": [],
"hardforks": [{
"name": "chainstart",
"block": 0,
"consensus": "poa",
"finality": null
"block": 0
}, {
"name": "homestead",
"block": 1,
"consensus": "poa",
"finality": null
"block": 1
}, {
"name": "dao",
"block": null,
"consensus": "poa",
"finality": null
"block": null
}, {
"name": "tangerineWhistle",
"block": 2,
"consensus": "poa",
"finality": null
"block": 2
}, {
"name": "spuriousDragon",
"block": 3,
"consensus": "poa",
"finality": null
"block": 3
}, {
"name": "byzantium",
"block": 1035301,
"consensus": "poa",
"finality": null
"block": 1035301
}, {
"name": "constantinople",
"block": null,
"consensus": "poa",
"finality": null
"block": null
}, {
"name": "hybridCasper",
"block": null,
"consensus": "poa",
"finality": "pos"
"block": null
}]
}