@@ -31,7 +31,6 @@ import (
3131 "github.com/ethersphere/bee/v2/pkg/p2p/libp2p"
3232 "github.com/ethersphere/bee/v2/pkg/pingpong"
3333 "github.com/ethersphere/bee/v2/pkg/postage"
34- "github.com/ethersphere/bee/v2/pkg/postage/batchstore"
3534 "github.com/ethersphere/bee/v2/pkg/pricer"
3635 "github.com/ethersphere/bee/v2/pkg/pricing"
3736 "github.com/ethersphere/bee/v2/pkg/pss"
@@ -225,31 +224,15 @@ func NewBee(
225224 chainID int64
226225 transactionService transaction.Service
227226 transactionMonitor transaction.Monitor
228- chequebookFactory chequebook.Factory
229227 chequebookService chequebook.Service = new (noOpChequebookService )
230228 chequeStore chequebook.ChequeStore
231229 cashoutService chequebook.CashoutService
232230 erc20Service erc20.Service
233231 )
234232
235- chainEnabled := isChainEnabled ( o , o . BlockchainRpcEndpoint , logger )
233+ chainEnabled := false
236234
237235 var batchStore postage.Storer = new (postage.NoOpBatchStore )
238- var evictFn func ([]byte ) error
239-
240- if chainEnabled {
241- batchStore , err = batchstore .New (
242- stateStore ,
243- func (id []byte ) error {
244- return evictFn (id )
245- },
246- reserveCapacity ,
247- logger ,
248- )
249- if err != nil {
250- return nil , fmt .Errorf ("batchstore: %w" , err )
251- }
252- }
253236
254237 chainBackend , overlayEthAddress , chainID , transactionMonitor , transactionService , err = InitChain (
255238 ctx ,
@@ -363,48 +346,6 @@ func NewBee(
363346 }
364347 }
365348
366- if o .SwapEnable {
367- chequebookFactory , err = InitChequebookFactory (logger , chainBackend , chainID , transactionService , o .SwapFactoryAddress )
368- if err != nil {
369- return nil , fmt .Errorf ("init chequebook factory: %w" , err )
370- }
371-
372- erc20Address , err := chequebookFactory .ERC20Address (ctx )
373- if err != nil {
374- return nil , fmt .Errorf ("factory fail: %w" , err )
375- }
376-
377- erc20Service = erc20 .New (transactionService , erc20Address )
378-
379- if o .ChequebookEnable && chainEnabled {
380- chequebookService , err = InitChequebookService (
381- ctx ,
382- logger ,
383- stateStore ,
384- signer ,
385- chainID ,
386- chainBackend ,
387- overlayEthAddress ,
388- transactionService ,
389- chequebookFactory ,
390- o .SwapInitialDeposit ,
391- erc20Service ,
392- )
393- if err != nil {
394- return nil , fmt .Errorf ("init chequebook service: %w" , err )
395- }
396- }
397-
398- chequeStore , cashoutService = initChequeStoreCashout (
399- stateStore ,
400- chainBackend ,
401- chequebookFactory ,
402- chainID ,
403- overlayEthAddress ,
404- transactionService ,
405- )
406- }
407-
408349 lightNodes := lightnode .NewContainer (swarmAddress )
409350
410351 bootnodes := make ([]ma.Multiaddr , 0 , len (o .Bootnodes ))
@@ -585,7 +526,6 @@ func NewBee(
585526 return nil , fmt .Errorf ("localstore: %w" , err )
586527 }
587528 b .localstoreCloser = localStore
588- evictFn = func (id []byte ) error { return localStore .EvictBatch (context .Background (), id ) }
589529
590530 if resetReserve {
591531 logger .Warning ("resetting the reserve" )
0 commit comments