-
Notifications
You must be signed in to change notification settings - Fork 674
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
Refactor subnet validator primary network requirements #2014
Conversation
@@ -524,24 +532,8 @@ func verifyAddPermissionlessValidatorTx( | |||
|
|||
var txFee uint64 | |||
if tx.Subnet != constants.PrimaryNetworkID { | |||
primaryNetworkValidator, err := GetValidator(chainState, constants.PrimaryNetworkID, tx.Validator.NodeID) | |||
if err != nil { |
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.
The functionality change in this PR is adding the following code here:
if err == database.ErrNotFound {
return fmt.Errorf(
"%s %w of the primary network",
validator.NodeID,
ErrNotValidator,
)
}
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.
to clarify, this should not change validity because the functional change is to provide a more specific error message and both errors are treated the same
Signed-off-by: Dhruba Basu <[email protected]>
Why this should be merged
De-dupes some logic
How this works
helper function :)
How this was tested
CI