sync_internal

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoSignaturesExpectedErr = proto.NewInfoMsg(errors.New("no signatures expected"))
View Source
var UnexpectedBlockErr = proto.NewInfoMsg(errors.New("unexpected block"))

Functions

This section is empty.

Types

type BlockApplied

type BlockApplied bool

type Blocks

type Blocks []*proto.Block

type ChangePeerNeeded added in v0.10.0

type ChangePeerNeeded = bool

type Eof

type Eof = bool

type Internal

type Internal struct {
	// contains filtered or unexported fields
}

func InternalFromLastSignatures

func InternalFromLastSignatures(p extension.PeerExtension, signatures *signatures.ReverseOrdering) Internal

func NewInternal

func NewInternal(orderedBlocks *ordered_blocks.OrderedBlocks, respondedSignatures *signatures.ReverseOrdering, waitingForSignatures bool) Internal

func (Internal) AvailableCount

func (a Internal) AvailableCount() int

func (Internal) Block

func (a Internal) Block(block *proto.Block) (Internal, error)

func (Internal) BlockIDs

func (a Internal) BlockIDs(p PeerExtension, ids []proto.BlockID) (Internal, error)

func (Internal) Blocks

func (a Internal) Blocks(p peerExtension, needToChangePeerSyncWithFunc func() bool) (Internal, Blocks, Eof, ChangePeerNeeded)

func (Internal) RequestedCount added in v0.8.0

func (a Internal) RequestedCount() int

func (Internal) WaitingForSignatures

func (a Internal) WaitingForSignatures() bool

type PeerExtension

type PeerExtension interface {
	AskBlocksIDs(id []proto.BlockID)
	AskBlock(id proto.BlockID)
}

Jump to

Keyboard shortcuts

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