mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 04:01:51 +00:00
Add {fork_name}_enabled functions (#5951)
* add fork_name_enabled fn to Forkname impl * refactor codebase to use new fork_enabled fn * fmt * Merge branch 'unstable' of https://github.com/sigp/lighthouse into fork-ord-impl * small code cleanup * resolve merge conflicts * fix beacon chain test * merge conflicts * fix ef test issue * resolve merge conflicts
This commit is contained in:
@@ -151,12 +151,10 @@ const REQUEST_TIMEOUT: u64 = 15;
|
||||
|
||||
/// Returns the maximum bytes that can be sent across the RPC.
|
||||
pub fn max_rpc_size(fork_context: &ForkContext, max_chunk_size: usize) -> usize {
|
||||
match fork_context.current_fork() {
|
||||
ForkName::Altair | ForkName::Base => max_chunk_size / 10,
|
||||
ForkName::Bellatrix => max_chunk_size,
|
||||
ForkName::Capella => max_chunk_size,
|
||||
ForkName::Deneb => max_chunk_size,
|
||||
ForkName::Electra => max_chunk_size,
|
||||
if fork_context.current_fork().bellatrix_enabled() {
|
||||
max_chunk_size
|
||||
} else {
|
||||
max_chunk_size / 10
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user