types

package
v0.7.10 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2014 License: LGPL-2.1-or-later Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BloomLookup

func BloomLookup(bin, topic []byte) bool

func CreateBloom

func CreateBloom(receipts Receipts) []byte

func DeriveSha

func DeriveSha(list DerivableList) []byte

func IsContractAddr added in v0.7.10

func IsContractAddr(addr []byte) bool

func LogsBloom

func LogsBloom(logs state.Logs) *big.Int

func Number

func Number(b1, b2 *Block) bool

Types

type Block

type Block struct {
	// Hash to the previous block
	PrevHash ethutil.Bytes
	// Uncles of this block
	Uncles   Blocks
	UncleSha []byte
	// The coin base address
	Coinbase []byte

	// Difficulty for the current block
	Difficulty *big.Int
	// Creation time
	Time int64
	// The block number
	Number *big.Int
	// Gas limit
	GasLimit *big.Int
	// Gas used
	GasUsed *big.Int
	// Extra data
	Extra string
	// Block Nonce for verification
	Nonce ethutil.Bytes

	TxSha, ReceiptSha []byte
	LogsBloom         []byte

	Reward *big.Int
	// contains filtered or unexported fields
}

func CreateBlock added in v0.7.10

func CreateBlock(root interface{},
	prevHash []byte,
	base []byte,
	Difficulty *big.Int,
	Nonce []byte,
	extra string) *Block

func NewBlockFromBytes added in v0.7.10

func NewBlockFromBytes(raw []byte) *Block

func NewBlockFromRlpValue added in v0.7.10

func NewBlockFromRlpValue(rlpValue *ethutil.Value) *Block

New block takes a raw encoded string

func NewUncleBlockFromValue added in v0.7.10

func NewUncleBlockFromValue(header *ethutil.Value) *Block

func (*Block) BlockInfo added in v0.7.10

func (block *Block) BlockInfo() BlockInfo

func (*Block) CalcGasLimit added in v0.7.10

func (block *Block) CalcGasLimit(parent *Block) *big.Int

func (*Block) Diff added in v0.7.10

func (block *Block) Diff() *big.Int

func (*Block) GetTransaction added in v0.7.10

func (self *Block) GetTransaction(hash []byte) *Transaction

func (*Block) Hash

func (block *Block) Hash() ethutil.Bytes

Returns a hash of the block

func (*Block) HashNoNonce added in v0.7.10

func (block *Block) HashNoNonce() []byte

func (*Block) N added in v0.7.10

func (self *Block) N() []byte

Implement pow.Block

func (*Block) Receipts added in v0.7.10

func (self *Block) Receipts() []*Receipt

func (*Block) RlpData added in v0.7.10

func (self *Block) RlpData() interface{}

Implement RlpEncodable

func (*Block) RlpDecode added in v0.7.10

func (block *Block) RlpDecode(data []byte)

func (*Block) RlpEncode added in v0.7.10

func (block *Block) RlpEncode() []byte

func (*Block) RlpValueDecode added in v0.7.10

func (block *Block) RlpValueDecode(decoder *ethutil.Value)

func (*Block) Root

func (block *Block) Root() interface{}

func (*Block) SetReceipts added in v0.7.10

func (self *Block) SetReceipts(receipts Receipts)

func (*Block) SetTransactions added in v0.7.10

func (self *Block) SetTransactions(txs Transactions)

func (*Block) SetUncles added in v0.7.10

func (block *Block) SetUncles(uncles []*Block)

func (*Block) Size

func (self *Block) Size() ethutil.StorageSize

func (*Block) State added in v0.7.10

func (block *Block) State() *state.StateDB

func (*Block) String added in v0.7.10

func (block *Block) String() string

func (*Block) Sync added in v0.7.10

func (block *Block) Sync()

Sync the block's state and contract respectively

func (*Block) Transactions

func (block *Block) Transactions() Transactions

func (*Block) Trie added in v0.7.10

func (block *Block) Trie() *trie.Trie

func (*Block) Undo added in v0.7.10

func (block *Block) Undo()

func (*Block) Value added in v0.7.10

func (block *Block) Value() *ethutil.Value

type BlockBy

type BlockBy func(b1, b2 *Block) bool

func (BlockBy) Sort

func (self BlockBy) Sort(blocks Blocks)

type BlockInfo added in v0.7.10

type BlockInfo struct {
	Number uint64
	Hash   []byte
	Parent []byte
	TD     *big.Int
}

func (*BlockInfo) RlpDecode added in v0.7.10

func (bi *BlockInfo) RlpDecode(data []byte)

func (*BlockInfo) RlpEncode added in v0.7.10

func (bi *BlockInfo) RlpEncode() []byte

type BlockProcessor added in v0.7.10

type BlockProcessor interface {
	Process(*Block) (*big.Int, state.Messages, error)
}

type Blocks

type Blocks []*Block

