mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 23:21:06 +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 extrinsics: Vec<Vec<u8>> = body.block.extrinsics.into_iter().map(|ext| ext.0).collect();
|
||||||
let expected = format!("0x{}", hex::encode(extrinsics.encode()));
|
let expected = format!("0x{}", hex::encode(extrinsics.encode()));
|
||||||
|
|
||||||
#[cfg(not(feature = "unstable-light-client"))]
|
|
||||||
assert_matches!(event,
|
assert_matches!(event,
|
||||||
|
#[cfg(not(feature = "unstable-light-client"))]
|
||||||
ChainHeadEvent::Done(done) if done.result == expected
|
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"))]
|
#[cfg(not(feature = "unstable-light-client"))]
|
||||||
assert_matches!(event, ChainHeadEvent::<Option<String>>::Done(done) if done.result.is_some());
|
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]
|
#[tokio::test]
|
||||||
|
|||||||
Reference in New Issue
Block a user