nodeconn

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0, BSD-2-Clause Imports: 20 Imported by: 0

Documentation

Overview

nodeconn package provides an interface to the L1 node (Hornet). This component is responsible for:

  • Protocol details.
  • Block reattachments and promotions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

Types

type LedgerUpdateHandler

type LedgerUpdateHandler func(*nodebridge.LedgerUpdate)

type PendingTransaction

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

PendingTransaction holds info about a sent transaction that is pending.

func NewPendingTransaction

func NewPendingTransaction(ctxPendingTransaction context.Context, cancelPendingTransaction context.CancelFunc, transaction *iotago.Transaction) (*PendingTransaction, error)

func (*PendingTransaction) BlockID

func (tx *PendingTransaction) BlockID() iotago.BlockID

func (*PendingTransaction) Confirmed

func (tx *PendingTransaction) Confirmed() bool

func (*PendingTransaction) ConflictReason

func (tx *PendingTransaction) ConflictReason() error

func (*PendingTransaction) Conflicting

func (tx *PendingTransaction) Conflicting() bool

func (*PendingTransaction) ConsumedInputs

func (tx *PendingTransaction) ConsumedInputs() iotago.OutputIDs

func (*PendingTransaction) ID

func (*PendingTransaction) SetBlockID

func (tx *PendingTransaction) SetBlockID(blockID iotago.BlockID)

func (*PendingTransaction) SetConfirmed

func (tx *PendingTransaction) SetConfirmed()

func (*PendingTransaction) SetConflicting

func (tx *PendingTransaction) SetConflicting(reason error)

func (*PendingTransaction) Transaction

func (tx *PendingTransaction) Transaction() *iotago.Transaction

func (*PendingTransaction) WaitUntilConfirmed

func (tx *PendingTransaction) WaitUntilConfirmed() error

WaitUntilConfirmed waits until a given tx Block is confirmed, it takes care of promotions/re-attachments for that Block

Jump to

Keyboard shortcuts

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