mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +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:
@@ -282,7 +282,7 @@ impl<E: EthSpec> Network<E> {
|
||||
|
||||
let max_topics = ctx.chain_spec.attestation_subnet_count as usize
|
||||
+ SYNC_COMMITTEE_SUBNET_COUNT as usize
|
||||
+ ctx.chain_spec.blob_sidecar_subnet_count_electra as usize
|
||||
+ ctx.chain_spec.blob_sidecar_subnet_count_max() as usize
|
||||
+ ctx.chain_spec.data_column_sidecar_subnet_count as usize
|
||||
+ BASE_CORE_TOPICS.len()
|
||||
+ ALTAIR_CORE_TOPICS.len()
|
||||
|
||||
@@ -263,11 +263,7 @@ pub(crate) fn create_whitelist_filter(
|
||||
for id in 0..sync_committee_subnet_count {
|
||||
add(SyncCommitteeMessage(SyncSubnetId::new(id)));
|
||||
}
|
||||
let blob_subnet_count = if spec.electra_fork_epoch.is_some() {
|
||||
spec.blob_sidecar_subnet_count_electra
|
||||
} else {
|
||||
spec.blob_sidecar_subnet_count
|
||||
};
|
||||
let blob_subnet_count = spec.blob_sidecar_subnet_count_max();
|
||||
for id in 0..blob_subnet_count {
|
||||
add(BlobSidecar(id));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user