Enable Loading Bids And Asks Via External Packages (#121)
This commit is contained in:
parent
576e5d2ef2
commit
1f6d586701
|
@ -259,7 +259,7 @@ impl MarketState {
|
|||
Ok(open_orders)
|
||||
}
|
||||
|
||||
fn load_bids_mut<'a>(&self, bids: &'a AccountInfo) -> DexResult<RefMut<'a, Slab>> {
|
||||
pub fn load_bids_mut<'a>(&self, bids: &'a AccountInfo) -> DexResult<RefMut<'a, Slab>> {
|
||||
check_assert_eq!(&bids.key.to_aligned_bytes(), &identity(self.bids))
|
||||
.map_err(|_| DexErrorCode::WrongBidsAccount)?;
|
||||
let (header, buf) = strip_header::<OrderBookStateHeader, u8>(bids, false)?;
|
||||
|
@ -268,7 +268,7 @@ impl MarketState {
|
|||
Ok(RefMut::map(buf, Slab::new))
|
||||
}
|
||||
|
||||
fn load_asks_mut<'a>(&self, asks: &'a AccountInfo) -> DexResult<RefMut<'a, Slab>> {
|
||||
pub fn load_asks_mut<'a>(&self, asks: &'a AccountInfo) -> DexResult<RefMut<'a, Slab>> {
|
||||
check_assert_eq!(&asks.key.to_aligned_bytes(), &identity(self.asks))
|
||||
.map_err(|_| DexErrorCode::WrongAsksAccount)?;
|
||||
let (header, buf) = strip_header::<OrderBookStateHeader, u8>(asks, false)?;
|
||||
|
|
Loading…
Reference in New Issue