func (Blocks) AsSet added in v0.7.10

func (self Blocks) AsSet() ethutil.UniqueSet

type Broadcaster added in v0.7.10

type Broadcaster interface {
	Broadcast(wire.MsgType, []interface{})
}

type DerivableList

type DerivableList interface {
	Len() int
	GetRlp(i int) []byte
}

type Receipt

type Receipt struct {
	PostState         []byte
	CumulativeGasUsed *big.Int
	Bloom             []byte
	// contains filtered or unexported fields
}

func NewReceipt

func NewReceipt(root []byte, cumalativeGasUsed *big.Int) *Receipt

func NewRecieptFromValue added in v0.7.10

func NewRecieptFromValue(val *ethutil.Value) *Receipt

func (*Receipt) Cmp added in v0.7.10

func (self *Receipt) Cmp(other *Receipt) bool

func (*Receipt) RlpData added in v0.7.10

func (self *Receipt) RlpData() interface{}

func (*Receipt) RlpEncode added in v0.7.10

func (self *Receipt) RlpEncode() []byte

func (*Receipt) RlpValueDecode added in v0.7.10

func (self *Receipt) RlpValueDecode(decoder *ethutil.Value)

func (*Receipt) SetLogs added in v0.7.10

func (self *Receipt) SetLogs(logs state.Logs)

func (*Receipt) String added in v0.7.10

func (self *Receipt) String() string

type Receipts

type Receipts []*Receipt

func (Receipts) GetRlp

func (self Receipts) GetRlp(i int) []byte

func (Receipts) Len

func (self Receipts) Len() int

func (Receipts) RlpData added in v0.7.10

func (self Receipts) RlpData() interface{}

func (Receipts) RlpEncode added in v0.7.10

func (self Receipts) RlpEncode() []byte

type Transaction

type Transaction struct {
	// contains filtered or unexported fields
}

func NewContractCreationTx added in v0.7.10

func NewContractCreationTx(value, gas, gasPrice *big.Int, script []byte) *Transaction

func NewTransactionFromBytes added in v0.7.10

func NewTransactionFromBytes(data []byte) *Transaction

func NewTransactionFromValue added in v0.7.10

func NewTransactionFromValue(val *ethutil.Value) *Transaction

func NewTransactionMessage added in v0.7.10

func NewTransactionMessage(to []byte, value, gas, gasPrice *big.Int, data []byte) *Transaction

func (*Transaction) Curve added in v0.7.10

func (tx *Transaction) Curve() (v byte, r []byte, s []byte)

func (*Transaction) Data

func (self *Transaction) Data() []byte

func (*Transaction) From added in v0.7.10

func (self *Transaction) From() []byte

func (*Transaction) Gas

func (self *Transaction) Gas() *big.Int

func (*Transaction) GasPrice

func (self *Transaction) GasPrice() *big.Int

func (*Transaction) Hash

func (tx *Transaction) Hash() []byte

func (*Transaction) Nonce

func (self *Transaction) Nonce() uint64

func (*Transaction) PublicKey added in v0.7.10

func (tx *Transaction) PublicKey() []byte

func (*Transaction) RlpData added in v0.7.10

func (tx *Transaction) RlpData() interface{}

func (*Transaction) RlpDecode added in v0.7.10

func (tx *Transaction) RlpDecode(data []byte)

func (*Transaction) RlpEncode added in v0.7.10

func (tx *Transaction) RlpEncode() []byte

func (*Transaction) RlpValue added in v0.7.10

func (tx *Transaction) RlpValue() *ethutil.Value

func (*Transaction) RlpValueDecode added in v0.7.10

func (tx *Transaction) RlpValueDecode(decoder *ethutil.Value)

func (*Transaction) Sender added in v0.7.10

func (tx *Transaction) Sender() []byte

func (*Transaction) SetNonce added in v0.7.10

func (self *Transaction) SetNonce(nonce uint64)

func (*Transaction) Sign added in v0.7.10

func (tx *Transaction) Sign(privk []byte) error

func (*Transaction) Signature added in v0.7.10

func (tx *Transaction) Signature(key []byte) []byte

func (*Transaction) String added in v0.7.10

func (tx *Transaction) String() string

func (*Transaction) To

func (self *Transaction) To() []byte

func (*Transaction) Value

func (self *Transaction) Value() *big.Int

type Transactions

type Transactions []*Transaction

Transaction slice type for basic sorting

func (Transactions) GetRlp

func (s Transactions) GetRlp(i int) []byte

func (Transactions) Len

func (s Transactions) Len() int

func (Transactions) RlpData added in v0.7.10

func (self Transactions) RlpData() interface{}

func (Transactions) Swap

func (s Transactions) Swap(i, j int)

type TxByNonce

type TxByNonce struct{ Transactions }

func (TxByNonce) Less

func (s TxByNonce) Less(i, j int) bool

Jump to

Keyboard shortcuts

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