types

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockApplier

type BlockApplier interface {
	Apply(block *proto.Block) error
	ApplyBytes([]byte) error
}

type Handler

type Handler interface {
	Handle()
}

Abstract handler that called when event happens

type MinerInterrupter

type MinerInterrupter interface {
	Interrupt()
}

Miner mutates state, applying block also. We can't do it together. We should interrupt miner, cause block applying has higher priority.

type Scheduler

type Scheduler interface {
	Reschedule()
}

type SmartState

type SmartState interface {
	AddingBlockHeight() (uint64, error)
	NewestTransactionByID([]byte) (proto.Transaction, error)
	NewestTransactionHeightByID([]byte) (uint64, error)

	// NewestAccountBalance retrieves balance of address in specific currency, asset is asset's ID.
	// nil asset = Waves.
	NewestAccountBalance(account proto.Recipient, asset []byte) (uint64, error)
	NewestAddrByAlias(alias proto.Alias) (proto.Address, error)
	RetrieveNewestIntegerEntry(account proto.Recipient, key string) (*proto.IntegerDataEntry, error)
	RetrieveNewestBooleanEntry(account proto.Recipient, key string) (*proto.BooleanDataEntry, error)
	RetrieveNewestStringEntry(account proto.Recipient, key string) (*proto.StringDataEntry, error)
	RetrieveNewestBinaryEntry(account proto.Recipient, key string) (*proto.BinaryDataEntry, error)
	NewestAssetIsSponsored(assetID crypto.Digest) (bool, error)
	NewestAssetInfo(assetID crypto.Digest) (*proto.AssetInfo, error)
	NewestHeaderByHeight(height proto.Height) (*proto.BlockHeader, error)

	IsNotFound(err error) bool
}

state for smart contracts

type StateHistorySynchronizer

type StateHistorySynchronizer interface {
	Sync()
}

notify state that it must run synchronization

type TransactionWithBytes

type TransactionWithBytes struct {
	T proto.Transaction
	B []byte
}

type UtxPool

type UtxPool interface {
	AddWithBytes(t proto.Transaction, b []byte) (added bool)
	Exists(t proto.Transaction) bool
	Pop() *TransactionWithBytes
}

UtxPool storage interface

Jump to

Keyboard shortcuts

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