mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-23 13:11:10 +00:00
Don't double hash: use the same hash in ExtrinsicDetails and ExtrinsicDetails (#1917)
* Don't double hash: use the same hash in ExtrinsicDetails and ExtrinsicEvents * clippy
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
blocks::block_types::{get_events, CachedEvents},
|
blocks::block_types::{get_events, CachedEvents},
|
||||||
client::{OfflineClientT, OnlineClientT},
|
client::{OfflineClientT, OnlineClientT},
|
||||||
config::{Config, Hasher},
|
config::Config,
|
||||||
error::Error,
|
error::Error,
|
||||||
events,
|
events,
|
||||||
};
|
};
|
||||||
@@ -250,7 +250,7 @@ where
|
|||||||
/// The events associated with the extrinsic.
|
/// The events associated with the extrinsic.
|
||||||
pub async fn events(&self) -> Result<ExtrinsicEvents<T>, Error> {
|
pub async fn events(&self) -> Result<ExtrinsicEvents<T>, Error> {
|
||||||
let events = get_events(&self.client, self.block_hash, &self.cached_events).await?;
|
let events = get_events(&self.client, self.block_hash, &self.cached_events).await?;
|
||||||
let ext_hash = T::Hasher::hash_of(&self.bytes());
|
let ext_hash = self.inner.hash();
|
||||||
Ok(ExtrinsicEvents::new(ext_hash, self.index(), events))
|
Ok(ExtrinsicEvents::new(ext_hash, self.index(), events))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user