modules

package
v0.0.0-...-e1b380c Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NumTipsBlocks      int    = 2
	NumOfBlocksForTips int    = 10
	ProtocolSnapshot   string = "/snapshot/0.0.1"
	ProtocolUtxo       string = "/utxo/protocol/0.0.1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PhysicalLayer

type PhysicalLayer struct {
	*stack.Layer
	*node.Node
	// contains filtered or unexported fields
}

func NewPhysicalLayer

func NewPhysicalLayer(config *PhysicalLayerConfig) (*PhysicalLayer, error)

func (*PhysicalLayer) Close

func (p *PhysicalLayer) Close()

func (*PhysicalLayer) GetGenesysRaw

func (p *PhysicalLayer) GetGenesysRaw() ([]byte, error)

func (*PhysicalLayer) HandleMsg

func (p *PhysicalLayer) HandleMsg(direction stack.Direction, data []byte, layer *stack.Layer)

type PhysicalLayerConfig

type PhysicalLayerConfig struct {
	Peers   string
	Genesys string
}

type UtxoLayer

type UtxoLayer struct {
	*stack.Layer
}

func NewUtxoLayer

func NewUtxoLayer(config *UtxoLayerConfig) (*UtxoLayer, error)

func (*UtxoLayer) HandleMsg

func (p *UtxoLayer) HandleMsg(direction stack.Direction, data []byte, layer *stack.Layer)

type UtxoLayerConfig

type UtxoLayerConfig struct {
}

type ValueLayer

type ValueLayer struct {
	*stack.Layer
	*utxo.Engine
}

func NewValueLayer

func NewValueLayer(config *ValueLayerConfig) (*ValueLayer, error)

func (*ValueLayer) HandleMsg

func (p *ValueLayer) HandleMsg(direction stack.Direction, data []byte, layer *stack.Layer)

func (*ValueLayer) Request

func (p *ValueLayer) Request(transaction *utxo.Transaction, input *utxo.Input) (*utxo.Output, error)

Request missing inputs. Transaction is provided to enqueue it again for evaluation once Input is retrieved

func (*ValueLayer) Submitted

func (p *ValueLayer) Submitted(inputs []*utxo.Output, outputs []*utxo.Output)

Transaction is submitted

func (*ValueLayer) Validate

func (p *ValueLayer) Validate(transaction *utxo.Transaction, inputs []*utxo.Output, outputs []*utxo.Output) error

Validate if output to consume and output to insert are sound with respect to the system

type ValueLayerConfig

type ValueLayerConfig struct{}

Jump to

Keyboard shortcuts

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