Implement Gloas withdrawals and refactor (#8692)

Co-Authored-By: Michael Sproul <michael@sigmaprime.io>

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
This commit is contained in:
Michael Sproul
2026-02-03 18:36:20 +11:00
committed by GitHub
parent ed7354d460
commit d42327bb86
14 changed files with 651 additions and 212 deletions

View File

@@ -634,7 +634,7 @@ pub async fn proposer_boost_re_org_test(
assert_eq!(state_b.slot(), slot_b);
let pre_advance_withdrawals = get_expected_withdrawals(&state_b, &harness.chain.spec)
.unwrap()
.0
.withdrawals()
.to_vec();
complete_state_advance(&mut state_b, None, slot_c, &harness.chain.spec).unwrap();
@@ -724,7 +724,7 @@ pub async fn proposer_boost_re_org_test(
get_expected_withdrawals(&state_b, &harness.chain.spec)
}
.unwrap()
.0
.withdrawals()
.to_vec();
let payload_attribs_withdrawals = payload_attribs.withdrawals().unwrap();
assert_eq!(expected_withdrawals, *payload_attribs_withdrawals);

View File

@@ -6660,7 +6660,8 @@ impl ApiTester {
}
let expected_withdrawals = get_expected_withdrawals(&state, &self.chain.spec)
.unwrap()
.0;
.withdrawals()
.to_vec();
// fetch expected withdrawals from the client
let result = self.client.get_expected_withdrawals(&state_id).await;
@@ -6668,7 +6669,7 @@ impl ApiTester {
Ok(withdrawal_response) => {
assert_eq!(withdrawal_response.execution_optimistic, Some(false));
assert_eq!(withdrawal_response.finalized, Some(false));
assert_eq!(withdrawal_response.data, expected_withdrawals.to_vec());
assert_eq!(withdrawal_response.data, expected_withdrawals);
}
Err(_) => {
panic!("query failed incorrectly");