chainutil

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForBlockConfirmations

func WaitForBlockConfirmations(
	blockHeightWaiter BlockHeightWaiter,
	startBlockNumber uint64,
	blockConfirmations uint64,
	stateCheck func() (bool, error),
) (bool, error)

WaitForBlockConfirmations ensures that after receiving specific number of block confirmations the state of the chain is actually as expected. It waits for predefined number of blocks since the start block number provided. After the required block number is reached it performs a check of the chain state with a provided function returning a boolean value.

Types

type BlockHeightWaiter

type BlockHeightWaiter interface {
	WaitForBlockHeight(blockNumber uint64) error
}

BlockHeightWaiter provides the ability to wait for a given block height.

Jump to

Keyboard shortcuts

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