mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-22 19:50:37 +00:00
improve error message (#4141)
## Issue Addressed NA ## Proposed Changes Not use magic number directly in the error message. ## Additional Info NA
This commit is contained in:
parent
65d0f63639
commit
d3c20ffa9d
@ -77,8 +77,8 @@ pub fn get_attestation_performance<T: BeaconChainTypes>(
|
|||||||
// query is within permitted bounds to prevent potential OOM errors.
|
// query is within permitted bounds to prevent potential OOM errors.
|
||||||
if (end_epoch - start_epoch).as_usize() > MAX_REQUEST_RANGE_EPOCHS {
|
if (end_epoch - start_epoch).as_usize() > MAX_REQUEST_RANGE_EPOCHS {
|
||||||
return Err(custom_bad_request(format!(
|
return Err(custom_bad_request(format!(
|
||||||
"end_epoch must not exceed start_epoch by more than 100 epochs. start: {}, end: {}",
|
"end_epoch must not exceed start_epoch by more than {} epochs. start: {}, end: {}",
|
||||||
query.start_epoch, query.end_epoch
|
MAX_REQUEST_RANGE_EPOCHS, query.start_epoch, query.end_epoch
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user