Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Commit

Permalink
Merge pull request #112 from darrenldl/dev
Browse files Browse the repository at this point in the history
Minor code refactoring, added Gitter link and badge
  • Loading branch information
darrenldl committed Dec 26, 2018
2 parents 0d86fd4 + 4c11905 commit 84c4eea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[![Coverage Status](https://coveralls.io/repos/github/darrenldl/blockyarchive/badge.svg?branch=master)](https://coveralls.io/github/darrenldl/blockyarchive?branch=master)
[![Crates](https://img.shields.io/crates/v/blkar.svg)](https://crates.io/crates/blkar)
[![dependency status](https://deps.rs/repo/github/darrenldl/blockyarchive/status.svg)](https://deps.rs/repo/github/darrenldl/blockyarchive)
[![Gitter chat](https://badges.gitter.im/blockyarchive/gitter.png)](https://gitter.im/blockyarchive/community)

[Documentation](https://github.com/darrenldl/blockyarchive/wiki)

Expand Down Expand Up @@ -52,6 +53,10 @@ cargo install blkar

The [wiki](https://github.com/darrenldl/blockyarchive/wiki) contains comprehensive guides and resources.

## Got a question?

Feel free to join the [Gitter chat](https://gitter.im/blockyarchive/community) if you've got a question. You can email me directly as well.

## Changelog

[Changelog](CHANGELOG.md)
Expand Down
14 changes: 6 additions & 8 deletions src/rs_codec/repairer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,21 +288,19 @@ impl RSRepairer {

let rs_codec = &self.rs_codec;

let successful;
{
let successful = {
let mut buf : SmallVec<[&mut [u8]; 32]> =
SmallVec::with_capacity(rs_codec.total_shard_count());
for s in self.buf.iter_mut() {
buf.push(sbx_block::slice_data_buf_mut(self.version, s));
}

// reconstruct data portion
successful =
match rs_codec.reconstruct(&mut buf, &self.buf_present) {
Ok(()) => true,
Err(_) => false
};
}
match rs_codec.reconstruct(&mut buf, &self.buf_present) {
Ok(()) => true,
Err(_) => false
}
};

let block_set_size = self.rs_codec.total_shard_count() as u32;

Expand Down

0 comments on commit 84c4eea

Please sign in to comment.