Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct {
// header of this block.
Header
// Transactions of this block.
Transactions []Transaction
}
Block represent a block that stored in the blockchain database.
type BlockHeader ¶
type Header ¶
type Header struct {
// The origin header of the block
BlockHeader
Height uint32
// MerkleProof for transactions packed in this block
NumTxs uint32
Hashes []*common.Uint256
Flags []byte
// The total work from the genesis block to this
// current block
TotalWork *big.Int
}
Header is a data structure stored in database.
func (*Header) Deserialize ¶
type OutPoint ¶
func OutPointFromBytes ¶
type Transaction ¶
type Tx ¶
type Tx struct {
// The transaction hash.
Hash common.Uint256
// The block height that this transaction
// belongs to.
Height uint32
// The time the transaction was first seen
Timestamp time.Time
// Transaction
RawData []byte
}
Tx is a data structure used in database.
func NewTx ¶
func NewTx(tx Transaction, height uint32) *Tx
Click to show internal directories.
Click to hide internal directories.