Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Fix deserialization of Bytes (#3866)
Browse files Browse the repository at this point in the history
* Update impl-serde to patch RPC.

* Add test.

* Fix long line.
  • Loading branch information
tomusdrw authored and bkchr committed Oct 22, 2019
1 parent 44a9482 commit 271f4cf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions core/rpc/src/state/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,3 +313,11 @@ fn should_notify_on_runtime_version_initially() {
// no more notifications on this channel
assert_eq!(core.block_on(next.into_future()).unwrap().0, None);
}

#[test]
fn should_deserialize_storage_key() {
let k = "\"0x7f864e18e3dd8b58386310d2fe0919eef27c6e558564b7f67f22d99d20f587b\"";
let k: StorageKey = serde_json::from_str(k).unwrap();

assert_eq!(k.0.len(), 32);
}

0 comments on commit 271f4cf

Please sign in to comment.