OSDN Git Service

fix
authorHAOYUatHZ <haoyu@protonmail.com>
Wed, 7 Aug 2019 10:34:43 +0000 (18:34 +0800)
committerHAOYUatHZ <haoyu@protonmail.com>
Wed, 7 Aug 2019 10:34:43 +0000 (18:34 +0800)
toolbar/precog/monitor/monitor.go

index c49415a..8c5936a 100644 (file)
@@ -67,14 +67,16 @@ func (m *monitor) updateBootstrapNodes() {
 // p2p/test_util.go
 // p2p/switch_test.go
 func (m *monitor) discovery() {
-       // TODO: clean up
        // TODO: 包一下?  common cfg 之类的?
-       mCfg := cfg.DefaultConfig()
-       // TODO: fix
+       mCfg := &cfg.Config{
+               BaseConfig: cfg.DefaultBaseConfig(),
+               P2P:        cfg.DefaultP2PConfig(),
+       }
        dirPath, err := ioutil.TempDir(".", "")
        if err != nil {
                log.Fatal(err)
        }
+       // TODO: fix
        mCfg.DBPath = dirPath
        defer os.RemoveAll(dirPath)