Skip to content

Commit 547aa96

Browse files
authored
Make event_subscriptions a HashedMapView. (#4390)
## Motivation This is part of the execution state view, so we should cache its hash. ## Proposal Make it a `HashedMapView`. ## Test Plan CI; I believe this should not change semantics, only slightly improve performance. ## Release Plan - Nothing to do / These changes follow the usual release cycle. ## Links - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
1 parent e85882e commit 547aa96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

linera-execution/src/system.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use linera_base::{
2424
};
2525
use linera_views::{
2626
context::Context,
27-
map_view::{HashedMapView, MapView},
27+
map_view::HashedMapView,
2828
register_view::HashedRegisterView,
2929
set_view::HashedSetView,
3030
views::{ClonableView, HashableView, ReplaceContext, View},
@@ -90,7 +90,7 @@ pub struct SystemExecutionStateView<C> {
9090
/// Blobs that have been used or published on this chain.
9191
pub used_blobs: HashedSetView<C, BlobId>,
9292
/// The event stream subscriptions of applications on this chain.
93-
pub event_subscriptions: MapView<C, (ChainId, StreamId), EventSubscriptions>,
93+
pub event_subscriptions: HashedMapView<C, (ChainId, StreamId), EventSubscriptions>,
9494
}
9595

9696
impl<C: Context, C2: Context> ReplaceContext<C2> for SystemExecutionStateView<C> {

0 commit comments

Comments
 (0)