integration

package
v2.12.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeAccounts

func MakeAccounts(chainInstance chain.Chain, num int) map[types.Address]*Account

Types

type Account

type Account struct {
	Addr       types.Address      // encode
	PrivateKey ed25519.PrivateKey // encode
	PublicKey  ed25519.PublicKey  // encode

	OnRoadBlocks map[types.Hash]*ledger.AccountBlock // encode

	LatestBlock *ledger.AccountBlock // encode
	// contains filtered or unexported fields
}

func NewAccount

func NewAccount(chainInstance chain.Chain, pubKey ed25519.PublicKey, privateKey ed25519.PrivateKey) *Account

func (*Account) AddOnRoadBlock

func (acc *Account) AddOnRoadBlock(block *ledger.AccountBlock)

func (*Account) CreateReceiveBlock

func (acc *Account) CreateReceiveBlock() (*interfaces.VmAccountBlock, error)

No state_bak hash

func (*Account) CreateSendBlock

func (acc *Account) CreateSendBlock(toAccount *Account) (*interfaces.VmAccountBlock, error)

func (*Account) DeleteOnRoad

func (acc *Account) DeleteOnRoad(blockHash types.Hash)

func (*Account) GetLatestHeight

func (acc *Account) GetLatestHeight() uint64

func (*Account) HasOnRoadBlock

func (acc *Account) HasOnRoadBlock() bool

func (*Account) InsertBlock

func (acc *Account) InsertBlock(vmBlock *interfaces.VmAccountBlock, accounts map[types.Address]*Account)

func (*Account) PopOnRoadBlock

func (acc *Account) PopOnRoadBlock() *ledger.AccountBlock

Jump to

Keyboard shortcuts

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