Skip to content

Commit a503de8

Browse files
Align Events between Bulletin and SDK
1 parent fcca078 commit a503de8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

pallets/transaction-storage/src/benchmarking.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,27 +124,27 @@ mod benchmarks {
124124
#[benchmark]
125125
fn store(l: Linear<{ 1 }, { T::MaxTransactionSize::get() }>) -> Result<(), BenchmarkError> {
126126
let data = vec![0u8; l as usize];
127-
let hash = sp_io::hashing::blake2_256(&data);
127+
let content_hash = sp_io::hashing::blake2_256(&data);
128128

129129
#[extrinsic_call]
130130
_(RawOrigin::None, data);
131131

132132
assert!(!BlockTransactions::<T>::get().is_empty());
133-
assert_last_event::<T>(Event::Stored { index: 0, hash }.into());
133+
assert_last_event::<T>(Event::Stored { index: 0, content_hash }.into());
134134
Ok(())
135135
}
136136

137137
#[benchmark]
138138
fn renew() -> Result<(), BenchmarkError> {
139139
let data = vec![0u8; T::MaxTransactionSize::get() as usize];
140-
let hash = sp_io::hashing::blake2_256(&data);
140+
let content_hash = sp_io::hashing::blake2_256(&data);
141141
TransactionStorage::<T>::store(RawOrigin::None.into(), data)?;
142142
run_to_block::<T>(1u32.into());
143143

144144
#[extrinsic_call]
145145
_(RawOrigin::None, BlockNumberFor::<T>::zero(), 0);
146146

147-
assert_last_event::<T>(Event::Renewed { index: 0, hash }.into());
147+
assert_last_event::<T>(Event::Renewed { index: 0, content_hash }.into());
148148
Ok(())
149149
}
150150

pallets/transaction-storage/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ pub mod pallet {
339339
})
340340
.map_err(|_| Error::<T>::TooManyTransactions)
341341
})?;
342-
Self::deposit_event(Event::Stored { index, hash: content_hash });
342+
Self::deposit_event(Event::Stored { index, content_hash });
343343
Ok(())
344344
}
345345

@@ -388,7 +388,7 @@ pub mod pallet {
388388
})
389389
.map_err(|_| Error::<T>::TooManyTransactions)
390390
})?;
391-
Self::deposit_event(Event::Renewed { index, hash: content_hash });
391+
Self::deposit_event(Event::Renewed { index, content_hash });
392392
Ok(().into())
393393
}
394394

@@ -569,9 +569,9 @@ pub mod pallet {
569569
#[pallet::generate_deposit(pub(super) fn deposit_event)]
570570
pub enum Event<T: Config> {
571571
/// Stored data under specified index.
572-
Stored { index: u32, hash: ContentHash },
572+
Stored { index: u32, content_hash: ContentHash },
573573
/// Renewed data under specified index.
574-
Renewed { index: u32, hash: ContentHash },
574+
Renewed { index: u32, content_hash: ContentHash },
575575
/// Storage proof was successfully checked.
576576
ProofChecked,
577577
/// An account `who` was authorized to store `bytes` bytes in `transactions` transactions.

0 commit comments

Comments
 (0)