committer

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(
	networkName string,
	pm ProcessorManager,
	em driver.EnvelopeService,
	vault Vault,
	finality Finality,
	waitForEventTimeout time.Duration,
	quiet bool,
	eventsPublisher events.Publisher,
	eventsSubscriber events.Subscriber,
) (*committer, error)

Types

type Finality

type Finality interface {
	IsFinal(txID string, address string) error
}

type ProcessorManager

type ProcessorManager interface {
	ProcessByID(txid string) error
}

type TxEvent

type TxEvent struct {
	Txid           string
	DependantTxIDs []string
	Committed      bool
	Block          uint64
	IndexInBlock   int
	CommitPeer     string
	Err            error
}

TxEvent contains information for token transaction commit

type TxEventsListener

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

func (*TxEventsListener) OnReceive

func (l *TxEventsListener) OnReceive(event events.Event)

type Vault

type Vault interface {
	Status(txID string) (driver.ValidationCode, error)
	DiscardTx(txid string) error
	CommitTX(txid string, block uint64, indexInBloc int) error
}

Jump to

Keyboard shortcuts

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