state

package
v0.0.0-...-dd5a67f Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	PublicKey *ecdsa.PublicKey
	Nonce     uint64
	Balance   uint64
}

func NewAccount

func NewAccount(pubkey *ecdsa.PublicKey, nonce uint64, balance uint64) *Account

func (*Account) Copy

func (acc *Account) Copy() *Account

func (*Account) Print

func (acc *Account) Print()

func (*Account) PrintAccount

func (acc *Account) PrintAccount()

type Accounts

type Accounts map[ecdsa.PublicKey]*Account // pubkey - Account

func NewAccounts

func NewAccounts() Accounts

func (Accounts) Add

func (s Accounts) Add(acc *Account)

func (Accounts) CheckNegativeBalance

func (s Accounts) CheckNegativeBalance()

check that if there is account.Balance < 0

func (Accounts) GetBalance

func (s Accounts) GetBalance(pubkey *ecdsa.PublicKey) uint64

func (Accounts) GetNonce

func (s Accounts) GetNonce(pubkey *ecdsa.PublicKey) uint64

func (Accounts) NewAccount

func (s Accounts) NewAccount(pubkey *ecdsa.PublicKey, nonce uint64, balance uint64) *Account

func (Accounts) Print

func (s Accounts) Print()

func (Accounts) PrintAccountsSum

func (s Accounts) PrintAccountsSum()

type State

type State map[ecdsa.PublicKey]common.Hash // pubkey - TxHash (user's current tx hash)

func (State) Print

func (s State) Print()

Jump to

Keyboard shortcuts

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