Companion for 9619 (Private Events) (#3712)

* update runtime api

* use storage_prefix

* update read_events_no_consensus

* update Substrate

Co-authored-by: parity-processbot <>
This commit is contained in:
Shawn Tabrizi
2021-08-26 10:34:45 -04:00
committed by GitHub
parent 1d7e0e6b35
commit 07301bd693
3 changed files with 155 additions and 155 deletions
+153 -153
View File
File diff suppressed because it is too large Load Diff
@@ -289,7 +289,7 @@ where
{
use inclusion::Event as RawEvent;
<frame_system::Pallet<T>>::events()
<frame_system::Pallet<T>>::read_events_no_consensus()
.into_iter()
.filter_map(|record| extract_event(record.event))
.map(|event| match event {
+1 -1
View File
@@ -148,7 +148,7 @@ macro_rules! monitor_cmd_for { ($runtime:tt) => { paste::paste! {
TransactionStatus::Ready | TransactionStatus::Broadcast(_) | TransactionStatus::Future => continue,
TransactionStatus::InBlock(hash) => {
log::info!(target: LOG_TARGET, "included at {:?}", hash);
let key = sp_core::storage::StorageKey(frame_system::Events::<Runtime>::hashed_key().to_vec());
let key = frame_support::storage::storage_prefix(b"System", b"Events");
let events =get_storage::<
Vec<frame_system::EventRecord<Event, <Block as BlockT>::Hash>>
>(client, params!{ key, hash }).await?.unwrap_or_default();