mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 05:51:02 +00:00
Impl From<UncheckedExtrinsic> for OpaqueExtrinsic (#6522)
This commit is contained in:
@@ -714,7 +714,14 @@ macro_rules! assert_eq_error_rate {
|
||||
/// Simple blob to hold an extrinsic without committing to its format and ensure it is serialized
|
||||
/// correctly.
|
||||
#[derive(PartialEq, Eq, Clone, Default, Encode, Decode)]
|
||||
pub struct OpaqueExtrinsic(pub Vec<u8>);
|
||||
pub struct OpaqueExtrinsic(Vec<u8>);
|
||||
|
||||
impl OpaqueExtrinsic {
|
||||
/// Convert an encoded extrinsic to an `OpaqueExtrinsic`.
|
||||
pub fn from_bytes(mut bytes: &[u8]) -> Result<Self, codec::Error> {
|
||||
OpaqueExtrinsic::decode(&mut bytes)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
impl parity_util_mem::MallocSizeOf for OpaqueExtrinsic {
|
||||
|
||||
Reference in New Issue
Block a user