Skip to content

Commit a500675

Browse files
chore: move initGenesisChunks call into GetGenesisChunks
1 parent 5e77f68 commit a500675

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

node/node.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,6 @@ func (n *Node) OnStart() error {
215215
if err != nil {
216216
return fmt.Errorf("error while starting data availability layer client: %w", err)
217217
}
218-
err = n.initGenesisChunks()
219-
if err != nil {
220-
return fmt.Errorf("error while creating chunks of the genesis document: %w", err)
221-
}
222218
if n.conf.Aggregator {
223219
n.Logger.Info("working in aggregator mode", "block time", n.conf.BlockTime)
224220
go n.blockManager.AggregationLoop(n.ctx)
@@ -237,6 +233,10 @@ func (n *Node) GetGenesis() *tmtypes.GenesisDoc {
237233

238234
// GetGenesisChunks returns chunked version of genesis.
239235
func (n *Node) GetGenesisChunks() []string {
236+
err := n.initGenesisChunks()
237+
if err != nil {
238+
n.Logger.Error("error while creating chunks of the genesis document: %w", err)
239+
}
240240
return n.genChunks
241241
}
242242

0 commit comments

Comments
 (0)