Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DifficultyBoundDivisor = big.NewInt(2048) // The bound divisor of the difficulty, used in the update calculations. GenesisDifficulty = big.NewInt(131072) // Difficulty of the Genesis block. MinimumDifficulty = big.NewInt(131072) // The minimum that the difficulty may ever be. DurationLimit = big.NewInt(13) // The decision boundary on the blocktime duration used to determine whether difficulty should go up or not. )
Some weird constants to avoid constant memory allocs for them.
View Source
var ( ErrNotContiguous = errors.New("block not contiguous") ErrFutureBlock = errors.New("block in the future") ErrInvalidBlock = errors.New("invalid block") )
View Source
var EncodeNonce = ethtypes.EncodeNonce
Functions ¶
Types ¶
type Address ¶
func HexToAddress ¶
type Block ¶
type Block struct { Header *Header `json:"header"` Txs `json:"txs"` Uncles Headers `json:"uncles"` Receipts `json:"receipts"` }
func NewBlockWithHeader ¶
type BlockNonce ¶
type BlockNonce = ethtypes.BlockNonce
type Header ¶
type Header struct { ParentHash Hash `json:"parentHash" gencodec:"required"` UncleHash Hash `json:"sha3Uncles" gencodec:"required"` Miner Address `json:"miner" gencodec:"required"` Root Hash `json:"stateRoot" gencodec:"required"` TxHash Hash `json:"transactionsRoot" gencodec:"required"` ReceiptHash Hash `json:"receiptsRoot" gencodec:"required"` Difficulty *big.Int `json:"difficulty" gencodec:"required"` Height *big.Int `json:"height" gencodec:"required"` Time uint64 `json:"timestamp" gencodec:"required"` Extra HexBytes `json:"extraData" gencodec:"required"` Nonce BlockNonce `json:"nonce"` }
func CopyHeader ¶
type Receipt ¶
type StoredReceipt ¶
type StoredReceipt struct { Receipt // Inclusion information: These fields provide information about the inclusion of the // transaction corresponding to this receipt. BlockHash Hash `json:"blockHash,omitempty"` BlockNumber *big.Int `json:"blockNumber,omitempty"` TransactionIndex uint `json:"transactionIndex"` }
Click to show internal directories.
Click to hide internal directories.