Compile and test fix (#645)

This commit is contained in:
Christian Kamm 2023-07-14 16:27:52 +02:00 committed by GitHub
parent 609f6f24da
commit 1ba6513b5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 4 deletions

View File

@ -91,7 +91,8 @@ pub fn perp_create_market(
maint_overall_asset_weight: I80F48::from_num(maint_overall_asset_weight),
init_overall_asset_weight: I80F48::from_num(init_overall_asset_weight),
positive_pnl_liquidation_fee: I80F48::from_num(positive_pnl_liquidation_fee),
reserved: [0; 1888],
fees_withdrawn: 0,
reserved: [0; 1880],
};
if let Ok(oracle_price) =

View File

@ -89,7 +89,9 @@ pub fn token_register(
deposit_weight_scale_start_quote: f64::MAX,
reduce_only: 0,
force_close: 0,
reserved: [0; 2118],
padding: Default::default(),
fees_withdrawn: 0,
reserved: [0; 2104],
};
require_gt!(bank.max_rate, MINIMUM_MAX_RATE);

View File

@ -75,7 +75,7 @@ pub fn token_register_trustless(
deposit_weight_scale_start_quote: 5_000_000_000.0, // $5k
reduce_only: 2, // deposit-only
force_close: 0,
padding: [0; 6],
padding: Default::default(),
fees_withdrawn: 0,
reserved: [0; 2104],
};

View File

@ -2,7 +2,9 @@ use super::*;
#[tokio::test]
async fn test_ix_gate_set() -> Result<(), TransportError> {
let context = TestContext::new().await;
let mut test_builder = TestContextBuilder::new();
test_builder.test().set_compute_max_units(200_000); // lots of logging
let context = test_builder.start_default().await;
let solana = &context.solana.clone();
let admin = TestKeypair::new();