Skip to content

Commit

Permalink
log per subnet config
Browse files Browse the repository at this point in the history
  • Loading branch information
cam-schultz committed Jan 24, 2024
1 parent 8c52ddf commit 0db4934
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions tests/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,14 @@ func CreateDefaultRelayerConfig(
fundedAddress common.Address,
relayerKey *ecdsa.PrivateKey,
) config.Config {
log.Info(
"Setting up relayer config",
)
// Construct the config values for each subnet
hosts := make([]string, len(subnetsInfo))
ports := make([]uint32, len(subnetsInfo))
sources := make([]config.SourceSubnet, len(subnetsInfo))
destinations := make([]config.DestinationSubnet, len(subnetsInfo))
blockchainIDs := make([]string, len(subnetsInfo))
subnetIDs := make([]string, len(subnetsInfo))
for i, subnetInfo := range subnetsInfo {
var err error
hosts[i], ports[i], err = teleporterTestUtils.GetURIHostAndPort(subnetInfo.NodeURIs[0])
Expand Down Expand Up @@ -125,18 +126,15 @@ func CreateDefaultRelayerConfig(
AccountPrivateKey: hex.EncodeToString(relayerKey.D.Bytes()),
}

blockchainIDs[i] = subnetInfo.BlockchainID.String()
subnetIDs[i] = subnetInfo.SubnetID.String()
log.Info(
"Creating relayer config for subnet",
"subnetID", subnetInfo.SubnetID.String(),
"blockchainID", subnetInfo.BlockchainID.String(),
"host", hosts[i],
"port", ports[i],
)
}

log.Info(
"Setting up relayer config",
"hosts", hosts,
"port", ports,
"blockchainIDs", blockchainIDs,
"subnetIDs", subnetIDs,
)

return config.Config{
LogLevel: logging.Info.LowerString(),
NetworkID: peers.LocalNetworkID,
Expand Down

0 comments on commit 0db4934

Please sign in to comment.