Browse Source

Fix formatting issue

chaintope/fix-wrong-block-pos
azuchi 6 years ago
parent
commit
df0b097747
  1. 4
      src/bulk.rs

4
src/bulk.rs

@ -141,9 +141,9 @@ fn parse_blocks(blob: Vec<u8>, magic: u32) -> Result<Vec<Block>> {
// If Core's WriteBlockToDisk ftell fails, only the magic byte and size will be written // If Core's WriteBlockToDisk ftell fails, only the magic byte and size will be written
// and the block body will be unwritten data. skip that's data. // and the block body will be unwritten data. skip that's data.
let mut tmp_cursor = Cursor::new(&blob[start..(start + 4)]); let mut tmp_cursor = Cursor::new(&blob[start..(start + 4)]);
match u32::consensus_decode(&mut tmp_cursor){ match u32::consensus_decode(&mut tmp_cursor) {
Ok(value) => { Ok(value) => {
if magic == value{ if magic == value {
cursor.set_position(start as u64); cursor.set_position(start as u64);
continue; continue;
} }

Loading…
Cancel
Save