diff options
Diffstat (limited to 'dex/backend.go')
-rw-r--r-- | dex/backend.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/dex/backend.go b/dex/backend.go index 056a6d221..6ee1a5fa1 100644 --- a/dex/backend.go +++ b/dex/backend.go @@ -21,6 +21,7 @@ import ( "fmt" "time" + "github.com/dexon-foundation/dexon-consensus/core/syncer" "github.com/dexon-foundation/dexon/accounts" "github.com/dexon-foundation/dexon/consensus" "github.com/dexon-foundation/dexon/consensus/dexcon" @@ -180,7 +181,12 @@ func New(ctx *node.ServiceContext, config *Config) (*Dexon, error) { dex.protocolManager = pm dex.network = NewDexconNetwork(pm) - dex.bp = NewBlockProposer(dex, dMoment) + recovery := NewRecovery(chainConfig.Recovery, config.RecoveryNetworkRPC, + dex.governance, config.PrivateKey) + watchCat := syncer.NewWatchCat(recovery, dex.governance, 10*time.Second, + time.Duration(chainConfig.Recovery.Timeout)*time.Second, log.Root()) + + dex.bp = NewBlockProposer(dex, watchCat, dMoment) return dex, nil } |