Documentation
¶
Overview ¶
Package vemanager implements a vote extension manager, which is a way of aggregating multiple vote extensions into a single one.
In Warden, we use this to aggregate slinky and x/async vote extensions.
Index ¶
- Variables
- type VoteExtensionManager
- type VoteExtensions
- func (*VoteExtensions) Descriptor() ([]byte, []int)
- func (m *VoteExtensions) GetExtensions() [][]byte
- func (m *VoteExtensions) Marshal() (dAtA []byte, err error)
- func (m *VoteExtensions) MarshalTo(dAtA []byte) (int, error)
- func (m *VoteExtensions) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*VoteExtensions) ProtoMessage()
- func (m *VoteExtensions) Reset()
- func (m *VoteExtensions) Size() (n int)
- func (m *VoteExtensions) String() string
- func (m *VoteExtensions) Unmarshal(dAtA []byte) error
- func (m *VoteExtensions) XXX_DiscardUnknown()
- func (m *VoteExtensions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VoteExtensions) XXX_Merge(src proto.Message)
- func (m *VoteExtensions) XXX_Size() int
- func (m *VoteExtensions) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type VoteExtensionManager ¶
type VoteExtensionManager struct {
// contains filtered or unexported fields
}
VoteExtensionManager wraps multiple ABCI handlers (ExtendVoteHandler, VerifyVoteExtensionHandler) and exposes a single ABCI handler that aggregates all of them.
func NewVoteExtensionManager ¶
func NewVoteExtensionManager() *VoteExtensionManager
NewVoteExtensionManager creates a new empty VoteExtensionManager.
func (*VoteExtensionManager) ExtendVoteHandler ¶
func (m *VoteExtensionManager) ExtendVoteHandler() sdk.ExtendVoteHandler
ExtendVoteHandler returns the ExtendVoteHandler that aggregates all the registered ExtendVoteHandlers.
func (*VoteExtensionManager) Register ¶
func (m *VoteExtensionManager) Register( extendVoteHandler sdk.ExtendVoteHandler, verifyVoteExtensionHandler sdk.VerifyVoteExtensionHandler, )
Register new ABCI handlers to the manager.
CONTRACT: changing the order of registration it's a consensus breaking change.
func (*VoteExtensionManager) VerifyVoteExtensionHandler ¶
func (m *VoteExtensionManager) VerifyVoteExtensionHandler() sdk.VerifyVoteExtensionHandler
VerifyVoteExtensionHandler returns the VerifyVoteExtensionHandler that aggregates all the registered VerifyVoteExtensionHandlers.
type VoteExtensions ¶
type VoteExtensions struct {
Extensions [][]byte `protobuf:"bytes,1,rep,name=extensions,proto3" json:"extensions,omitempty"`
}
ABCI treats a VoteExtensions as a byte array, but we need to distinguish between multiple extensions coming from different sources, i.e. we want an array of byte arrays, which is what this type represents.
func (*VoteExtensions) Descriptor ¶
func (*VoteExtensions) Descriptor() ([]byte, []int)
func (*VoteExtensions) GetExtensions ¶
func (m *VoteExtensions) GetExtensions() [][]byte
func (*VoteExtensions) Marshal ¶
func (m *VoteExtensions) Marshal() (dAtA []byte, err error)
func (*VoteExtensions) MarshalToSizedBuffer ¶
func (m *VoteExtensions) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*VoteExtensions) ProtoMessage ¶
func (*VoteExtensions) ProtoMessage()
func (*VoteExtensions) Reset ¶
func (m *VoteExtensions) Reset()
func (*VoteExtensions) Size ¶
func (m *VoteExtensions) Size() (n int)
func (*VoteExtensions) String ¶
func (m *VoteExtensions) String() string
func (*VoteExtensions) Unmarshal ¶
func (m *VoteExtensions) Unmarshal(dAtA []byte) error
func (*VoteExtensions) XXX_DiscardUnknown ¶
func (m *VoteExtensions) XXX_DiscardUnknown()
func (*VoteExtensions) XXX_Marshal ¶
func (m *VoteExtensions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VoteExtensions) XXX_Merge ¶
func (m *VoteExtensions) XXX_Merge(src proto.Message)
func (*VoteExtensions) XXX_Size ¶
func (m *VoteExtensions) XXX_Size() int
func (*VoteExtensions) XXX_Unmarshal ¶
func (m *VoteExtensions) XXX_Unmarshal(b []byte) error