Skip to content

Commit

Permalink
Merge branch 'main' into reece/ver-bumps-mar25
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups authored Apr 23, 2024
2 parents 34d387a + b79f4e4 commit fb01997
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion chain/cosmos/chain_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,8 @@ func (tn *ChainNode) CreateNodeContainer(ctx context.Context) error {
usingPorts[k] = v
}

if tn.Index == 0 && chainCfg.HostPortOverride != nil {
// to prevent port binding conflicts, host port overrides are only exposed on the first validator node.
if tn.Validator && tn.Index == 0 && chainCfg.HostPortOverride != nil {
for intP, extP := range chainCfg.HostPortOverride {
usingPorts[nat.Port(fmt.Sprintf("%d/tcp", intP))] = []nat.PortBinding{
{
Expand Down
3 changes: 2 additions & 1 deletion ibc/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ type ChainConfig struct {
SidecarConfigs []SidecarConfig
// CoinDecimals for the chains base micro/nano/atto token configuration.
CoinDecimals *int64
//HostPortOverride exposes ports to the host
// HostPortOverride exposes ports to the host.
// To avoid port binding conflicts, ports are only exposed on the 0th validator.
HostPortOverride map[int]int `yaml:"host-port-override"`
// Additional start command arguments
AdditionalStartArgs []string
Expand Down

0 comments on commit fb01997

Please sign in to comment.