Set weird substrate global state for custom SS58 prefixes (#754)

* Issue with SS58 decoding.

* Switch to test branch.

* Fix set.

* Revert "Switch to test branch."

This reverts commit d79e42ea9bc780edb20296dae546d534f1916fc7.

* cargo fmt --all

Co-authored-by: adoerr <0xad@gmx.net>
This commit is contained in:
Tomasz Drwięga
2021-02-22 17:15:04 +01:00
committed by Bastian Köcher
parent 1b2e6cdeb0
commit 441c95ba2b
2 changed files with 7 additions and 0 deletions
+4
View File
@@ -69,6 +69,10 @@ impl SubstrateCli for Cli {
/// Parse and run command line arguments
pub fn run() -> sc_cli::Result<()> {
let cli = Cli::from_args();
// make sure to set correct crypto version.
sp_core::crypto::set_default_ss58_version(sp_core::crypto::Ss58AddressFormat::Custom(
millau_runtime::SS58Prefix::get() as u16,
));
match &cli.subcommand {
Some(Subcommand::Benchmark(cmd)) => {