core/crypto: add validators and interop for validators

add processing of validators while block persist;
add validator structure with decoding/encoding;
add validator get from store;
add EnrollmentTX and StateTX processing;
add pubkey decode bytes, unique and contains functions;
This commit is contained in:
Vsevolod Brekelov 2019-11-11 18:25:28 +03:00
parent d2bdae99e4
commit c80ee952a1
7 changed files with 435 additions and 32 deletions

View file

@ -11,6 +11,7 @@ import (
"github.com/CityOfZion/neo-go/pkg/core"
"github.com/CityOfZion/neo-go/pkg/core/storage"
"github.com/CityOfZion/neo-go/pkg/core/transaction"
"github.com/CityOfZion/neo-go/pkg/crypto/keys"
"github.com/CityOfZion/neo-go/pkg/network/payload"
"github.com/CityOfZion/neo-go/pkg/util"
"github.com/CityOfZion/neo-go/pkg/vm"
@ -77,6 +78,9 @@ func (chain testChain) GetAssetState(util.Uint256) *core.AssetState {
func (chain testChain) GetAccountState(util.Uint160) *core.AccountState {
panic("TODO")
}
func (chain testChain) GetValidators(...*transaction.Transaction) ([]*keys.PublicKey, error) {
panic("TODO")
}
func (chain testChain) GetScriptHashesForVerifying(*transaction.Transaction) ([]util.Uint160, error) {
panic("TODO")
}