Skip to content

Commit

Permalink
Fix decoding of GeodeState
Browse files Browse the repository at this point in the history
  • Loading branch information
oana-barbu committed Sep 23, 2021
1 parent 2a6371b commit 637ce86
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rpc/src/geode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use sp_core::{blake2_128, twox_128};

use futures::{StreamExt, TryStreamExt};
use jsonrpc_core::futures::{
future::Future as Future01, sink::Sink as Sink01, stream, stream::Stream as Stream01,
future::Future, sink::Sink, stream, stream::Stream,
};
use jsonrpc_pubsub::{manager::SubscriptionManager, typed::Subscriber, SubscriptionId};
use log::warn;
Expand Down Expand Up @@ -264,11 +264,11 @@ fn get_geode_state(changes: StorageChangeSet) -> GeodeState {
match data {
Some(data) => {
let mut value: &[u8] = &data.0.clone();
match GeodeState::decode(&mut value) {
Ok(state) => {
return state;
match Geode::<AccountId, Hash>::decode(&mut value) {
Ok(geode) => {
return geode.state;
}
Err(_) => warn!("unable to decode GeodeState"),
Err(_) => warn!("unable to decode Geode"),
}
}
None => warn!("empty change set"),
Expand Down

0 comments on commit 637ce86

Please sign in to comment.