Skip to content

Support multiple substrate URLs #1028

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bridge/docs/observability.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ the source field set contains all fields which are included in the source object
| Instance_public_key | string | yes | Instance public key which you can use to filter logs by instance |
| Bridge_wallet_address | string | yes | The bridge account address which you can use to filter logs by bridge |
| Stellar_network | string | yes | Stellar network name which you can use to filter logs by environment |
| Tfchain_url | string | yes | The url of the substrate rpc node which you can use to filter logs by environment |
| Tfchain_url | []string | yes | The urls of the substrate rpc node which you can use to filter logs by environment |

#### Event-specific fields:

Expand Down
2 changes: 1 addition & 1 deletion bridge/tfchain_bridge/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func main() {
var bridgeCfg pkg.BridgeConfig

var debug bool
flag.StringVar(&bridgeCfg.TfchainURL, "tfchainurl", "", "Tfchain websocket url")
flag.StringArrayVar(&bridgeCfg.TfchainURL, "tfchainurl", []string{}, "Tfchain websocket url")
flag.StringVar(&bridgeCfg.TfchainSeed, "tfchainseed", "", "Tfchain secret seed")
flag.StringVar(&bridgeCfg.StellarBridgeAccount, "bridgewallet", "", "stellar bridge wallet")
flag.StringVar(&bridgeCfg.StellarSeed, "secret", "", "stellar secret")
Expand Down
2 changes: 1 addition & 1 deletion bridge/tfchain_bridge/pkg/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package pkg
import "errors"

type BridgeConfig struct {
TfchainURL string
TfchainURL []string
TfchainSeed string
RescanBridgeAccount bool
PersistencyFile string
Expand Down
2 changes: 1 addition & 1 deletion bridge/tfchain_bridge/pkg/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type SourceCommonLogEntry struct {
Instance_public_key string
Bridge_wallet_address string
Stellar_network string
Tfchain_url string
Tfchain_url []string
}

type refundReasonKey struct{}
Expand Down
4 changes: 2 additions & 2 deletions bridge/tfchain_bridge/pkg/substrate/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ type SubstrateClient struct {
}

// NewSubstrate creates a substrate client
func NewSubstrateClient(url string, seed string) (*SubstrateClient, error) {
mngr := substrate.NewManager(url)
func NewSubstrateClient(url []string, seed string) (*SubstrateClient, error) {
mngr := substrate.NewManager(url...)
cl, err := mngr.Substrate()
if err != nil {
return nil, err
Expand Down
Loading