Documentation
¶
Index ¶
Constants ¶
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 ¶
var ErrClientShuttingDown = errors.New("elements is shutting down")
ErrClientShuttingDown ...
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 ¶
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 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 TransactionExtended ¶
type TransactionExtended struct {
Tx *transaction.Transaction
Received time.Time
}
TransactionExtended ...