common

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteToHash

func ByteToHash(data []byte) (hash types.Hash)

func BytesToBloom added in v1.0.0

func BytesToBloom(b []byte) types.Bloom

BytesToBloom converts a byte slice to a bloom filter. It panics if b is not of suitable size.

func CreateBloom added in v1.0.0

func CreateBloom(receipts types.Receipts) types.Bloom

func HashAlg added in v1.0.0

func HashAlg() hash.Hash

func HashToByte

func HashToByte(hash types.Hash) []byte

func HeaderDigest

func HeaderDigest(header *types.Header) (hash types.Hash)

func HeaderHash

func HeaderHash(block *types.Block) types.Hash

func LogsBloom added in v1.0.0

func LogsBloom(logs []*types.Log) *big.Int

func SetBytes added in v1.0.0

func SetBytes(d []byte, b *types.Bloom)

SetBytes sets the content of b to the given bytes. It panics if d is not of suitable size.

func Sum

func Sum(bz []byte) []byte

Sum returns the first 32 bytes of hash of the bz.

func TxHash

func TxHash(tx *types.Transaction) types.Hash

Hash hashes the RLP encoding of tx. It uniquely identifies the transaction.

Types

type RefAddress

type RefAddress struct {
	Addr types.Address
}

func NewRefAddress

func NewRefAddress(addr types.Address) *RefAddress

func (*RefAddress) Address

func (self *RefAddress) Address() types.Address

Jump to

Keyboard shortcuts

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