Skip to content
This repository was archived by the owner on Feb 6, 2025. It is now read-only.

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix parlia default config
Browse files Browse the repository at this point in the history
forcodedancing committed May 20, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 11ad08a commit d8bb895
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion crates/bsc/consensus/src/lib.rs
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ pub struct ParliaConfig {

impl Default for ParliaConfig {
fn default() -> Self {
Self { epoch: 300, period: 3 }
Self { epoch: 200, period: 3 }
}
}

@@ -217,6 +217,10 @@ impl Parlia {
) -> Result<Option<VoteAttestation>, ParliaConsensusError> {
self.check_header_extra_len(header)?;

if !self.chain_spec().fork(Hardfork::Luban).active_at_block(header.number) {
return Ok(None);
};

let mut raw;
let extra_len = header.extra_data.len();
if header.number % self.epoch != 0 {
6 changes: 5 additions & 1 deletion crates/bsc/evm/src/execute.rs
Original file line number Diff line number Diff line change
@@ -29,7 +29,11 @@ use reth_interfaces::{
executor::{BlockExecutionError, BlockValidationError},
provider::ProviderError,
};
use reth_primitives::{constants::SYSTEM_ADDRESS, system_contracts::get_upgrade_system_contracts, Address, BlockNumber, BlockWithSenders, Bytes, ChainSpec, GotExpected, Hardfork, Header, PruneModes, Receipt, Receipts, Transaction, TransactionSigned, B256, U256, hex};
use reth_primitives::{
constants::SYSTEM_ADDRESS, system_contracts::get_upgrade_system_contracts, Address,
BlockNumber, BlockWithSenders, Bytes, ChainSpec, GotExpected, Hardfork, Header, PruneModes,
Receipt, Receipts, Transaction, TransactionSigned, B256, U256,
};
use reth_provider::ParliaProvider;
use reth_revm::{
batch::{BlockBatchRecord, BlockExecutorStats},

0 comments on commit d8bb895

Please sign in to comment.