From 44bf5a519d6e7860453ecbf50d8d6fdceaf6be8b Mon Sep 17 00:00:00 2001 From: mrekucci Date: Wed, 20 Sep 2023 19:23:14 +0800 Subject: [PATCH] feat: bee start starts the node in the ultra-light mode --- pkg/node/node.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkg/node/node.go b/pkg/node/node.go index 467e41aef50..b2f08f51071 100644 --- a/pkg/node/node.go +++ b/pkg/node/node.go @@ -501,7 +501,7 @@ func NewBee( } } - if o.SwapEnable { + if o.SwapEnable && chainEnabled { chequebookFactory, err = InitChequebookFactory( logger, chainBackend, @@ -525,7 +525,7 @@ func NewBee( erc20Service = erc20.New(transactionService, erc20Address) - if o.ChequebookEnable && chainEnabled { + if o.ChequebookEnable { chequebookService, err = InitChequebookService( ctx, logger, @@ -1004,7 +1004,11 @@ func NewBee( if o.FullNodeMode && !o.BootnodeMode { logger.Info("starting in full mode") } else { - logger.Info("starting in light mode") + if chainEnabled { + logger.Info("starting in light mode") + } else { + logger.Info("starting in ultra-light mode") + } p2p.WithBlocklistStreams(p2p.DefaultBlocklistTime, retrieveProtocolSpec) p2p.WithBlocklistStreams(p2p.DefaultBlocklistTime, pushSyncProtocolSpec) p2p.WithBlocklistStreams(p2p.DefaultBlocklistTime, pullSyncProtocolSpec)