From 4a37273065c0b441457420900c22e56a8d9f5105 Mon Sep 17 00:00:00 2001 From: c9s Date: Mon, 3 Oct 2022 16:31:04 +0800 Subject: [PATCH] bbgo: remove Persistence injection --- pkg/bbgo/trader.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkg/bbgo/trader.go b/pkg/bbgo/trader.go index 85e646681..9ff01e5ea 100644 --- a/pkg/bbgo/trader.go +++ b/pkg/bbgo/trader.go @@ -440,10 +440,6 @@ var defaultPersistenceSelector = &PersistenceSelector{ } func (trader *Trader) injectCommonServices(s interface{}) error { - persistence := &Persistence{ - PersistenceSelector: defaultPersistenceSelector, - } - // a special injection for persistence selector: // if user defined the selector, the facade pointer will be nil, hence we need to update the persistence facade pointer sv := reflect.ValueOf(s).Elem() @@ -475,7 +471,6 @@ func (trader *Trader) injectCommonServices(s interface{}) error { trader.environment.DatabaseService, trader.environment.AccountService, trader.environment, - persistence, PersistenceServiceFacade, // if the strategy use persistence facade separately ) }