Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
feat: change appendAnnounce to a []string
Browse files Browse the repository at this point in the history
This is changed that way to avoid potential issues that a migration wouldn't catch, for example an automated deployment system.
  • Loading branch information
Jorropo committed Jul 19, 2021
1 parent e7cc5c3 commit 06bf5af
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions addresses.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package config

// Addresses stores the (string) multiaddr addresses for the node.
type Addresses struct {
Swarm []string // addresses for the swarm to listen on
Announce []string // swarm addresses to announce to the network
AppendAnnouce bool // does Announces append to the swarm listens rather than replacing them
NoAnnounce []string // swarm addresses not to announce to the network
API Strings // address for the local API (RPC)
Gateway Strings // address to listen on for IPFS HTTP object gateway
Swarm []string // addresses for the swarm to listen on
Announce []string // swarm addresses to announce to the network, if len > 0 replaces auto detected addresses
AppendAnnounce []string // similar to Announce but doesn't overwride auto detected addresses, they are just appended
NoAnnounce []string // swarm addresses not to announce to the network
API Strings // address for the local API (RPC)
Gateway Strings // address to listen on for IPFS HTTP object gateway
}
10 changes: 5 additions & 5 deletions init.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ func addressesConfig() Addresses {
"/ip4/0.0.0.0/udp/4001/quic",
"/ip6/::/udp/4001/quic",
},
Announce: []string{},
AppendAnnouce: false,
NoAnnounce: []string{},
API: Strings{"/ip4/127.0.0.1/tcp/5001"},
Gateway: Strings{"/ip4/127.0.0.1/tcp/8080"},
Announce: []string{},
AppendAnnounce: []string{},
NoAnnounce: []string{},
API: Strings{"/ip4/127.0.0.1/tcp/5001"},
Gateway: Strings{"/ip4/127.0.0.1/tcp/8080"},
}
}

Expand Down

0 comments on commit 06bf5af

Please sign in to comment.