mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-13 07:23:46 +00:00
Merge pull request #513 from maticnetwork/qa-flag-requiredblocks
Changed 'requiredblocks' flag back to 'eth.requiredblocks'
This commit is contained in:
commit
0969781eb5
10 changed files with 8 additions and 16 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -168,7 +168,7 @@ jobs:
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
cd matic-cli/devnet
|
cd matic-cli/devnet
|
||||||
docker compose down
|
docker compose down --remove-orphans
|
||||||
cd -
|
cd -
|
||||||
mkdir -p ${{ github.run_id }}/matic-cli
|
mkdir -p ${{ github.run_id }}/matic-cli
|
||||||
sudo mv bor ${{ github.run_id }}
|
sudo mv bor ${{ github.run_id }}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ syncmode = "full"
|
||||||
# snapshot = true
|
# snapshot = true
|
||||||
# ethstats = ""
|
# ethstats = ""
|
||||||
|
|
||||||
# [requiredblocks]
|
# ["eth.requiredblocks"]
|
||||||
|
|
||||||
[p2p]
|
[p2p]
|
||||||
# maxpeers = 1
|
# maxpeers = 1
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@ gcmode = "full"
|
||||||
snapshot = true
|
snapshot = true
|
||||||
ethstats = ""
|
ethstats = ""
|
||||||
|
|
||||||
|
["eth.requiredblocks"]
|
||||||
|
|
||||||
[p2p]
|
[p2p]
|
||||||
maxpeers = 30
|
maxpeers = 30
|
||||||
maxpendpeers = 50
|
maxpendpeers = 50
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ func TestFlags(t *testing.T) {
|
||||||
"--dev.period", "2",
|
"--dev.period", "2",
|
||||||
"--datadir", "./data",
|
"--datadir", "./data",
|
||||||
"--maxpeers", "30",
|
"--maxpeers", "30",
|
||||||
"--requiredblocks", "a=b",
|
"--eth.requiredblocks", "a=b",
|
||||||
"--http.api", "eth,web3,bor",
|
"--http.api", "eth,web3,bor",
|
||||||
}
|
}
|
||||||
err := c.extractFlags(args)
|
err := c.extractFlags(args)
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ type Config struct {
|
||||||
Identity string `hcl:"identity,optional" toml:"identity,optional"`
|
Identity string `hcl:"identity,optional" toml:"identity,optional"`
|
||||||
|
|
||||||
// RequiredBlocks is a list of required (block number, hash) pairs to accept
|
// RequiredBlocks is a list of required (block number, hash) pairs to accept
|
||||||
RequiredBlocks map[string]string `hcl:"requiredblocks,optional" toml:"requiredblocks,optional"`
|
RequiredBlocks map[string]string `hcl:"eth.requiredblocks,optional" toml:"eth.requiredblocks,optional"`
|
||||||
|
|
||||||
// LogLevel is the level of the logs to put out
|
// LogLevel is the level of the logs to put out
|
||||||
LogLevel string `hcl:"log-level,optional" toml:"log-level,optional"`
|
LogLevel string `hcl:"log-level,optional" toml:"log-level,optional"`
|
||||||
|
|
|
||||||
|
|
@ -108,9 +108,6 @@ func TestConfigLoadFile(t *testing.T) {
|
||||||
|
|
||||||
assert.Equal(t, config, &Config{
|
assert.Equal(t, config, &Config{
|
||||||
DataDir: "./data",
|
DataDir: "./data",
|
||||||
RequiredBlocks: map[string]string{
|
|
||||||
"a": "b",
|
|
||||||
},
|
|
||||||
P2P: &P2PConfig{
|
P2P: &P2PConfig{
|
||||||
MaxPeers: 30,
|
MaxPeers: 30,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Default: c.cliConfig.GcMode,
|
Default: c.cliConfig.GcMode,
|
||||||
})
|
})
|
||||||
f.MapStringFlag(&flagset.MapStringFlag{
|
f.MapStringFlag(&flagset.MapStringFlag{
|
||||||
Name: "requiredblocks",
|
Name: "eth.requiredblocks",
|
||||||
Usage: "Comma separated block number-to-hash mappings to enforce (<number>=<hash>)",
|
Usage: "Comma separated block number-to-hash mappings to enforce (<number>=<hash>)",
|
||||||
Value: &c.cliConfig.RequiredBlocks,
|
Value: &c.cliConfig.RequiredBlocks,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
4
internal/cli/server/testdata/test.hcl
vendored
4
internal/cli/server/testdata/test.hcl
vendored
|
|
@ -1,9 +1,5 @@
|
||||||
datadir = "./data"
|
datadir = "./data"
|
||||||
|
|
||||||
requiredblocks = {
|
|
||||||
a = "b"
|
|
||||||
}
|
|
||||||
|
|
||||||
p2p {
|
p2p {
|
||||||
maxpeers = 30
|
maxpeers = 30
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
internal/cli/server/testdata/test.json
vendored
3
internal/cli/server/testdata/test.json
vendored
|
|
@ -1,8 +1,5 @@
|
||||||
{
|
{
|
||||||
"datadir": "./data",
|
"datadir": "./data",
|
||||||
"requiredblocks": {
|
|
||||||
"a": "b"
|
|
||||||
},
|
|
||||||
"p2p": {
|
"p2p": {
|
||||||
"maxpeers": 30
|
"maxpeers": 30
|
||||||
},
|
},
|
||||||
|
|
|
||||||
2
internal/cli/server/testdata/test.toml
vendored
2
internal/cli/server/testdata/test.toml
vendored
|
|
@ -1,6 +1,6 @@
|
||||||
datadir = "./data"
|
datadir = "./data"
|
||||||
|
|
||||||
[requiredblocks]
|
["eth.requiredblocks"]
|
||||||
a = "b"
|
a = "b"
|
||||||
|
|
||||||
[p2p]
|
[p2p]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue