Skip to content

Commit

Permalink
Continue on error remove validator (#2280)
Browse files Browse the repository at this point in the history
* contiunue if validator removal process already started

* address PR comment
  • Loading branch information
felipemadero authored Oct 18, 2024
1 parent 4708121 commit 02d803e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/validatormanager/removal.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ package validatormanager

import (
_ "embed"
"errors"
"math/big"

"github.com/ava-labs/avalanche-cli/pkg/application"
"github.com/ava-labs/avalanche-cli/pkg/contract"
"github.com/ava-labs/avalanche-cli/pkg/evm"
"github.com/ava-labs/avalanche-cli/pkg/models"
"github.com/ava-labs/avalanche-cli/pkg/ux"
"github.com/ava-labs/avalanche-cli/sdk/interchain"
"github.com/ava-labs/avalanchego/api/info"
"github.com/ava-labs/avalanchego/ids"
Expand Down Expand Up @@ -129,7 +131,10 @@ func InitValidatorRemoval(
validationID,
)
if err != nil {
return nil, ids.Empty, evm.TransactionError(tx, err, "failure initializing validator removal")
if !errors.Is(err, errInvalidValidatorStatus) {
return nil, ids.Empty, evm.TransactionError(tx, err, "failure initializing validator removal")
}
ux.Logger.PrintToUser("the validator removal process was already initialized. Proceesing to the next step")
}

aggregatorLogLevel, err := logging.ToLevel(aggregatorLogLevelStr)
Expand Down

0 comments on commit 02d803e

Please sign in to comment.