This repository was archived by the owner on Jan 22, 2025. It is now read-only.
File tree 2 files changed +4
-7
lines changed
2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ Configuration object containing the following fields:
41
41
<Field name = " epoch" type = " u64" optional = { true } >
42
42
epoch for which to calculate activation details. If parameter not provided,
43
43
defaults to current epoch.
44
+ ** DEPRECATED** , inputs other than the current epoch return an error.
44
45
</Field >
45
46
46
47
</Parameter >
Original file line number Diff line number Diff line change @@ -1719,14 +1719,10 @@ impl JsonRpcRequestProcessor {
1719
1719
min_context_slot : config. min_context_slot ,
1720
1720
} ) ?;
1721
1721
let epoch = config. epoch . unwrap_or_else ( || bank. epoch ( ) ) ;
1722
- if bank. epoch ( ) . saturating_sub ( epoch ) > solana_sdk :: stake_history :: MAX_ENTRIES as u64 {
1722
+ if epoch != bank. epoch ( ) {
1723
1723
return Err ( Error :: invalid_params ( format ! (
1724
- "Invalid param: epoch {epoch:?} is too far in the past"
1725
- ) ) ) ;
1726
- }
1727
- if epoch > bank. epoch ( ) {
1728
- return Err ( Error :: invalid_params ( format ! (
1729
- "Invalid param: epoch {epoch:?} has not yet started"
1724
+ "Invalid param: epoch {epoch:?}. Only the current epoch ({:?}) is supported" ,
1725
+ bank. epoch( )
1730
1726
) ) ) ;
1731
1727
}
1732
1728
You can’t perform that action at this time.
0 commit comments