Skip to content

Commit

Permalink
Fixing e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
batconjurer committed Feb 16, 2024
1 parent da0ab6e commit b0ba052
Show file tree
Hide file tree
Showing 14 changed files with 186 additions and 192 deletions.
7 changes: 5 additions & 2 deletions crates/apps/src/lib/node/ledger/shell/block_alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl BlockAllocator<states::BuildingTxBatch> {
_state: PhantomData,
block: TxBin::init(max),
protocol_txs: TxBin::default(),
normal_txs: NormalTxsBins{
normal_txs: NormalTxsBins {
space: TxBin::init(tendermint_max_block_space_in_bytes),
gas: TxBin::init(max_block_gas),
},
Expand Down Expand Up @@ -496,7 +496,10 @@ mod tests {
1_000,
);
let expected = tendermint_max_block_space_in_bytes;
assert_eq!(bins.protocol_txs.allotted, threshold::ONE_HALF.over(tendermint_max_block_space_in_bytes));
assert_eq!(
bins.protocol_txs.allotted,
threshold::ONE_HALF.over(tendermint_max_block_space_in_bytes)
);
assert_eq!(expected, bins.unoccupied_space_in_bytes());
}

Expand Down
12 changes: 6 additions & 6 deletions crates/apps/src/lib/node/ledger/shell/block_alloc/states.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! All the states of the [`BlockAllocator`] state machine,
//! All the states of the `BlockAllocator` state machine,
//! over the extent of a Tendermint consensus round
//! block proposal.
//!
Expand Down Expand Up @@ -51,7 +51,7 @@ pub enum WithoutNormalTxs {}
/// [`crate::node::ledger::shell::block_alloc::states`].
pub struct BuildingTxBatch {}

/// Try to allocate a new transaction on a [`BlockAllocator`] state.
/// Try to allocate a new transaction on a `BlockAllocator` state.
///
/// For more info, read the module docs of
/// [`crate::node::ledger::shell::block_alloc::states`].
Expand All @@ -65,18 +65,18 @@ pub trait TryAlloc {
) -> Result<(), AllocFailure>;
}

/// Represents a state transition in the [`BlockAllocator`] state machine.
/// Represents a state transition in the `BlockAllocator` state machine.
///
/// This trait should not be used directly. Instead, consider using
/// [`NextState`].
///
/// For more info, read the module docs of
/// [`crate::node::ledger::shell::block_alloc::states`].
pub trait NextStateImpl<Transition = ()> {
/// The next state in the [`BlockAllocator`] state machine.
/// The next state in the `BlockAllocator` state machine.
type Next;

/// Transition to the next state in the [`BlockAllocator`] state
/// Transition to the next state in the `BlockAllocator`] state
/// machine.
fn next_state_impl(self) -> Self::Next;
}
Expand All @@ -87,7 +87,7 @@ pub trait NextStateImpl<Transition = ()> {
/// For more info, read the module docs of
/// [`crate::node::ledger::shell::block_alloc::states`].
pub trait NextState: NextStateImpl {
/// Transition to the next state in the [`BlockAllocator`] state,
/// Transition to the next state in the `BlockAllocator` state,
/// using a null transiiton function.
#[inline]
fn next_state(self) -> Self::Next
Expand Down

0 comments on commit b0ba052

Please sign in to comment.