Skip to content

Commit

Permalink
test-runtime: json_patch dep removed (paritytech#3062)
Browse files Browse the repository at this point in the history
We don't need dependency on `json_patch` there is implementation of
needed function in `sc_chain_spec` crate.
This PR makes this function publicly available and removes the dep.
  • Loading branch information
michalkucharczyk authored Jan 25, 2024
1 parent 4ca193f commit 73fd8cd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
13 changes: 1 addition & 12 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions substrate/client/chain-spec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ pub use self::{
GenesisBlockBuilder,
},
genesis_config_builder::GenesisConfigBuilderRuntimeCaller,
json_patch::merge as json_merge,
};
pub use sc_chain_spec_derive::{ChainSpecExtension, ChainSpecGroup};

Expand Down
2 changes: 1 addition & 1 deletion substrate/test-utils/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ log = { version = "0.4.17", default-features = false }
[dev-dependencies]
futures = "0.3.21"
sc-block-builder = { path = "../../client/block-builder" }
sc-chain-spec = { path = "../../client/chain-spec" }
sc-executor = { path = "../../client/executor" }
sc-executor-common = { path = "../../client/executor/common" }
sp-consensus = { path = "../../primitives/consensus/common" }
substrate-test-runtime-client = { path = "client" }
sp-tracing = { path = "../../primitives/tracing" }
json-patch = { version = "1.0.0", default-features = false }
serde = { version = "1.0.195", features = ["alloc", "derive"], default-features = false }
serde_json = { version = "1.0.111", default-features = false, features = ["alloc"] }

Expand Down
2 changes: 1 addition & 1 deletion substrate/test-utils/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,7 @@ mod tests {
}
});

json_patch::merge(&mut default_config, &patch);
sc_chain_spec::json_merge(&mut default_config, patch);

// Build genesis config using custom json:
let mut t = BasicExternalities::new_empty();
Expand Down

0 comments on commit 73fd8cd

Please sign in to comment.