Skip to content

Commit

Permalink
Update sdk (#1066)
Browse files Browse the repository at this point in the history
  • Loading branch information
yrong authored Dec 19, 2023
1 parent c601294 commit 674a28e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 28 deletions.
50 changes: 23 additions & 27 deletions parachain/pallets/ethereum-beacon-client/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,41 +131,37 @@ pub fn compute_domain_bls() {
#[test]
pub fn verify_merkle_branch_for_finalized_root() {
new_tester().execute_with(|| {
assert!(
verify_merkle_branch(
assert!(verify_merkle_branch(
hex!("0000000000000000000000000000000000000000000000000000000000000000").into(),
&[
hex!("0000000000000000000000000000000000000000000000000000000000000000").into(),
&[
hex!("0000000000000000000000000000000000000000000000000000000000000000").into(),
hex!("5f6f02af29218292d21a69b64a794a7c0873b3e0f54611972863706e8cbdf371").into(),
hex!("e7125ff9ab5a840c44bedb4731f440a405b44e15f2d1a89e27341b432fabe13d").into(),
hex!("002c1fe5bc0bd62db6f299a582f2a80a6d5748ccc82e7ed843eaf0ae0739f74a").into(),
hex!("d2dc4ba9fd4edff6716984136831e70a6b2e74fca27b8097a820cbbaa5a6e3c3").into(),
hex!("91f77a19d8afa4a08e81164bb2e570ecd10477b3b65c305566a6d2be88510584").into(),
],
crate::config::FINALIZED_ROOT_INDEX,
crate::config::FINALIZED_ROOT_DEPTH,
hex!("e46559327592741956f6beaa0f52e49625eb85dce037a0bd2eff333c743b287f").into()
)
);
hex!("5f6f02af29218292d21a69b64a794a7c0873b3e0f54611972863706e8cbdf371").into(),
hex!("e7125ff9ab5a840c44bedb4731f440a405b44e15f2d1a89e27341b432fabe13d").into(),
hex!("002c1fe5bc0bd62db6f299a582f2a80a6d5748ccc82e7ed843eaf0ae0739f74a").into(),
hex!("d2dc4ba9fd4edff6716984136831e70a6b2e74fca27b8097a820cbbaa5a6e3c3").into(),
hex!("91f77a19d8afa4a08e81164bb2e570ecd10477b3b65c305566a6d2be88510584").into(),
],
crate::config::FINALIZED_ROOT_INDEX,
crate::config::FINALIZED_ROOT_DEPTH,
hex!("e46559327592741956f6beaa0f52e49625eb85dce037a0bd2eff333c743b287f").into()
));
});
}

#[test]
pub fn verify_merkle_branch_fails_if_depth_and_branch_dont_match() {
new_tester().execute_with(|| {
assert!(
!verify_merkle_branch(
assert!(!verify_merkle_branch(
hex!("0000000000000000000000000000000000000000000000000000000000000000").into(),
&[
hex!("0000000000000000000000000000000000000000000000000000000000000000").into(),
&[
hex!("0000000000000000000000000000000000000000000000000000000000000000").into(),
hex!("5f6f02af29218292d21a69b64a794a7c0873b3e0f54611972863706e8cbdf371").into(),
hex!("e7125ff9ab5a840c44bedb4731f440a405b44e15f2d1a89e27341b432fabe13d").into(),
],
crate::config::FINALIZED_ROOT_INDEX,
crate::config::FINALIZED_ROOT_DEPTH,
hex!("e46559327592741956f6beaa0f52e49625eb85dce037a0bd2eff333c743b287f").into()
)
);
hex!("5f6f02af29218292d21a69b64a794a7c0873b3e0f54611972863706e8cbdf371").into(),
hex!("e7125ff9ab5a840c44bedb4731f440a405b44e15f2d1a89e27341b432fabe13d").into(),
],
crate::config::FINALIZED_ROOT_INDEX,
crate::config::FINALIZED_ROOT_DEPTH,
hex!("e46559327592741956f6beaa0f52e49625eb85dce037a0bd2eff333c743b287f").into()
));
});
}

Expand Down

0 comments on commit 674a28e

Please sign in to comment.