Skip to content

Commit 9bb77d5

Browse files
committed
rebase
1 parent 12bf10e commit 9bb77d5

File tree

12 files changed

+127
-127
lines changed

12 files changed

+127
-127
lines changed

Cargo.lock

Lines changed: 111 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

catalyst-toolbox/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ symmetric-cipher = { git = "https://github.com/input-output-hk/chain-wallet-libs
5959
graphql_client = "0.10"
6060
gag = "1"
6161
vit-servicing-station-lib = { git = "https://github.com/input-output-hk/vit-servicing-station.git", branch = "master" }
62+
stopwatch = "0.0.7"
6263

6364
[dev-dependencies]
6465
rand_chacha = "0.3"

catalyst-toolbox/src/archive.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use chain_addr::Discrimination;
2-
use chain_core::{packer::Codec, property::Deserialize};
2+
use chain_core::{packer::Codec, property::DeserializeFromSlice};
33
use chain_impl_mockchain::{
44
block::Block, chaintypes::HeaderId, fragment::Fragment, transaction::InputEnum,
55
};
@@ -56,7 +56,7 @@ pub fn generate_archive_files(jormungandr_database: &Path, output_dir: &Path) ->
5656
for iter_res in block_iter {
5757
let block_bin = iter_res?;
5858
let mut codec = Codec::new(block_bin.as_ref());
59-
let block: Block = Block::deserialize(&mut codec).unwrap();
59+
let block: Block = DeserializeFromSlice::deserialize_from_slice(&mut codec).unwrap();
6060

6161
for fragment in block.fragments() {
6262
if let Fragment::VoteCast(tx) = fragment {

catalyst-toolbox/src/bin/cli/kedqr/decode/hash.rs

Lines changed: 0 additions & 51 deletions
This file was deleted.

catalyst-toolbox/src/bin/cli/kedqr/encode/hash.rs

Lines changed: 0 additions & 54 deletions
This file was deleted.

catalyst-toolbox/src/bin/cli/kedqr/info.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@ use super::QrCodeOpts;
22
use crate::cli::kedqr::decode::{secret_from_payload, secret_from_qr};
33
use catalyst_toolbox::kedqr::QrPin;
44
use chain_addr::{AddressReadable, Discrimination, Kind};
5-
use chain_core::{
6-
mempack::{ReadBuf, Readable},
7-
property::Deserialize,
8-
};
5+
use chain_core::property::Deserialize;
96
use chain_crypto::{Ed25519Extended, SecretKey};
107
use chain_impl_mockchain::block::Block;
8+
use chain_ser::packer::Codec;
119
use jormungandr_lib::interfaces::{Block0Configuration, Initial};
12-
use std::io::BufReader;
1310
use std::path::{Path, PathBuf};
1411
use structopt::StructOpt;
1512
use url::Url;
@@ -55,12 +52,11 @@ impl InfoForQrCodeCmd {
5552
.read(true)
5653
.append(false)
5754
.open(block0_path)?;
58-
let reader = BufReader::new(reader);
59-
Block::deserialize(reader)?
55+
Block::deserialize(&mut Codec::new(reader))?
6056
} else if Url::parse(block0_path).is_ok() {
6157
let response = reqwest::blocking::get(block0_path)?;
6258
let block0_bytes = response.bytes()?.to_vec();
63-
Block::read(&mut ReadBuf::from(&block0_bytes))?
59+
Block::deserialize(&mut Codec::new(&block0_bytes[..]))?
6460
} else {
6561
panic!("invalid block0: should be either path to filesystem or url ");
6662
}

0 commit comments

Comments
 (0)