Skip to content

Commit 3c6ad68

Browse files
committed
remove any unused fields
1 parent 7e67ac8 commit 3c6ad68

File tree

5 files changed

+6
-35
lines changed

5 files changed

+6
-35
lines changed

programs/drift/src/instructions/lp_admin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub fn handle_initialize_lp_pool(
6464
last_aum: 0,
6565
last_aum_slot: 0,
6666
max_settle_quote_amount: max_settle_quote_amount_per_market,
67-
last_hedge_ts: 0,
67+
_padding: 0,
6868
total_mint_redeem_fees_paid: 0,
6969
bump: ctx.bumps.lp_pool,
7070
min_mint_fee,

programs/drift/src/state/lp_pool.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pub struct LPPool {
9797
pub max_settle_quote_amount: u64,
9898

9999
/// timestamp of last vAMM revenue rebalance
100-
pub last_hedge_ts: u64,
100+
pub _padding: u64,
101101

102102
/// Every mint/redeem has a monotonically increasing id. This is the next id to use
103103
pub mint_redeem_id: u64,
@@ -145,7 +145,7 @@ impl Default for LPPool {
145145
total_mint_redeem_fees_paid: 0,
146146
last_aum_slot: 0,
147147
max_settle_quote_amount: 0,
148-
last_hedge_ts: 0,
148+
_padding: 0,
149149
mint_redeem_id: 0,
150150
settle_id: 0,
151151
min_mint_fee: 0,
@@ -1313,14 +1313,6 @@ impl Default for ConstituentTargetBase {
13131313
}
13141314
}
13151315

1316-
#[derive(Clone, Copy, BorshSerialize, BorshDeserialize, PartialEq, Debug, Eq)]
1317-
pub enum WeightValidationFlags {
1318-
NONE = 0b0000_0000,
1319-
EnforceTotalWeight100 = 0b0000_0001,
1320-
NoNegativeWeights = 0b0000_0010,
1321-
NoOverweight = 0b0000_0100,
1322-
}
1323-
13241316
impl<'a> AccountZeroCopy<'a, TargetsDatum, ConstituentTargetBaseFixed> {
13251317
pub fn get_target_weight(
13261318
&self,

programs/drift/src/state/lp_pool/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ mod swap_tests {
782782
) {
783783
let lp_pool = LPPool {
784784
last_aum,
785-
last_hedge_ts: 0,
785+
_padding: 0,
786786
min_mint_fee: 0,
787787
..LPPool::default()
788788
};
@@ -974,7 +974,7 @@ mod swap_tests {
974974
) {
975975
let lp_pool = LPPool {
976976
last_aum,
977-
last_hedge_ts: 0,
977+
_padding: 0,
978978
min_mint_fee: 100, // 1 bps
979979
..LPPool::default()
980980
};

sdk/src/idl/drift.json

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9845,7 +9845,7 @@
98459845
"type": "u64"
98469846
},
98479847
{
9848-
"name": "lastHedgeTs",
9848+
"name": "padding",
98499849
"docs": [
98509850
"timestamp of last vAMM revenue rebalance"
98519851
],
@@ -15445,26 +15445,6 @@
1544515445
]
1544615446
}
1544715447
},
15448-
{
15449-
"name": "WeightValidationFlags",
15450-
"type": {
15451-
"kind": "enum",
15452-
"variants": [
15453-
{
15454-
"name": "NONE"
15455-
},
15456-
{
15457-
"name": "EnforceTotalWeight100"
15458-
},
15459-
{
15460-
"name": "NoNegativeWeights"
15461-
},
15462-
{
15463-
"name": "NoOverweight"
15464-
}
15465-
]
15466-
}
15467-
},
1546815448
{
1546915449
"name": "MarginCalculationMode",
1547015450
"type": {

sdk/src/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1785,7 +1785,6 @@ export type LPPoolAccount = {
17851785
totalMintRedeemFeesPaid: BN;
17861786
lastAumSlot: BN;
17871787
maxSettleQuoteAmount: BN;
1788-
lastHedgeTs: BN;
17891788
mintRedeemId: BN;
17901789
settleId: BN;
17911790
minMintFee: BN;

0 commit comments

Comments
 (0)