From c5b59ac6a05fe6424b01380b010b39611bdf9c80 Mon Sep 17 00:00:00 2001 From: Leo Date: Mon, 25 Jan 2021 20:21:50 +0100 Subject: [PATCH] bridge: fix terraChainID typo I share the blame for missing this during review :P --- bridge/cmd/guardiand/bridge.go | 10 +++++----- bridge/pkg/processor/observation.go | 2 +- bridge/pkg/processor/processor.go | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bridge/cmd/guardiand/bridge.go b/bridge/cmd/guardiand/bridge.go index 1cecb47bb..331eb1b05 100644 --- a/bridge/cmd/guardiand/bridge.go +++ b/bridge/cmd/guardiand/bridge.go @@ -56,7 +56,7 @@ var ( terraSupport *bool terraWS *string terraLCD *string - terraChaidID *string + terraChainID *string terraContract *string terraKeyPath *string @@ -93,7 +93,7 @@ func init() { terraSupport = BridgeCmd.Flags().Bool("terra", false, "Turn on support for Terra") terraWS = BridgeCmd.Flags().String("terraWS", "", "Path to terrad root for websocket connection") terraLCD = BridgeCmd.Flags().String("terraLCD", "", "Path to LCD service root for http calls") - terraChaidID = BridgeCmd.Flags().String("terraChainID", "", "Terra chain ID, used in LCD client initialization") + terraChainID = BridgeCmd.Flags().String("terraChainID", "", "Terra chain ID, used in LCD client initialization") terraContract = BridgeCmd.Flags().String("terraContract", "", "Wormhole contract address on Terra blockhain") terraKeyPath = BridgeCmd.Flags().String("terraKey", "", "Path to mnemonic for account paying gas for submitting transactions to Terra") @@ -287,8 +287,8 @@ func runBridge(cmd *cobra.Command, args []string) { if *terraLCD == "" { logger.Fatal("Please specify --terraLCD") } - if *terraChaidID == "" { - logger.Fatal("Please specify --terraChaidID") + if *terraChainID == "" { + logger.Fatal("Please specify --terraChainID") } if *terraContract == "" { logger.Fatal("Please specify --terraContract") @@ -425,7 +425,7 @@ func runBridge(cmd *cobra.Command, args []string) { *ethRPC, *terraSupport, *terraLCD, - *terraChaidID, + *terraChainID, *terraContract, terraFeePayer, ) diff --git a/bridge/pkg/processor/observation.go b/bridge/pkg/processor/observation.go index d99947b34..9b709420d 100644 --- a/bridge/pkg/processor/observation.go +++ b/bridge/pkg/processor/observation.go @@ -316,7 +316,7 @@ func (p *Processor) terraVAASubmission(ctx context.Context, signed *vaa.VAA, has observationsDirectSubmissionsTotal.WithLabelValues("terra").Inc() - tx, err := terra.SubmitVAA(ctx, p.terraLCD, p.terraChaidID, p.terraContract, p.terraFeePayer, signed) + tx, err := terra.SubmitVAA(ctx, p.terraLCD, p.terraChainID, p.terraContract, p.terraFeePayer, signed) if err != nil { if strings.Contains(err.Error(), "VaaAlreadyExecuted") { p.logger.Info("VAA already submitted to Terra by another node, ignoring", diff --git a/bridge/pkg/processor/processor.go b/bridge/pkg/processor/processor.go index bffade261..e60335766 100644 --- a/bridge/pkg/processor/processor.go +++ b/bridge/pkg/processor/processor.go @@ -65,7 +65,7 @@ type Processor struct { terraEnabled bool terraLCD string - terraChaidID string + terraChainID string terraContract string terraFeePayer string @@ -97,7 +97,7 @@ func NewProcessor( devnetEthRPC string, terraEnabled bool, terraLCD string, - terraChaidID string, + terraChainID string, terraContract string, terraFeePayer string) *Processor { @@ -115,7 +115,7 @@ func NewProcessor( terraEnabled: terraEnabled, terraLCD: terraLCD, - terraChaidID: terraChaidID, + terraChainID: terraChainID, terraContract: terraContract, terraFeePayer: terraFeePayer, @@ -179,7 +179,7 @@ func (p *Processor) checkDevModeGuardianSetUpdate(ctx context.Context) error { // Submit to Terra go func() { for { - trxResponse, err := terra.SubmitVAA(timeout, p.terraLCD, p.terraChaidID, p.terraContract, p.terraFeePayer, v) + trxResponse, err := terra.SubmitVAA(timeout, p.terraLCD, p.terraChainID, p.terraContract, p.terraFeePayer, v) if err != nil { p.logger.Error("failed to submit Terra devnet guardian set change, retrying", zap.Error(err)) time.Sleep(1 * time.Second)