strip peerid when setting on-chain addrs
This commit is contained in:
parent
1bd90d0701
commit
4ef5a58b36
@ -59,7 +59,14 @@ var actorSetAddrsCmd = &cli.Command{
|
|||||||
return fmt.Errorf("failed to parse %q as a multiaddr: %w", a, err)
|
return fmt.Errorf("failed to parse %q as a multiaddr: %w", a, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
addrs = append(addrs, maddr.Bytes())
|
maddrNop2p, strip := ma.SplitFunc(maddr, func(c ma.Component) bool {
|
||||||
|
return c.Protocol().Code == ma.P_P2P
|
||||||
|
})
|
||||||
|
|
||||||
|
if strip != nil {
|
||||||
|
fmt.Println("Stripping peerid ", strip, " from ", maddr)
|
||||||
|
}
|
||||||
|
addrs = append(addrs, maddrNop2p.Bytes())
|
||||||
}
|
}
|
||||||
|
|
||||||
maddr, err := nodeAPI.ActorAddress(ctx)
|
maddr, err := nodeAPI.ActorAddress(ctx)
|
||||||
|
Loading…
Reference in New Issue
Block a user