mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 13:41:37 +00:00
interop: fix the signature of Neo's GetCandidates interop API
This commit is contained in:
parent
2a8ffd9318
commit
5e2a81ad03
2 changed files with 13 additions and 3 deletions
|
@ -53,9 +53,10 @@ func GetCommittee() []interop.PublicKey {
|
||||||
return neogointernal.CallWithToken(Hash, "getCommittee", int(contract.ReadStates)).([]interop.PublicKey)
|
return neogointernal.CallWithToken(Hash, "getCommittee", int(contract.ReadStates)).([]interop.PublicKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetCandidates represents `getCandidates` method of NEO native contract.
|
// GetCandidates represents `getCandidates` method of NEO native contract. It
|
||||||
func GetCandidates() []interop.PublicKey {
|
// returns up to 256 candidates.
|
||||||
return neogointernal.CallWithToken(Hash, "getCandidates", int(contract.ReadStates)).([]interop.PublicKey)
|
func GetCandidates() []Candidate {
|
||||||
|
return neogointernal.CallWithToken(Hash, "getCandidates", int(contract.ReadStates)).([]Candidate)
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetNextBlockValidators represents `getNextBlockValidators` method of NEO native contract.
|
// GetNextBlockValidators represents `getNextBlockValidators` method of NEO native contract.
|
||||||
|
|
9
pkg/interop/native/neo/neo_candidate.go
Normal file
9
pkg/interop/native/neo/neo_candidate.go
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
package neo
|
||||||
|
|
||||||
|
import "github.com/nspcc-dev/neo-go/pkg/interop"
|
||||||
|
|
||||||
|
// Candidate represents a single native Neo candidate.
|
||||||
|
type Candidate struct {
|
||||||
|
Key interop.PublicKey
|
||||||
|
Votes int
|
||||||
|
}
|
Loading…
Reference in a new issue