board

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board struct {
	DealC          chan dkg.DealBundle
	ResponseC      chan dkg.ResponseBundle
	JustificationC chan dkg.JustificationBundle
	// contains filtered or unexported fields
}

Board is the interface between the dkg protocol and the external world. It consists in pushing packets out to other nodes and receiving in packets from the other nodes. A common board would use the network as the underlying communication mechanism but one can also use a smart contract based approach.

func NewBoard

func NewBoard(
	logger *zap.Logger,
	broadcastF func(msg *wire2.KyberMessage) error,
) *Board

NewBoard creates a new instance of Board structure

func (*Board) IncomingDeal

func (b *Board) IncomingDeal() <-chan dkg.DealBundle

IncomingDeal implements a kyber DKG Board interface function

func (*Board) IncomingJustification

func (b *Board) IncomingJustification() <-chan dkg.JustificationBundle

IncomingJustification implements a kyber DKG Board interface function

func (*Board) IncomingResponse

func (b *Board) IncomingResponse() <-chan dkg.ResponseBundle

IncomingResponse implements a kyber DKG Board interface function

func (*Board) PushDeals

func (b *Board) PushDeals(bundle *dkg.DealBundle)

PushDeals implements a kyber DKG Board interface to broadcast deal bundle

func (*Board) PushJustifications

func (b *Board) PushJustifications(bundle *dkg.JustificationBundle)

PushJustifications implements a kyber DKG interface to broadcast justifications

func (*Board) PushResponses

func (b *Board) PushResponses(bundle *dkg.ResponseBundle)

PushResponses implements a kyber DKG Board interface to broadcast responses

Jump to

Keyboard shortcuts

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