codec

package
v0.0.0-...-41d3419 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2025 License: AGPL-3.0, AGPL-3.0-or-later Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultExtendedCommitCodec

type DefaultExtendedCommitCodec struct{}

DefaultExtendedCommitCodec is the default implementation of ExtendedCommitCodec. It uses the vanilla implementations of Unmarshal / Marshal under the hood.

func NewDefaultExtendedCommitCodec

func NewDefaultExtendedCommitCodec() *DefaultExtendedCommitCodec

NewDefaultExtendedCommitCodec returns a new DefaultExtendedCommitCodec.

func (*DefaultExtendedCommitCodec) Decode

func (*DefaultExtendedCommitCodec) Encode

func (codec *DefaultExtendedCommitCodec) Encode(extendedCommitInfo abci.ExtendedCommitInfo) ([]byte, error)

type DefaultVoteExtensionCodec

type DefaultVoteExtensionCodec struct{}

DefaultVoteExtensionCodec is the default implementation of VoteExtensionCodec. It uses the vanilla implementations of Unmarshal / Marshal under the hood.

func NewDefaultVoteExtensionCodec

func NewDefaultVoteExtensionCodec() *DefaultVoteExtensionCodec

func (*DefaultVoteExtensionCodec) Decode

func (*DefaultVoteExtensionCodec) Encode

type ExtendedCommitCodec

type ExtendedCommitCodec interface {
	// Encode encodes the extended commit info into a byte array.
	Encode(abci.ExtendedCommitInfo) ([]byte, error)

	// Decode decodes the extended commit info from a byte array.
	Decode([]byte) (abci.ExtendedCommitInfo, error)
}

type VoteExtensionCodec

type VoteExtensionCodec interface {
	// Encode encodes the vote extension into a byte array.
	Encode(ve vetypes.DaemonVoteExtension) ([]byte, error)

	// Decode decodes the vote extension from a byte array.
	Decode([]byte) (vetypes.DaemonVoteExtension, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