mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-16 11:22:56 +00:00
Fork aware max values in rpc (#6847)
N/A In https://github.com/sigp/lighthouse/pull/6329 we changed `max_blobs_per_block` from a preset to a config value. We weren't using the right value based on fork in that PR. This is a follow up PR to use the fork dependent values. In the proces, I also updated other places where we weren't using fork dependent values from the ChainSpec. Note to reviewer: easier to go through by commit
This commit is contained in:
@@ -39,6 +39,7 @@ use lighthouse_network::{
|
||||
use slog::info;
|
||||
use slot_clock::{SlotClock, TestingSlotClock};
|
||||
use tokio::sync::mpsc;
|
||||
use types::ForkContext;
|
||||
use types::{
|
||||
data_column_sidecar::ColumnIndex,
|
||||
test_utils::{SeedableRng, TestRandom, XorShiftRng},
|
||||
@@ -92,6 +93,11 @@ impl TestRig {
|
||||
.build();
|
||||
|
||||
let chain = harness.chain.clone();
|
||||
let fork_context = Arc::new(ForkContext::new::<E>(
|
||||
Slot::new(0),
|
||||
chain.genesis_validators_root,
|
||||
&chain.spec,
|
||||
));
|
||||
|
||||
let (network_tx, network_rx) = mpsc::unbounded_channel();
|
||||
let (sync_tx, sync_rx) = mpsc::unbounded_channel::<SyncMessage<E>>();
|
||||
@@ -139,6 +145,7 @@ impl TestRig {
|
||||
SamplingConfig::Custom {
|
||||
required_successes: vec![SAMPLING_REQUIRED_SUCCESSES],
|
||||
},
|
||||
fork_context,
|
||||
log.clone(),
|
||||
),
|
||||
harness,
|
||||
|
||||
Reference in New Issue
Block a user