-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go/tendermint: 'tendermint.sentry.upstream_address' flag
- Loading branch information
Showing
5 changed files
with
41 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,19 +82,10 @@ func (args *argBuilder) tendermintCoreListenAddress(port uint16) *argBuilder { | |
return args | ||
} | ||
|
||
func (args *argBuilder) tendermintPersistentPeer(peers []string) *argBuilder { | ||
for _, peer := range peers { | ||
args.vec = append(args.vec, []string{ | ||
"--" + tendermint.CfgP2PPersistentPeer, peer, | ||
}...) | ||
} | ||
return args | ||
} | ||
|
||
func (args *argBuilder) tendermintPrivatePeerID(peerIDs []string) *argBuilder { | ||
for _, peerID := range peerIDs { | ||
func (args *argBuilder) tendermintSentryUpstreamAddress(addrs []string) *argBuilder { | ||
for _, addr := range addrs { | ||
args.vec = append(args.vec, []string{ | ||
"--" + tendermint.CfgP2PPrivatePeerID, peerID, | ||
"--" + tendermint.CfgSentryUpstreamAddress, addr, | ||
}...) | ||
} | ||
return args | ||
|
@@ -308,21 +299,12 @@ func (args *argBuilder) addSentries(sentries []*Sentry) *argBuilder { | |
return args | ||
} | ||
|
||
func (args *argBuilder) addSentriesAsPersistentPeers(sentries []*Sentry) *argBuilder { | ||
var peers []string | ||
for _, sentry := range sentries { | ||
peers = append(peers, fmt.Sprintf("%[email protected]:%d", sentry.tmAddress, sentry.consensusPort)) | ||
} | ||
args = args.tendermintPersistentPeer(peers) | ||
return args | ||
} | ||
|
||
func (args *argBuilder) addValidatorsAsPrivatePeers(validators []*Validator) *argBuilder { | ||
var peerIDs []string | ||
func (args *argBuilder) addValidatorsAsSentryUpstreams(validators []*Validator) *argBuilder { | ||
var addrs []string | ||
for _, val := range validators { | ||
peerIDs = append(peerIDs, val.tmAddress) | ||
addrs = append(addrs, fmt.Sprintf("%[email protected]:%d", val.tmAddress, val.consensusPort)) | ||
} | ||
args = args.tendermintPrivatePeerID(peerIDs) | ||
args = args.tendermintSentryUpstreamAddress(addrs) | ||
return args | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters