mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +00:00
params: undo checks
This commit is contained in:
parent
dde6608787
commit
8d9bd32fa9
1 changed files with 3 additions and 7 deletions
|
|
@ -688,7 +688,7 @@ func (c *ChainConfig) Description() string {
|
||||||
banner += fmt.Sprintf(" - BPO5: @%-10v blob: (%s)\n", *c.BPO5Time, c.BlobScheduleConfig.BPO5)
|
banner += fmt.Sprintf(" - BPO5: @%-10v blob: (%s)\n", *c.BPO5Time, c.BlobScheduleConfig.BPO5)
|
||||||
}
|
}
|
||||||
if c.AmsterdamTime != nil {
|
if c.AmsterdamTime != nil {
|
||||||
banner += fmt.Sprintf(" - Amsterdam: @%-10v blob: (%s)\n", *c.AmsterdamTime, c.BlobScheduleConfig.Amsterdam)
|
banner += fmt.Sprintf(" - Amsterdam: @%-10v blob: (%s)\n", *c.AmsterdamTime, c.BlobScheduleConfig.Amsterdam)
|
||||||
}
|
}
|
||||||
if c.UBTTime != nil {
|
if c.UBTTime != nil {
|
||||||
banner += fmt.Sprintf(" - UBT: @%-10v blob: (%s)\n", *c.UBTTime, c.BlobScheduleConfig.UBT)
|
banner += fmt.Sprintf(" - UBT: @%-10v blob: (%s)\n", *c.UBTTime, c.BlobScheduleConfig.UBT)
|
||||||
|
|
@ -997,7 +997,6 @@ func (c *ChainConfig) CheckConfigForkOrder() error {
|
||||||
name string
|
name string
|
||||||
timestamp *uint64
|
timestamp *uint64
|
||||||
config *BlobConfig
|
config *BlobConfig
|
||||||
inherits bool // fork introduces no blob params; inherits the latest prior fork's schedule
|
|
||||||
}{
|
}{
|
||||||
{name: "cancun", timestamp: c.CancunTime, config: bsc.Cancun},
|
{name: "cancun", timestamp: c.CancunTime, config: bsc.Cancun},
|
||||||
{name: "prague", timestamp: c.PragueTime, config: bsc.Prague},
|
{name: "prague", timestamp: c.PragueTime, config: bsc.Prague},
|
||||||
|
|
@ -1007,17 +1006,14 @@ func (c *ChainConfig) CheckConfigForkOrder() error {
|
||||||
{name: "bpo3", timestamp: c.BPO3Time, config: bsc.BPO3},
|
{name: "bpo3", timestamp: c.BPO3Time, config: bsc.BPO3},
|
||||||
{name: "bpo4", timestamp: c.BPO4Time, config: bsc.BPO4},
|
{name: "bpo4", timestamp: c.BPO4Time, config: bsc.BPO4},
|
||||||
{name: "bpo5", timestamp: c.BPO5Time, config: bsc.BPO5},
|
{name: "bpo5", timestamp: c.BPO5Time, config: bsc.BPO5},
|
||||||
// Amsterdam (EIP-7928 BAL) doesn't change blob parameters. The blob
|
{name: "amsterdam", timestamp: c.AmsterdamTime, config: bsc.Amsterdam},
|
||||||
// resolver (eip4844.latestBlobConfig) has no Amsterdam case and falls
|
|
||||||
// through to Osaka, so an explicit amsterdam blob entry isn't required.
|
|
||||||
{name: "amsterdam", timestamp: c.AmsterdamTime, config: bsc.Amsterdam, inherits: true},
|
|
||||||
} {
|
} {
|
||||||
if cur.config != nil {
|
if cur.config != nil {
|
||||||
if err := cur.config.validate(); err != nil {
|
if err := cur.config.validate(); err != nil {
|
||||||
return fmt.Errorf("invalid chain configuration in blobSchedule for fork %q: %v", cur.name, err)
|
return fmt.Errorf("invalid chain configuration in blobSchedule for fork %q: %v", cur.name, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if cur.timestamp != nil && !cur.inherits {
|
if cur.timestamp != nil {
|
||||||
// If the fork is configured, a blob schedule must be defined for it.
|
// If the fork is configured, a blob schedule must be defined for it.
|
||||||
if cur.config == nil {
|
if cur.config == nil {
|
||||||
return fmt.Errorf("invalid chain configuration: missing entry for fork %q in blobSchedule", cur.name)
|
return fmt.Errorf("invalid chain configuration: missing entry for fork %q in blobSchedule", cur.name)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue