Skip to content

Commit

Permalink
actually fixed all rustfmt errors
Browse files Browse the repository at this point in the history
  • Loading branch information
econsta committed Oct 9, 2023
1 parent 7e1855a commit 82ec35d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
14 changes: 7 additions & 7 deletions processor/src/key_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ fn confirm_keys<N: Network>(
) -> (ThresholdKeys<Ristretto>, ThresholdKeys<N::Curve>) {
let val: &[u8] = key_pair.1.as_ref();
let (keys_vec, keys) =
read_keys::<N>(txn, &GeneratedKeysDb::key((set, (&key_pair.0 .0, val)).encode()))
.unwrap();
read_keys::<N>(txn, &GeneratedKeysDb::key((set, (&key_pair.0 .0, val)).encode())).unwrap();
assert_eq!(key_pair.0 .0, keys.0.group_key().to_bytes());
assert_eq!(
{
Expand Down Expand Up @@ -87,11 +86,12 @@ impl GeneratedKeysDb {
) {
let mut keys = substrate_keys.serialize();
keys.extend(network_keys.serialize().iter());
let key = (id.set, (&substrate_keys.group_key().to_bytes(), network_keys.group_key().to_bytes().as_ref())).encode();
txn.put(
Self::key(key),
keys,
);
let key = (
id.set,
(&substrate_keys.group_key().to_bytes(), network_keys.group_key().to_bytes().as_ref()),
)
.encode();
txn.put(Self::key(key), keys);
}
}

Expand Down
6 changes: 4 additions & 2 deletions processor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,9 @@ async fn handle_coordinator_msg<D: Db, N: Network, Co: Coordinator>(
} => {
assert_eq!(network_id, N::NETWORK, "coordinator sent us data for another network");

if let Some((block, set, key_pair)) = PendingActivationsDb::pending_activation::<N, D::Transaction<'_>>(txn) {
if let Some((block, set, key_pair)) =
PendingActivationsDb::pending_activation::<N, D::Transaction<'_>>(txn)
{
// Only run if this is a Batch belonging to a distinct block
if context.network_latest_finalized_block.as_ref() != block.as_ref() {
let mut queue_block = <N::Block as Block<N>>::Id::default();
Expand Down Expand Up @@ -379,7 +381,7 @@ async fn handle_coordinator_msg<D: Db, N: Network, Co: Coordinator>(
async fn boot<N: Network, D: Db>(
raw_db: &mut D,
network: &N,
) -> (D,TributaryMutable<N, D>, SubstrateMutable<N, D>) {
) -> (D, TributaryMutable<N, D>, SubstrateMutable<N, D>) {
let mut entropy_transcript = {
let entropy = Zeroizing::new(env::var("ENTROPY").expect("entropy wasn't specified"));
if entropy.len() != 64 {
Expand Down

0 comments on commit 82ec35d

Please sign in to comment.