bridge: fix terraChainID typo

I share the blame for missing this during review :P
This commit is contained in:
Leo 2021-01-25 20:21:50 +01:00
parent 7201b64a77
commit c5b59ac6a0
3 changed files with 10 additions and 10 deletions

View File

@ -56,7 +56,7 @@ var (
terraSupport *bool terraSupport *bool
terraWS *string terraWS *string
terraLCD *string terraLCD *string
terraChaidID *string terraChainID *string
terraContract *string terraContract *string
terraKeyPath *string terraKeyPath *string
@ -93,7 +93,7 @@ func init() {
terraSupport = BridgeCmd.Flags().Bool("terra", false, "Turn on support for Terra") terraSupport = BridgeCmd.Flags().Bool("terra", false, "Turn on support for Terra")
terraWS = BridgeCmd.Flags().String("terraWS", "", "Path to terrad root for websocket connection") 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") 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") 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") 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 == "" { if *terraLCD == "" {
logger.Fatal("Please specify --terraLCD") logger.Fatal("Please specify --terraLCD")
} }
if *terraChaidID == "" { if *terraChainID == "" {
logger.Fatal("Please specify --terraChaidID") logger.Fatal("Please specify --terraChainID")
} }
if *terraContract == "" { if *terraContract == "" {
logger.Fatal("Please specify --terraContract") logger.Fatal("Please specify --terraContract")
@ -425,7 +425,7 @@ func runBridge(cmd *cobra.Command, args []string) {
*ethRPC, *ethRPC,
*terraSupport, *terraSupport,
*terraLCD, *terraLCD,
*terraChaidID, *terraChainID,
*terraContract, *terraContract,
terraFeePayer, terraFeePayer,
) )

View File

@ -316,7 +316,7 @@ func (p *Processor) terraVAASubmission(ctx context.Context, signed *vaa.VAA, has
observationsDirectSubmissionsTotal.WithLabelValues("terra").Inc() 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 err != nil {
if strings.Contains(err.Error(), "VaaAlreadyExecuted") { if strings.Contains(err.Error(), "VaaAlreadyExecuted") {
p.logger.Info("VAA already submitted to Terra by another node, ignoring", p.logger.Info("VAA already submitted to Terra by another node, ignoring",

View File

@ -65,7 +65,7 @@ type Processor struct {
terraEnabled bool terraEnabled bool
terraLCD string terraLCD string
terraChaidID string terraChainID string
terraContract string terraContract string
terraFeePayer string terraFeePayer string
@ -97,7 +97,7 @@ func NewProcessor(
devnetEthRPC string, devnetEthRPC string,
terraEnabled bool, terraEnabled bool,
terraLCD string, terraLCD string,
terraChaidID string, terraChainID string,
terraContract string, terraContract string,
terraFeePayer string) *Processor { terraFeePayer string) *Processor {
@ -115,7 +115,7 @@ func NewProcessor(
terraEnabled: terraEnabled, terraEnabled: terraEnabled,
terraLCD: terraLCD, terraLCD: terraLCD,
terraChaidID: terraChaidID, terraChainID: terraChainID,
terraContract: terraContract, terraContract: terraContract,
terraFeePayer: terraFeePayer, terraFeePayer: terraFeePayer,
@ -179,7 +179,7 @@ func (p *Processor) checkDevModeGuardianSetUpdate(ctx context.Context) error {
// Submit to Terra // Submit to Terra
go func() { go func() {
for { 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 { if err != nil {
p.logger.Error("failed to submit Terra devnet guardian set change, retrying", zap.Error(err)) p.logger.Error("failed to submit Terra devnet guardian set change, retrying", zap.Error(err))
time.Sleep(1 * time.Second) time.Sleep(1 * time.Second)