diff --git a/blockchain/sync.rs b/blockchain/sync.rs index 3fc1000d64d2fbd60bafc8d5b36d3d13fc09b724..1fca5547cede8bffcc8f03267585b73e4bc96a73 100644 --- a/blockchain/sync.rs +++ b/blockchain/sync.rs @@ -130,10 +130,11 @@ pub fn sync_ts( .bind(&[sqlite::Value::Integer(0)]) .expect("Fail to get ts current block !"); let current_ts_blockstamp = if let Some(row) = cursor.next().expect("cursor error") { - let block_id = BlockId(row[1] - .as_integer() - .expect("Fail to parse current ts blockstamp !") - as u32); + let block_id = BlockId( + row[1] + .as_integer() + .expect("Fail to parse current ts blockstamp !") as u32, + ); let block_hash = BlockHash( Hash::from_hex( row[0] diff --git a/dal/block.rs b/dal/block.rs index ae29b95d44f867a822ff2dd6adb294a181fbe656..4b2899c6ca9ecdeb0a75c24417464d4a91e26c9f 100644 --- a/dal/block.rs +++ b/dal/block.rs @@ -44,10 +44,11 @@ pub fn blockstamp_to_timestamp(blockstamp: &Blockstamp, db: &DuniterDB) -> Optio .next() .expect("convert blockstamp to timestamp failure at step 2 !") { - return Some(row[0] - .as_integer() - .expect("convert blockstamp to timestamp failure at step 3 !") - as u64); + return Some( + row[0] + .as_integer() + .expect("convert blockstamp to timestamp failure at step 3 !") as u64, + ); } None } @@ -298,10 +299,12 @@ impl DALBlock { }, block: BlockDocument { nonce, - number: BlockId(row[3] - .as_integer() - .expect("dal::get_block() : fail to parse number !") - as u32), + number: BlockId( + row[3] + .as_integer() + .expect("dal::get_block() : fail to parse number !") + as u32, + ), pow_min: row[4] .as_integer() .expect("dal::get_block() : fail to parse pow min !")