mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-06 07:58:02 +00:00
Adjust tests for light-clients and normal clients
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -501,9 +501,11 @@ async fn chainhead_unstable_body() {
|
||||
let extrinsics: Vec<Vec<u8>> = body.block.extrinsics.into_iter().map(|ext| ext.0).collect();
|
||||
let expected = format!("0x{}", hex::encode(extrinsics.encode()));
|
||||
|
||||
#[cfg(not(feature = "unstable-light-client"))]
|
||||
assert_matches!(event,
|
||||
#[cfg(not(feature = "unstable-light-client"))]
|
||||
ChainHeadEvent::Done(done) if done.result == expected
|
||||
#[cfg(feature = "unstable-light-client")]
|
||||
ChainHeadEvent::Done(done) if done.value == expected
|
||||
);
|
||||
}
|
||||
|
||||
@@ -559,6 +561,8 @@ async fn chainhead_unstable_storage() {
|
||||
|
||||
#[cfg(not(feature = "unstable-light-client"))]
|
||||
assert_matches!(event, ChainHeadEvent::<Option<String>>::Done(done) if done.result.is_some());
|
||||
#[cfg(feature = "unstable-light-client")]
|
||||
assert_matches!(event, ChainHeadEvent::<Option<String>>::Done(done) if done.value.is_some());
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
Reference in New Issue
Block a user