diff --git a/dex/src/state.rs b/dex/src/state.rs index 99e1c8e..b60bd93 100644 --- a/dex/src/state.rs +++ b/dex/src/state.rs @@ -259,7 +259,7 @@ impl MarketState { Ok(open_orders) } - fn load_bids_mut<'a>(&self, bids: &'a AccountInfo) -> DexResult> { + pub fn load_bids_mut<'a>(&self, bids: &'a AccountInfo) -> DexResult> { check_assert_eq!(&bids.key.to_aligned_bytes(), &identity(self.bids)) .map_err(|_| DexErrorCode::WrongBidsAccount)?; let (header, buf) = strip_header::(bids, false)?; @@ -268,7 +268,7 @@ impl MarketState { Ok(RefMut::map(buf, Slab::new)) } - fn load_asks_mut<'a>(&self, asks: &'a AccountInfo) -> DexResult> { + pub fn load_asks_mut<'a>(&self, asks: &'a AccountInfo) -> DexResult> { check_assert_eq!(&asks.key.to_aligned_bytes(), &identity(self.asks)) .map_err(|_| DexErrorCode::WrongAsksAccount)?; let (header, buf) = strip_header::(asks, false)?;