Skip to content

Commit 875368b

Browse files
committed
Fix decoding of GeodeState
1 parent 2a6371b commit 875368b

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

rpc/src/geode.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ use sp_core::storage::StorageKey;
1616
use sp_core::{blake2_128, twox_128};
1717

1818
use futures::{StreamExt, TryStreamExt};
19-
use jsonrpc_core::futures::{
20-
future::Future as Future01, sink::Sink as Sink01, stream, stream::Stream as Stream01,
21-
};
19+
use jsonrpc_core::futures::{future::Future, sink::Sink, stream, stream::Stream};
2220
use jsonrpc_pubsub::{manager::SubscriptionManager, typed::Subscriber, SubscriptionId};
2321
use log::warn;
2422

@@ -264,11 +262,11 @@ fn get_geode_state(changes: StorageChangeSet) -> GeodeState {
264262
match data {
265263
Some(data) => {
266264
let mut value: &[u8] = &data.0.clone();
267-
match GeodeState::decode(&mut value) {
268-
Ok(state) => {
269-
return state;
265+
match Geode::<AccountId, Hash>::decode(&mut value) {
266+
Ok(geode) => {
267+
return geode.state;
270268
}
271-
Err(_) => warn!("unable to decode GeodeState"),
269+
Err(_) => warn!("unable to decode Geode"),
272270
}
273271
}
274272
None => warn!("empty change set"),

0 commit comments

Comments
 (0)