elements

package
v0.0.0-...-e4c499b Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const MaxBlockPayload = 4000000

MaxBlockPayload is the maximum bytes a block message can be in bytes. After Segregated Witness, the max block payload has been raised to 4MB.

Variables

View Source
var ErrClientShuttingDown = errors.New("elements is shutting down")

ErrClientShuttingDown ...

View Source
var LatestEncoding = WitnessEncoding

LatestEncoding is the most recently specified encoding for the Bitcoin wire protocol.

Functions

This section is empty.

Types

type Block

type Block struct {
	Header       wire.BlockHeader
	Transactions []*transaction.Transaction
}

Block ...

func (*Block) Deserialize

func (b *Block) Deserialize(r io.Reader) error

Deserialize decodes a block from r into the receiver using a format that is suitable for long-term storage such as a database while respecting the Version field in the block. This function differs from BtcDecode in that BtcDecode decodes from the bitcoin wire protocol as it was sent across the network. The wire encoding can technically differ depending on the protocol version and doesn't even really need to match the format of a stored block at all. As of the time this comment was written, the encoded block is the same in both instances, but there is a distinct difference and separating the two allows the API to be flexible enough to deal with changes.

type BlockID

type BlockID struct {
	Height    int32
	Hash      chainhash.Hash
	Timestamp time.Time
}

BlockID ...

type MessageEncoding

type MessageEncoding uint32

MessageEncoding represents the wire message encoding format to be used.

const (
	// BaseEncoding encodes all messages in the default format specified
	// for the Bitcoin wire protocol.
	BaseEncoding MessageEncoding = 1 << iota

	// WitnessEncoding encodes all messages other than transaction messages
	// using the default Bitcoin wire protocol specification. For transaction
	// messages, the new encoding format detailed in BIP0144 will be used.
	WitnessEncoding
)

type OutPoint

type OutPoint struct {
	Hash  chainhash.Hash
	Index uint32
}

OutPoint ...

type TransactionExtended

type TransactionExtended struct {
	Tx       *transaction.Transaction
	Received time.Time
}

TransactionExtended ...

Jump to

Keyboard shortcuts

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