Skip to content

Commit

Permalink
addressservice: extract out addressing logic from basichost
Browse files Browse the repository at this point in the history
The goal is to keep modifying it and removing the dependency
on basichost by relying on events. At that point, we can
expose this as a separate service usable by both basic
and blank hosts
  • Loading branch information
sukunrt committed Dec 1, 2024
1 parent 2b114a2 commit 3dbd24d
Show file tree
Hide file tree
Showing 5 changed files with 610 additions and 489 deletions.
4 changes: 3 additions & 1 deletion fx_options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ func TestGetPeerID(t *testing.T) {
WithFxOption(fx.Populate(&id)),
)
require.NoError(t, err)
defer host.Close()
defer func() {
host.Close()
}()

require.Equal(t, host.ID(), id)

Expand Down
1 change: 1 addition & 0 deletions libp2p_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ func TestHostAddrsFactoryAddsCerthashes(t *testing.T) {
require.NoError(t, err)
require.Eventually(t, func() bool {
addrs := h.Addrs()
fmt.Println(addrs)
for _, a := range addrs {
first, last := ma.SplitFunc(a, func(c ma.Component) bool {
return c.Protocol().Code == ma.P_CERTHASH
Expand Down
Loading

0 comments on commit 3dbd24d

Please sign in to comment.