Documentation ¶
Index ¶
- Variables
- func AccountsWith(acct WeaveAccounts) orm.Object
- func RegisterQuery(qr weave.QueryRouter)
- func RegisterRoutes(r weave.Registry, auth x.Authenticator)
- type AccountBucket
- type Accounts
- func (*Accounts) Descriptor() ([]byte, []int)
- func (m *Accounts) GetAddresses() [][]byte
- func (m *Accounts) GetMetadata() *weave.Metadata
- func (m *Accounts) Marshal() (dAtA []byte, err error)
- func (m *Accounts) MarshalTo(dAtA []byte) (int, error)
- func (*Accounts) ProtoMessage()
- func (m *Accounts) Reset()
- func (m *Accounts) Size() (n int)
- func (m *Accounts) String() string
- func (m *Accounts) Unmarshal(dAtA []byte) error
- func (m *Accounts) Validate() error
- func (m *Accounts) XXX_DiscardUnknown()
- func (m *Accounts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Accounts) XXX_Merge(src proto.Message)
- func (m *Accounts) XXX_Size() int
- func (m *Accounts) XXX_Unmarshal(b []byte) error
- type ApplyDiffMsg
- func (m *ApplyDiffMsg) AsABCI() []abci.ValidatorUpdate
- func (*ApplyDiffMsg) Descriptor() ([]byte, []int)
- func (m *ApplyDiffMsg) GetMetadata() *weave.Metadata
- func (m *ApplyDiffMsg) GetValidatorUpdates() []weave.ValidatorUpdate
- func (m *ApplyDiffMsg) Marshal() (dAtA []byte, err error)
- func (m *ApplyDiffMsg) MarshalTo(dAtA []byte) (int, error)
- func (*ApplyDiffMsg) Path() string
- func (*ApplyDiffMsg) ProtoMessage()
- func (m *ApplyDiffMsg) Reset()
- func (m *ApplyDiffMsg) Size() (n int)
- func (m *ApplyDiffMsg) String() string
- func (m *ApplyDiffMsg) Unmarshal(dAtA []byte) error
- func (m *ApplyDiffMsg) Validate() error
- func (m *ApplyDiffMsg) XXX_DiscardUnknown()
- func (m *ApplyDiffMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ApplyDiffMsg) XXX_Merge(src proto.Message)
- func (m *ApplyDiffMsg) XXX_Size() int
- func (m *ApplyDiffMsg) XXX_Unmarshal(b []byte) error
- type Initializer
- type WeaveAccounts
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthCodec = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowCodec = fmt.Errorf("proto: integer overflow") )
Functions ¶
func AccountsWith ¶
func AccountsWith(acct WeaveAccounts) orm.Object
func RegisterQuery ¶
func RegisterQuery(qr weave.QueryRouter)
RegisterQuery will register this bucket as "/validators".
func RegisterRoutes ¶
func RegisterRoutes(r weave.Registry, auth x.Authenticator)
RegisterRoutes will instantiate and register all handlers in this package.
Types ¶
type AccountBucket ¶ added in v0.15.0
func NewAccountBucket ¶ added in v0.15.0
func NewAccountBucket() *AccountBucket
func (*AccountBucket) GetAccounts ¶ added in v0.15.0
func (b *AccountBucket) GetAccounts(kv weave.KVStore) (*Accounts, error)
type Accounts ¶
type Accounts struct { Metadata *weave.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` Addresses [][]byte `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"` }
Accounts is a list of accounts allowed to update validators
func AsAccounts ¶
func AsAccounts(a WeaveAccounts) *Accounts
func (*Accounts) Descriptor ¶
func (*Accounts) GetAddresses ¶
func (*Accounts) GetMetadata ¶ added in v0.15.0
func (*Accounts) ProtoMessage ¶
func (*Accounts) ProtoMessage()
func (*Accounts) XXX_DiscardUnknown ¶ added in v0.12.0
func (m *Accounts) XXX_DiscardUnknown()
func (*Accounts) XXX_Marshal ¶ added in v0.12.0
func (*Accounts) XXX_Unmarshal ¶ added in v0.12.0
type ApplyDiffMsg ¶ added in v0.17.0
type ApplyDiffMsg struct { Metadata *weave.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` ValidatorUpdates []weave.ValidatorUpdate `protobuf:"bytes,2,rep,name=validator_updates,json=validatorUpdates,proto3" json:"validator_updates"` }
ApplyDiffMsg is designed to update validator power
func (*ApplyDiffMsg) AsABCI ¶ added in v0.17.0
func (m *ApplyDiffMsg) AsABCI() []abci.ValidatorUpdate
func (*ApplyDiffMsg) Descriptor ¶ added in v0.17.0
func (*ApplyDiffMsg) Descriptor() ([]byte, []int)
func (*ApplyDiffMsg) GetMetadata ¶ added in v0.17.0
func (m *ApplyDiffMsg) GetMetadata() *weave.Metadata
func (*ApplyDiffMsg) GetValidatorUpdates ¶ added in v0.17.0
func (m *ApplyDiffMsg) GetValidatorUpdates() []weave.ValidatorUpdate
func (*ApplyDiffMsg) Marshal ¶ added in v0.17.0
func (m *ApplyDiffMsg) Marshal() (dAtA []byte, err error)
func (*ApplyDiffMsg) MarshalTo ¶ added in v0.17.0
func (m *ApplyDiffMsg) MarshalTo(dAtA []byte) (int, error)
func (*ApplyDiffMsg) Path ¶ added in v0.17.0
func (*ApplyDiffMsg) Path() string
Path implements weave.Msg interface.
func (*ApplyDiffMsg) ProtoMessage ¶ added in v0.17.0
func (*ApplyDiffMsg) ProtoMessage()
func (*ApplyDiffMsg) Reset ¶ added in v0.17.0
func (m *ApplyDiffMsg) Reset()
func (*ApplyDiffMsg) Size ¶ added in v0.17.0
func (m *ApplyDiffMsg) Size() (n int)
func (*ApplyDiffMsg) String ¶ added in v0.17.0
func (m *ApplyDiffMsg) String() string
func (*ApplyDiffMsg) Unmarshal ¶ added in v0.17.0
func (m *ApplyDiffMsg) Unmarshal(dAtA []byte) error
func (*ApplyDiffMsg) Validate ¶ added in v0.17.0
func (m *ApplyDiffMsg) Validate() error
func (*ApplyDiffMsg) XXX_DiscardUnknown ¶ added in v0.17.0
func (m *ApplyDiffMsg) XXX_DiscardUnknown()
func (*ApplyDiffMsg) XXX_Marshal ¶ added in v0.17.0
func (m *ApplyDiffMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ApplyDiffMsg) XXX_Merge ¶ added in v0.17.0
func (m *ApplyDiffMsg) XXX_Merge(src proto.Message)
func (*ApplyDiffMsg) XXX_Size ¶ added in v0.17.0
func (m *ApplyDiffMsg) XXX_Size() int
func (*ApplyDiffMsg) XXX_Unmarshal ¶ added in v0.17.0
func (m *ApplyDiffMsg) XXX_Unmarshal(b []byte) error
type Initializer ¶
type Initializer struct{}
Initializer fulfils the InitStater interface to load data from the genesis file
func (Initializer) FromGenesis ¶
func (Initializer) FromGenesis(opts weave.Options, params weave.GenesisParams, kv weave.KVStore) error
FromGenesis will parse initial account info from genesis and save it to the database
type WeaveAccounts ¶
WeaveAccounts is used to parse the json from genesis file use weave.Address, so address in hex, not base64
func AsWeaveAccounts ¶
func AsWeaveAccounts(a *Accounts) WeaveAccounts
func (WeaveAccounts) Validate ¶
func (wa WeaveAccounts) Validate() error
Click to show internal directories.
Click to hide internal directories.