syncer: make SyncManager an interface.

This commit is contained in:
Raúl Kripalani
2020-09-14 21:58:59 +01:00
parent 86607452d7
commit dd841f32db
5 changed files with 97 additions and 38 deletions
+3
View File
@@ -242,6 +242,9 @@ func Online() Option {
Override(new(dtypes.ChainBlockService), modules.ChainBlockService),
// Filecoin services
// We don't want the SyncManagerCtor to be used as an fx constructor, but rather as a value.
// It will be called implicitly by the Syncer constructor.
Override(new(chain.SyncManagerCtor), func() chain.SyncManagerCtor { return chain.NewSyncManager }),
Override(new(*chain.Syncer), modules.NewSyncer),
Override(new(exchange.Client), exchange.NewClient),
Override(new(*messagepool.MessagePool), modules.MessagePool),