Skip to content

Commit

Permalink
Merge pull request #5 from IceFireDB/feat_upgrade_deps
Browse files Browse the repository at this point in the history
feat(deps):upgrade libp2p and ipfs-log deps
  • Loading branch information
gitsrc committed Apr 23, 2024
2 parents 2c7a0b4 + 3e415e3 commit 9eb14b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions example/leveldb_kv/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
iflog "github.com/IceFireDB/icefiredb-ipfs-log"
"github.com/IceFireDB/icefiredb-ipfs-log/stores/levelkv"
"github.com/abiosoft/ishell/v2"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/core/peer"
ma "github.com/multiformats/go-multiaddr"
"go.uber.org/zap"
)
Expand All @@ -21,7 +21,7 @@ func main() {
panic(err)
}
// Build host multiaddress
hostAddr, _ := ma.NewMultiaddr(fmt.Sprintf("/ipfs/%s", node.PeerHost.ID().Pretty()))
hostAddr, _ := ma.NewMultiaddr(fmt.Sprintf("/ipfs/%s", node.PeerHost.ID().String()))
for _, a := range node.PeerHost.Addrs() {
fmt.Println(a.Encapsulate(hostAddr).String())
}
Expand Down
6 changes: 3 additions & 3 deletions example/loger/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
ishell "github.com/abiosoft/ishell/v2"
"github.com/ipfs/go-cid"
"github.com/ipfs/kubo/core"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/core/host"
"github.com/libp2p/go-libp2p/core/peer"
ma "github.com/multiformats/go-multiaddr"
)

Expand Down Expand Up @@ -136,7 +136,7 @@ func addCmd(ctx context.Context, shell *ishell.Shell, node *core.IpfsNode, ev *i

func PrintHostAddress(ha host.Host) {
// Build host multiaddress
hostAddr, _ := ma.NewMultiaddr(fmt.Sprintf("/ipfs/%s", ha.ID().Pretty()))
hostAddr, _ := ma.NewMultiaddr(fmt.Sprintf("/ipfs/%s", ha.ID().String()))

// Now we can build a full multiaddress to reach this host
// by encapsulating both addresses:
Expand Down

0 comments on commit 9eb14b9

Please sign in to comment.