mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 12:11:59 +00:00
Fork schedule api (#2525)
## Issue Addressed Resolves #2524 ## Proposed Changes - Return all known forks in the `/config/fork_schedule`, previously returned only the head of the chain's fork. - Deleted the `StateId::head` method because it was only previously used in this endpoint. Co-authored-by: realbigsean <seananderson33@gmail.com>
This commit is contained in:
@@ -1190,7 +1190,10 @@ impl ApiTester {
|
||||
pub async fn test_get_config_fork_schedule(self) -> Self {
|
||||
let result = self.client.get_config_fork_schedule().await.unwrap().data;
|
||||
|
||||
let expected = vec![self.chain.head_info().unwrap().fork];
|
||||
let expected: Vec<Fork> = ForkName::list_all()
|
||||
.into_iter()
|
||||
.filter_map(|fork| self.chain.spec.fork_for_name(fork))
|
||||
.collect();
|
||||
|
||||
assert_eq!(result, expected);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user