From 9beaf378c3402013cc40694cdc0c06e7e89ec6c9 Mon Sep 17 00:00:00 2001 From: Linfeng Qian Date: Tue, 14 Apr 2020 16:30:12 +0800 Subject: [PATCH] fix: Fix molecule encode/decode Block/UncleBlock bug --- src/subcommands/molecule.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/subcommands/molecule.rs b/src/subcommands/molecule.rs index c3234629..a1c9893a 100644 --- a/src/subcommands/molecule.rs +++ b/src/subcommands/molecule.rs @@ -133,11 +133,11 @@ impl CliSubCommand for MoleculeSubCommand { "Header" => { decode_to_json::(&binary, format, color) } - "UncleBlock" => { - decode_to_json::(&binary, format, color) - } + "UncleBlock" => decode_to_json::( + &binary, format, color, + ), "Block" => { - decode_to_json::(&binary, format, color) + decode_to_json::(&binary, format, color) } "CellbaseWitness" => { decode_to_json::( @@ -191,11 +191,11 @@ impl CliSubCommand for MoleculeSubCommand { "Header" => { encode_from_json::(content.as_str()) } - "UncleBlock" => { - encode_from_json::(content.as_str()) - } + "UncleBlock" => encode_from_json::( + content.as_str(), + ), "Block" => { - encode_from_json::(content.as_str()) + encode_from_json::(content.as_str()) } "CellbaseWitness" => { encode_from_json::(