diff --git a/types/chain.go b/types/chain.go index 7b4e0825..3bbb1256 100644 --- a/types/chain.go +++ b/types/chain.go @@ -281,30 +281,32 @@ type ProposalWindow struct { } type Consensus struct { - Id string `json:"ID"` - GenesisHash Hash `json:"genesis_hash"` - DaoTypeHash *Hash `json:"dao_type_hash"` - Secp256k1Blake160SighashAllTypeHash *Hash `json:"secp256k1_blake160_sighash_all_type_hash"` - Secp256k1Blake160MultisigAllTypeHash *Hash `json:"secp256k1_blake160_multisig_all_type_hash"` - InitialPrimaryEpochReward uint64 `json:"initial_primary_epoch_reward"` - SecondaryEpochReward uint64 `json:"secondary_epoch_reward"` - MaxUnclesNum uint64 `json:"max_uncles_num"` - OrphanRateTarget RationalU256 `json:"orphan_rate_target"` - EpochDurationTarget uint64 `json:"epoch_duration_target"` - TxProposalWindow ProposalWindow `json:"tx_proposal_window"` - ProposerRewardRatio RationalU256 `json:"proposer_reward_ratio"` - CellbaseMaturity uint64 `json:"cellbase_maturity"` - MedianTimeBlockCount uint64 `json:"median_time_block_count"` - MaxBlockCycles uint64 `json:"max_block_cycles"` - MaxBlockBytes uint64 `json:"max_block_bytes"` - BlockVersion uint32 `json:"block_version"` - TxVersion uint32 `json:"tx_version"` - TypeIdCodeHash Hash `json:"type_id_code_hash"` - MaxBlockProposalsLimit uint64 `json:"max_block_proposals_limit"` - PrimaryEpochRewardHalvingInterval uint64 `json:"primary_epoch_reward_halving_interval"` - PermanentDifficultyInDummy bool `json:"permanent_difficulty_in_dummy"` - HardforkFeatures []*HardForkFeature `json:"hardfork_features"` -} + Id string `json:"ID"` + GenesisHash Hash `json:"genesis_hash"` + DaoTypeHash *Hash `json:"dao_type_hash"` + Secp256k1Blake160SighashAllTypeHash *Hash `json:"secp256k1_blake160_sighash_all_type_hash"` + Secp256k1Blake160MultisigAllTypeHash *Hash `json:"secp256k1_blake160_multisig_all_type_hash"` + InitialPrimaryEpochReward uint64 `json:"initial_primary_epoch_reward"` + SecondaryEpochReward uint64 `json:"secondary_epoch_reward"` + MaxUnclesNum uint64 `json:"max_uncles_num"` + OrphanRateTarget RationalU256 `json:"orphan_rate_target"` + EpochDurationTarget uint64 `json:"epoch_duration_target"` + TxProposalWindow ProposalWindow `json:"tx_proposal_window"` + ProposerRewardRatio RationalU256 `json:"proposer_reward_ratio"` + CellbaseMaturity uint64 `json:"cellbase_maturity"` + MedianTimeBlockCount uint64 `json:"median_time_block_count"` + MaxBlockCycles uint64 `json:"max_block_cycles"` + MaxBlockBytes uint64 `json:"max_block_bytes"` + BlockVersion uint32 `json:"block_version"` + TxVersion uint32 `json:"tx_version"` + TypeIdCodeHash Hash `json:"type_id_code_hash"` + MaxBlockProposalsLimit uint64 `json:"max_block_proposals_limit"` + PrimaryEpochRewardHalvingInterval uint64 `json:"primary_epoch_reward_halving_interval"` + PermanentDifficultyInDummy bool `json:"permanent_difficulty_in_dummy"` + HardforkFeatures HardForkFeatures `json:"hardfork_features"` +} + +type HardForkFeatures map[string]*HardForkFeature type HardForkFeature struct { Rfc string `json:"rfc"`