Skip to content

Commit 74fc5ec

Browse files
committed
feat: print ScrollConfig when starting node
1 parent ddaab71 commit 74fc5ec

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

params/config.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,16 @@ func (s ScrollConfig) ZktrieEnabled() bool {
453453
return s.UseZktrie
454454
}
455455

456+
func (s ScrollConfig) String() string {
457+
if s.MaxTxPerBlock == nil {
458+
return fmt.Sprintf("{useZktrie: %v, maxTxPerBlock: <nil>, feeVaultAddress: %v, enableEIP2718:%v, enableEIP1559:%v}",
459+
s.UseZktrie, s.FeeVaultAddress, s.EnableEIP2718, s.EnableEIP1559)
460+
}
461+
462+
return fmt.Sprintf("{useZktrie: %v, maxTxPerBlock: %v, feeVaultAddress: %v, enableEIP2718:%v, enableEIP1559:%v}",
463+
s.UseZktrie, *s.MaxTxPerBlock, s.FeeVaultAddress, s.EnableEIP2718, s.EnableEIP1559)
464+
}
465+
456466
// IsValidTxCount returns whether the given block's transaction count is below the limit.
457467
func (s ScrollConfig) IsValidTxCount(count int) bool {
458468
return s.MaxTxPerBlock == nil || count <= *s.MaxTxPerBlock
@@ -488,7 +498,7 @@ func (c *ChainConfig) String() string {
488498
default:
489499
engine = "unknown"
490500
}
491-
return fmt.Sprintf("{ChainID: %v Homestead: %v DAO: %v DAOSupport: %v EIP150: %v EIP155: %v EIP158: %v Byzantium: %v Constantinople: %v Petersburg: %v Istanbul: %v, Muir Glacier: %v, Berlin: %v, London: %v, Arrow Glacier: %v, Engine: %v}",
501+
return fmt.Sprintf("{ChainID: %v Homestead: %v DAO: %v DAOSupport: %v EIP150: %v EIP155: %v EIP158: %v Byzantium: %v Constantinople: %v Petersburg: %v Istanbul: %v, Muir Glacier: %v, Berlin: %v, London: %v, Arrow Glacier: %v, Engine: %v, Scroll config: %v}",
492502
c.ChainID,
493503
c.HomesteadBlock,
494504
c.DAOForkBlock,
@@ -505,6 +515,7 @@ func (c *ChainConfig) String() string {
505515
c.LondonBlock,
506516
c.ArrowGlacierBlock,
507517
engine,
518+
c.Scroll,
508519
)
509520
}
510521

0 commit comments

Comments
 (0)