Skip to content

Commit 4fb86d9

Browse files
committed
point chain-libs/chain-wallet-libs and jormungandr branches to catalyst-fund8
1 parent e1c6b42 commit 4fb86d9

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

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::DeserializeFromSlice};
2+
use chain_core::{packer::Codec, property::Deserialize};
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 = DeserializeFromSlice::deserialize_from_slice(&mut codec).unwrap();
59+
let block: Block = Block::deserialize(&mut codec).unwrap();
6060

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

catalyst-toolbox/src/bin/cli/recovery/tally.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
use catalyst_toolbox::recovery::{Replay, ReplayError};
2-
use chain_core::{
3-
packer::Codec,
4-
property::{Deserialize, ReadError},
5-
};
2+
use chain_core::{packer::Codec, property::Deserialize};
63
use chain_impl_mockchain::block::Block;
74
use jcli_lib::utils::{
85
output_file::{Error as OutputFileError, OutputFile},
@@ -39,7 +36,7 @@ pub enum Error {
3936
Block0Unavailable,
4037

4138
#[error("Could not load block0")]
42-
Block0Loading(#[source] ReadError),
39+
Block0Loading(#[source] std::io::Error),
4340
}
4441

4542
/// Recover the tally from fragment log files and the initial preloaded block0 binary file.
@@ -71,6 +68,7 @@ pub struct ReplayCli {
7168

7269
fn read_block0(path: PathBuf) -> Result<Block, Error> {
7370
let reader = std::fs::File::open(path)?;
71+
let reader = std::io::BufReader::new(reader);
7472
Block::deserialize(&mut Codec::new(reader)).map_err(Error::Block0Loading)
7573
}
7674

catalyst-toolbox/src/bin/cli/recovery/votes.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ impl VotesPrintout {
104104

105105
stderrlog::new().verbosity(verbose).init().unwrap();
106106
let reader = std::fs::File::open(block0_path)?;
107+
let reader = std::io::BufReader::new(reader);
107108
let block0 = Block::deserialize(&mut Codec::new(reader)).unwrap();
108109

109110
let (original, to_filter): (Vec<_>, Vec<_>) =

0 commit comments

Comments
 (0)