Upgrading parity-scale-codec to v3 (#10825)

* Upgraded dependencies

* Adapting code to scale v3

* Empty commit to trigger CI

* Triggering CI

* Fixing UI test

* Remove superfluous dev-dep added by #9228

* Cryout for CI
This commit is contained in:
wigy
2022-02-24 15:34:34 +01:00
committed by GitHub
parent eeb267e1d6
commit 535325d2e6
176 changed files with 528 additions and 450 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
futures = "0.3.16"
jsonrpc-client-transports = { version = "18.0.0", features = ["http"] }
codec = { package = "parity-scale-codec", version = "2.0.0" }
codec = { package = "parity-scale-codec", version = "3.0.0" }
serde = "1"
frame-support = { version = "4.0.0-dev", path = "../../../../frame/support" }
sp-storage = { version = "5.0.0", path = "../../../../primitives/storage" }
@@ -25,5 +25,5 @@ sc-rpc-api = { version = "0.10.0-dev", path = "../../../../client/rpc-api" }
[dev-dependencies]
frame-system = { version = "4.0.0-dev", path = "../../../../frame/system" }
scale-info = "1.0"
scale-info = "2.0.0"
tokio = "1.15"
+1 -1
View File
@@ -126,7 +126,7 @@ impl<V: FullCodec> StorageQuery<V> {
block_index: Option<Hash>,
) -> Result<Option<V>, RpcError> {
let opt: Option<StorageData> = state_client.storage(self.key, block_index).await?;
opt.map(|encoded| V::decode_all(&encoded.0))
opt.map(|encoded| V::decode_all(&mut &encoded.0[..]))
.transpose()
.map_err(|decode_err| RpcError::Other(Box::new(decode_err)))
}