Skip to content

Commit

Permalink
feat: add swoker url
Browse files Browse the repository at this point in the history
  • Loading branch information
x-wagmi committed Nov 1, 2024
1 parent bd11764 commit 09bbc1c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions cmd/ipfs/kubo/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
_ "expvar"
"fmt"
"github.com/crustio/go-ipfs-encryptor/crust"
"math"
"net"
"net/http"
Expand Down Expand Up @@ -587,6 +588,18 @@ take effect.

// start MFS pinning thread
startPinMFS(cctx, daemonConfigPollInterval, &ipfsPinMFSNode{node})
// Set crust
cfg, err = repo.Config()
if err != nil {
return err
}

if cc, ok := cfg.Datastore.Spec["crust"]; ok {
if len(cc.(string)) != 0 {
crust.Worker.SetUrl(cc.(string))
fmt.Printf("Crust sworker url: %s\n", cc.(string))
}
}

// The daemon is *finally* ready.
fmt.Printf("Daemon is ready\n")
Expand Down

0 comments on commit 09bbc1c

Please sign in to comment.