Skip to content

Commit

Permalink
fix trace and rename other_order (#157)
Browse files Browse the repository at this point in the history
Co-authored-by: Maximilian Schneider <[email protected]>
  • Loading branch information
brittcyr and mschneider authored Oct 8, 2024
1 parent 86f31f5 commit 8f281ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions programs/manifest/src/state/market.rs
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ impl<Fixed: DerefOrBorrowMut<MarketFixed>, Dynamic: DerefOrBorrowMut<[u8]>>
// inside the matching rather than skipping the matching altogether
// because post only orders should fail, not produce a crossed book.
trace!(
"match {} {order_type:?} {price:?} with {other_order:?}",
"match {} {order_type:?} {price:?} with {maker_order:?}",
if is_bid { "bid" } else { "ask" }
);
assert_can_take(order_type)?;
Expand Down Expand Up @@ -864,10 +864,10 @@ impl<Fixed: DerefOrBorrowMut<MarketFixed>, Dynamic: DerefOrBorrowMut<[u8]>>
remaining_base_atoms = remaining_base_atoms.checked_sub(base_atoms_traded)?;
current_maker_order_index = next_maker_order_index;
} else {
let other_order: &mut RestingOrder =
let maker_order: &mut RestingOrder =
get_mut_helper::<RBNode<RestingOrder>>(dynamic, current_maker_order_index)
.get_mut_value();
other_order.reduce(base_atoms_traded)?;
maker_order.reduce(base_atoms_traded)?;
remaining_base_atoms = BaseAtoms::ZERO;
break;
}
Expand Down

0 comments on commit 8f281ff

Please sign in to comment.