From 61cfff3bc5ccfc6b665bec116cac7c0184575cbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Garamv=C3=B6lgyi?= Date: Thu, 6 Mar 2025 13:08:59 +0100 Subject: [PATCH] fix: print genesisStateRoot on startup (#1136) --- params/config.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/params/config.go b/params/config.go index d955dd161b..a563041d23 100644 --- a/params/config.go +++ b/params/config.go @@ -739,8 +739,13 @@ func (s ScrollConfig) String() string { maxTxPayloadBytesPerBlock = fmt.Sprintf("%v", *s.MaxTxPayloadBytesPerBlock) } - return fmt.Sprintf("{useZktrie: %v, maxTxPerBlock: %v, MaxTxPayloadBytesPerBlock: %v, feeVaultAddress: %v, l1Config: %v}", - s.UseZktrie, maxTxPerBlock, maxTxPayloadBytesPerBlock, s.FeeVaultAddress, s.L1Config.String()) + genesisStateRoot := "" + if s.GenesisStateRoot != nil { + genesisStateRoot = fmt.Sprintf("%v", *s.GenesisStateRoot) + } + + return fmt.Sprintf("{useZktrie: %v, maxTxPerBlock: %v, MaxTxPayloadBytesPerBlock: %v, feeVaultAddress: %v, l1Config: %v, genesisStateRoot: %v}", + s.UseZktrie, maxTxPerBlock, maxTxPayloadBytesPerBlock, s.FeeVaultAddress, s.L1Config.String(), genesisStateRoot) } // IsValidTxCount returns whether the given block's transaction count is below the limit.