aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-10-19 18:52:38 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:23:39 +0800
commit0e12c9284efdf72a376f75f180bac7968d6fb382 (patch)
tree1b06f8f9483bff246dbeba12c7445780a595b21a /core
parent93563f41410b964454f23229cfabe1ec1ba735f5 (diff)
downloadgo-tangerine-0e12c9284efdf72a376f75f180bac7968d6fb382.tar
go-tangerine-0e12c9284efdf72a376f75f180bac7968d6fb382.tar.gz
go-tangerine-0e12c9284efdf72a376f75f180bac7968d6fb382.tar.bz2
go-tangerine-0e12c9284efdf72a376f75f180bac7968d6fb382.tar.lz
go-tangerine-0e12c9284efdf72a376f75f180bac7968d6fb382.tar.xz
go-tangerine-0e12c9284efdf72a376f75f180bac7968d6fb382.tar.zst
go-tangerine-0e12c9284efdf72a376f75f180bac7968d6fb382.zip
consensus: dexcon: fetch config from state
Diffstat (limited to 'core')
-rw-r--r--core/types/block.go41
1 files changed, 22 insertions, 19 deletions
diff --git a/core/types/block.go b/core/types/block.go
index a28ce8ee0..b814bd975 100644
--- a/core/types/block.go
+++ b/core/types/block.go
@@ -26,6 +26,8 @@ import (
"time"
"unsafe"
+ coreTypes "github.com/dexon-foundation/dexon-consensus-core/core/types"
+
"github.com/dexon-foundation/dexon/common"
"github.com/dexon-foundation/dexon/common/hexutil"
"github.com/dexon-foundation/dexon/rlp"
@@ -68,25 +70,26 @@ func (n *BlockNonce) UnmarshalText(input []byte) error {
// Header represents a block header in the Ethereum blockchain.
type Header 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 Bloom `json:"logsBloom" gencodec:"required"`
- Difficulty *big.Int `json:"difficulty" gencodec:"required"`
- Number *big.Int `json:"number" gencodec:"required"`
- GasLimit uint64 `json:"gasLimit" gencodec:"required"`
- GasUsed uint64 `json:"gasUsed" gencodec:"required"`
- Time uint64 `json:"timestamp" gencodec:"required"`
- Extra []byte `json:"extraData" gencodec:"required"`
- MixDigest common.Hash `json:"mixHash"`
- Nonce BlockNonce `json:"nonce"`
- Randomness []byte `json:"randomness" gencodec:"required"`
- WitnessHeight uint64 `json:"witnessHeight" gencodec:"required"`
- WitnessRoot common.Hash `json:"WitnessRoot" gencodec:"required"`
- WitnessReceiptHash common.Hash `json:"WitnessReceiptHash" gencodec:"required"`
+ 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 Bloom `json:"logsBloom" gencodec:"required"`
+ Difficulty *big.Int `json:"difficulty" gencodec:"required"`
+ Number *big.Int `json:"number" gencodec:"required"`
+ GasLimit uint64 `json:"gasLimit" gencodec:"required"`
+ GasUsed uint64 `json:"gasUsed" gencodec:"required"`
+ Time uint64 `json:"timestamp" gencodec:"required"`
+ Extra []byte `json:"extraData" gencodec:"required"`
+ MixDigest common.Hash `json:"mixHash"`
+ Nonce BlockNonce `json:"nonce"`
+ Randomness []byte `json:"randomness" gencodec:"required"`
+ Position coreTypes.Position `json:"position" gencodec:"required"`
+ WitnessHeight uint64 `json:"witnessHeight" gencodec:"required"`
+ WitnessRoot common.Hash `json:"WitnessRoot" gencodec:"required"`
+ WitnessReceiptHash common.Hash `json:"WitnessReceiptHash" gencodec:"required"`
}
// field type overrides for gencodec