-
Notifications
You must be signed in to change notification settings - Fork 38
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
fix/Do not vote for the same validators list twice #2443
fix/Do not vote for the same validators list twice #2443
Conversation
@AnnaShaleva, @roman-khimov, ping me if you think that we need to make it more accurate with |
Codecov Report
@@ Coverage Diff @@
## master #2443 +/- ##
==========================================
- Coverage 29.47% 29.43% -0.04%
==========================================
Files 399 399
Lines 30381 30410 +29
==========================================
- Hits 8954 8952 -2
- Misses 20684 20715 +31
Partials 743 743
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
e77a8d1
to
d0fe1b5
Compare
303ab1d
to
8467193
Compare
pkg/morph/client/client.go
Outdated
@@ -419,6 +421,30 @@ func (c *Client) IsValidScript(script []byte, signers []transaction.Signer) (res | |||
return result.State == vmstate.Halt.String(), nil | |||
} | |||
|
|||
// AccountVote returns a key the provided account has voted with its NEO | |||
// tokens for. Nil key with no error is returned if the account has no NEO. |
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.
Nil key with no error is returned if the account has no NEO
or when account has some NEO and didn't voted for anyone.
It returns a vote made by a NEO holder. Does not cache NEO contract reader cause its creation needs no network and the whole `morph.Client` is likely to be refactored soon. Signed-off-by: Pavel Karpy <[email protected]>
Closes nspcc-dev#2365. Signed-off-by: Pavel Karpy <[email protected]>
8467193
to
1eb6273
Compare
Closes #2365.