ledger

package
v2.10.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLedger

func NewLedger(bc chain.BlockChain) *ledger

Types

type Ledger

type Ledger interface {
	MiningSnapshotBlock(address string, timestamp int64) error
	// from self
	RequestAccountBlock(from string, to string, amount int) error
	ResponseAccountBlock(from string, to string, reqHash string) error
	// create account genesis block
	GetAccountBalance(address string) int

	ListRequest(address string) []*Req
	Start()
	Stop()
	Init(syncer syncer.Syncer)

	ListAccountBlock(address string) []*common.AccountStateBlock
	ListSnapshotBlock() []*common.SnapshotBlock
	Chain() chain.BlockChain
	Pool() pool.BlockPool
}

type Req

type Req struct {
	ReqHash common.Hash

	Amount common.Balance
	From   common.Address
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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