integration

package
v2.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: GPL-3.0 Imports: 10 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() (*vm_db.VmAccountBlock, error)

No state_bak hash

func (*Account) CreateSendBlock

func (acc *Account) CreateSendBlock(toAccount *Account) (*vm_db.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 *vm_db.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