state

package
v0.0.0-...-11d313d Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var G_Params = new(globalParameters)

Functions

func ProfileReducedData

func ProfileReducedData(data []byte) (red []byte)

Types

type Addresses

type Addresses struct {
	M map[string]bool
}

func (*Addresses) Add

func (a *Addresses) Add(address string)

func (*Addresses) Init

func (a *Addresses) Init()

type BlockNumber

type BlockNumber struct {
	// this struct is used in EHub as global state
	sync.RWMutex
	BlockNumber uint64

	GasLimit uint64
	GasPrice uint64
	// contains filtered or unexported fields
}
var G_BlockNumber *BlockNumber

func (*BlockNumber) GetGasLimit

func (b *BlockNumber) GetGasLimit() (gl uint64, er error)

func (*BlockNumber) GetGasPrice

func (b *BlockNumber) GetGasPrice() (gp uint64, er error)

func (*BlockNumber) NowHex

func (b *BlockNumber) NowHex() string

func (*BlockNumber) NowUint64

func (b *BlockNumber) NowUint64() uint64

keeping both uint64 and hex rep handy since both may be used repeatedly

func (*BlockNumber) SetGasLimit

func (b *BlockNumber) SetGasLimit(gl uint64)

func (*BlockNumber) SetGasPrice

func (b *BlockNumber) SetGasPrice(gp uint64)

func (*BlockNumber) SetInt

func (b *BlockNumber) SetInt(BlockNumberInt uint64)

func (*BlockNumber) SetString

func (b *BlockNumber) SetString(BlockNumberHex string) (er error)

type Profile

type Profile struct {
	IsContract NYUP // No,Yes,Unknown,Probably
	PendingTxs *blockN2TxInfo
}

type ProfileMgr

type ProfileMgr struct {
	// this struct is used in EHub as global state
	sync.RWMutex

	Address2Profile  *address2Profile
	BlockN2Addresses *blockN2Addresses
	BlocksDLL        *DoublyLinkedList
	// contains filtered or unexported fields
}
var G_ProfileMgr *ProfileMgr

func (*ProfileMgr) AddData

func (p *ProfileMgr) AddData(blockNumber string, data []byte)

func (*ProfileMgr) CheckPendingTxsForOverextension

func (p *ProfileMgr) CheckPendingTxsForOverextension(address string,
	balance, value uint64) (ok bool)

func (*ProfileMgr) DeleteDataUpTo

func (p *ProfileMgr) DeleteDataUpTo(nAgo uint64)

func (*ProfileMgr) Init

func (p *ProfileMgr) Init(lookback uint64)

func (*ProfileMgr) SetIsAddressContract

func (p *ProfileMgr) SetIsAddressContract(address string, yOrN NYUP)

func (*ProfileMgr) Update

func (p *ProfileMgr) Update()

type TxID2Cost

type TxID2Cost struct {
	M map[string]uint64
}

type TxMgr

type TxMgr struct {
	// this struct is used in EHub as global state
	sync.RWMutex
	PendingProcessedTxs map[string]bool
	ProcessedTxs        map[string]bool
	// contains filtered or unexported fields
}
var G_TxMgr *TxMgr

func (*TxMgr) Init

func (t *TxMgr) Init()

func (*TxMgr) PendingTxHasBeenProcessed

func (t *TxMgr) PendingTxHasBeenProcessed(tx string) (tf bool)

func (*TxMgr) TxHasBeenProcessed

func (t *TxMgr) TxHasBeenProcessed(tx string) (tf bool)

Jump to

Keyboard shortcuts

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