2018-07-17 21:23:07 +00:00
|
|
|
package core
|
|
|
|
|
2018-09-18 19:46:16 +00:00
|
|
|
import (
|
|
|
|
"github.com/ethereum/go-ethereum/common"
|
|
|
|
"github.com/ethereum/go-ethereum/common/hexutil"
|
|
|
|
"github.com/ethereum/go-ethereum/core/types"
|
|
|
|
)
|
|
|
|
|
2018-07-17 21:23:07 +00:00
|
|
|
type Header struct {
|
2018-08-07 15:51:34 +00:00
|
|
|
Id int64
|
2018-07-17 21:23:07 +00:00
|
|
|
BlockNumber int64 `db:"block_number"`
|
|
|
|
Hash string
|
|
|
|
Raw []byte
|
|
|
|
}
|
2018-09-18 19:46:16 +00:00
|
|
|
|
|
|
|
type POAHeader struct {
|
|
|
|
ParentHash common.Hash `json:"parentHash" gencodec:"required"`
|
|
|
|
UncleHash common.Hash `json:"sha3Uncles" gencodec:"required"`
|
|
|
|
Coinbase common.Address `json:"miner" gencodec:"required"`
|
|
|
|
Root common.Hash `json:"stateRoot" gencodec:"required"`
|
|
|
|
TxHash common.Hash `json:"transactionsRoot" gencodec:"required"`
|
|
|
|
ReceiptHash common.Hash `json:"receiptsRoot" gencodec:"required"`
|
|
|
|
Bloom types.Bloom `json:"logsBloom" gencodec:"required"`
|
|
|
|
Difficulty *hexutil.Big `json:"difficulty" gencodec:"required"`
|
|
|
|
Number *hexutil.Big `json:"number" gencodec:"required"`
|
|
|
|
GasLimit hexutil.Uint64 `json:"gasLimit" gencodec:"required"`
|
|
|
|
GasUsed hexutil.Uint64 `json:"gasUsed" gencodec:"required"`
|
|
|
|
Time *hexutil.Big `json:"timestamp" gencodec:"required"`
|
|
|
|
Extra hexutil.Bytes `json:"extraData" gencodec:"required"`
|
|
|
|
Hash common.Hash `json:"hash"`
|
|
|
|
}
|