You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
753 B
25 lines
753 B
package wire |
|
|
|
import ( |
|
"time" |
|
|
|
"next.orly.dev/pkg/crypto/ec/chainhash" |
|
) |
|
|
|
// BlockHeader defines information about a block and is used in the bitcoin |
|
// block (MsgBlock) and headers (MsgHeaders) messages. |
|
type BlockHeader struct { |
|
// Version of the block. This is not the same as the protocol version. |
|
Version int32 |
|
// Hash of the previous block header in the block chain. |
|
PrevBlock chainhash.Hash |
|
// Merkle tree reference to hash of all transactions for the block. |
|
MerkleRoot chainhash.Hash |
|
// Time the block was created. This is, unfortunately, encoded as a |
|
// uint32 on the wire and therefore is limited to 2106. |
|
Timestamp time.Time |
|
// Difficulty target for the block. |
|
Bits uint32 |
|
// Nonce used to generate the block. |
|
Nonce uint32 |
|
}
|
|
|