forked from TrueCloudLab/neoneo-go
b77e533d13
And drop associated _pkg.dev remnants (refs. #307). Original `dev` branch had two separate packages for public and private keys, but those are so intertwined (`TestHelper` subpackage is a proof) that it's better unite them and all associated code (like WIF and NEP-2) in one package. This patch also: * creates internal `keytestcases` package to share things with wallet (maybe it'll be changed in some future) * ports some tests from `dev` * ports Verify() method for public key from `dev` * expands TestPrivateKey() with public key check
16 lines
385 B
Go
16 lines
385 B
Go
package core
|
|
|
|
import (
|
|
"github.com/CityOfZion/neo-go/pkg/crypto/keys"
|
|
"github.com/CityOfZion/neo-go/pkg/util"
|
|
)
|
|
|
|
// Validators is a mapping between public keys and ValidatorState.
|
|
type Validators map[*keys.PublicKey]*ValidatorState
|
|
|
|
// ValidatorState holds the state of a validator.
|
|
type ValidatorState struct {
|
|
PublicKey *keys.PublicKey
|
|
Registered bool
|
|
Votes util.Fixed8
|
|
}
|