From d924ece39a5cb369ba5ccde3dc160b5ee006271b Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 3 Feb 2025 17:47:31 +0000 Subject: [PATCH] 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 --- subxt/src/blocks/extrinsic_types.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subxt/src/blocks/extrinsic_types.rs b/subxt/src/blocks/extrinsic_types.rs index e03b489257..b1716c03f3 100644 --- a/subxt/src/blocks/extrinsic_types.rs +++ b/subxt/src/blocks/extrinsic_types.rs @@ -5,7 +5,7 @@ use crate::{ blocks::block_types::{get_events, CachedEvents}, client::{OfflineClientT, OnlineClientT}, - config::{Config, Hasher}, + config::Config, error::Error, events, }; @@ -250,7 +250,7 @@ where /// The events associated with the extrinsic. pub async fn events(&self) -> Result, Error> { 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)) } }