-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use local machine to join as validator on any L1 #2548
Merged
Merged
Changes from 8 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
98be86e
use local machine to join as validator
sukantoraymond d57eb99
Merge branch 'main' into local-add-validator
sukantoraymond 8076e6a
fix lint
sukantoraymond 830b1d2
update validate function
sukantoraymond e310ba7
Merge branch 'main' into local-add-validator
sukantoraymond d6793bf
local machine validate l1
sukantoraymond 4177a8e
update command description
sukantoraymond 07e8310
Merge branch 'main' into local-add-validator
sukantoraymond 04f5e35
lint
sukantoraymond ba9ad16
lint
sukantoraymond e0bbeec
address comments
sukantoraymond 6976cdc
Merge branch 'main' into local-add-validator
sukantoraymond c43b351
fix merge
sukantoraymond b61952a
address comments
sukantoraymond a7114e1
enable more than 1 node in a cluster to validate
sukantoraymond a4b0408
address comments
sukantoraymond 7b4f67a
fix lint
sukantoraymond f4aa364
fix lint
sukantoraymond File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -289,46 +289,3 @@ func getThreshold(maxLen int) (uint32, error) { | |
} | ||
return uint32(intTh), err | ||
} | ||
|
||
func getKeyForChangeOwner(network models.Network) (string, error) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moving these functions to blockchain pkg so that it can be re used across cmds |
||
changeAddrPrompt := "Which key would you like to set as change owner for leftover AVAX if the node is removed from validator set?" | ||
|
||
const ( | ||
getFromStored = "Get address from an existing stored key (created from avalanche key create or avalanche key import)" | ||
custom = "Custom" | ||
) | ||
|
||
listOptions := []string{getFromStored, custom} | ||
listDecision, err := app.Prompt.CaptureList(changeAddrPrompt, listOptions) | ||
if err != nil { | ||
return "", err | ||
} | ||
|
||
var key string | ||
|
||
switch listDecision { | ||
case getFromStored: | ||
key, err = prompts.CaptureKeyAddress( | ||
app.Prompt, | ||
"be set as a change owner for leftover AVAX", | ||
app.GetKeyDir(), | ||
app.GetKey, | ||
network, | ||
prompts.PChainFormat, | ||
) | ||
if err != nil { | ||
return "", err | ||
} | ||
case custom: | ||
addrPrompt := "Enter change address (P-chain format)" | ||
changeAddr, err := app.Prompt.CaptureAddress(addrPrompt) | ||
if err != nil { | ||
return "", err | ||
} | ||
key = changeAddr.String() | ||
} | ||
if err != nil { | ||
return "", err | ||
} | ||
return key, nil | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving these functions to blockchain pkg so that it can be re used across cmds