mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
cargo +nightly fmt
This commit is contained in:
@@ -171,10 +171,10 @@ impl<T: Transaction> Block<T> {
|
||||
Err(BlockError::ProvidedAfterNonProvided)?;
|
||||
}
|
||||
|
||||
let Some(local) =
|
||||
locally_provided.get_mut(order).and_then(|deque| deque.pop_front()) else {
|
||||
Err(BlockError::NonLocalProvided(txs.pop().unwrap()))?
|
||||
};
|
||||
let Some(local) = locally_provided.get_mut(order).and_then(|deque| deque.pop_front())
|
||||
else {
|
||||
Err(BlockError::NonLocalProvided(txs.pop().unwrap()))?
|
||||
};
|
||||
if tx != &local {
|
||||
Err(BlockError::DistinctProvided)?;
|
||||
}
|
||||
|
||||
@@ -229,9 +229,9 @@ impl<D: Db, T: Transaction, P: P2p> Tributary<D, T, P> {
|
||||
}
|
||||
|
||||
Some(&TENDERMINT_MESSAGE) => {
|
||||
let Ok(msg) = SignedMessageFor::<TendermintNetwork<D, T, P>>::decode::<&[u8]>(
|
||||
&mut &msg[1 ..]
|
||||
) else {
|
||||
let Ok(msg) =
|
||||
SignedMessageFor::<TendermintNetwork<D, T, P>>::decode::<&[u8]>(&mut &msg[1 ..])
|
||||
else {
|
||||
log::error!("received invalid tendermint message");
|
||||
return false;
|
||||
};
|
||||
|
||||
@@ -63,9 +63,7 @@ impl<D: Db, T: Transaction> ProvidedTransactions<D, T> {
|
||||
|
||||
/// Provide a transaction for inclusion in a block.
|
||||
pub(crate) fn provide(&mut self, tx: T) -> Result<(), ProvidedError> {
|
||||
let TransactionKind::Provided(order) = tx.kind() else {
|
||||
Err(ProvidedError::NotProvided)?
|
||||
};
|
||||
let TransactionKind::Provided(order) = tx.kind() else { Err(ProvidedError::NotProvided)? };
|
||||
|
||||
match verify_transaction(&tx, self.genesis, &mut HashMap::new()) {
|
||||
Ok(()) => {}
|
||||
|
||||
Reference in New Issue
Block a user