blockproposal

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBlockProposalIsNil      = errors.New("block proposal is nil")
	ErrTrustBaseIsNil          = errors.New("trust base is nil")
	ErrSignerIsNil             = errors.New("signer is nil")
	ErrNodeVerifierIsNil       = errors.New("node signature verifier is nil")
	ErrInvalidSystemIdentifier = errors.New("invalid system identifier")
)

Functions

This section is empty.

Types

type BlockProposal

type BlockProposal struct {
	SystemIdentifier   types.SystemID
	NodeIdentifier     string
	UnicityCertificate *types.UnicityCertificate
	Transactions       []*types.TransactionRecord
	Signature          []byte
	// contains filtered or unexported fields
}

func (*BlockProposal) Hash

func (x *BlockProposal) Hash(algorithm gocrypto.Hash) ([]byte, error)

func (*BlockProposal) IsValid

func (x *BlockProposal) IsValid(nodeSignatureVerifier crypto.Verifier, ucTrustBase map[string]crypto.Verifier, algorithm gocrypto.Hash, systemIdentifier types.SystemID, systemDescriptionHash []byte) error

func (*BlockProposal) Sign

func (x *BlockProposal) Sign(algorithm gocrypto.Hash, signer crypto.Signer) error

func (*BlockProposal) Verify

func (x *BlockProposal) Verify(algorithm gocrypto.Hash, nodeSignatureVerifier crypto.Verifier) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL