Skip to content
New issue

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

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

Already on GitHub? # to your account

Print previous errors #2279

Merged
merged 1 commit into from
Oct 18, 2024
Merged
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
28 changes: 1 addition & 27 deletions cmd/blockchaincmd/remove_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,32 +203,6 @@ func removeValidatorSOV(
}
ux.Logger.PrintToUser(logging.Yellow.Wrap("PoA manager owner %s pays for the initialization of the validator's removal (Blockchain gas token)"), sc.PoAValidatorManagerOwner)

genesisAddress, genesisPrivateKey, err := contract.GetEVMSubnetPrefundedKey(
app,
network,
chainSpec,
)
if err != nil {
return err
}
privateKey, err := privateKeyFlags.GetPrivateKey(app, genesisPrivateKey)
if err != nil {
return err
}
if privateKey == "" {
privateKey, err = prompts.PromptPrivateKey(
app.Prompt,
"pay for completing removal of validator? (Blockchain gas token)",
app.GetKeyDir(),
app.GetKey,
genesisAddress,
genesisPrivateKey,
)
if err != nil {
return err
}
}

if rpcURL == "" {
rpcURL, _, err = contract.GetBlockchainEndpoints(
app,
Expand Down Expand Up @@ -282,7 +256,7 @@ func removeValidatorSOV(
network,
rpcURL,
chainSpec,
privateKey,
ownerPrivateKey,
validationID,
extraAggregatorPeers,
aggregatorLogLevel,
Expand Down
8 changes: 7 additions & 1 deletion pkg/evm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ func IssueTxsToActivateProposerVMFork(
chainID *big.Int,
privKey *ecdsa.PrivateKey,
) error {
var errorList []error
var err error
for i := 0; i < repeatsOnFailure; i++ {
ctx, cancel := utils.GetAPILargeContext()
Expand All @@ -670,10 +671,15 @@ func IssueTxsToActivateProposerVMFork(
client,
err,
)
errorList = append(errorList, err)
time.Sleep(sleepBetweenRepeats)
}
// this means that on the last try there is error
// print out all previous errors
if err != nil {
ux.Logger.RedXToUser("%s", err)
for _, indivError := range errorList {
ux.Logger.RedXToUser("%s", indivError)
}
}
return err
}
Expand Down
Loading