Fix to seq num logging. Seq num was incremented between event and logging (#556)

This commit is contained in:
Nicholas Clarke 2023-04-25 04:38:31 -07:00 committed by GitHub
parent 5d77ba6834
commit 2dce1398d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 54 additions and 2 deletions

View File

@ -7202,6 +7202,23 @@
]
}
},
{
"name": "CheckLiquidatable",
"type": {
"kind": "enum",
"variants": [
{
"name": "NotLiquidatable"
},
{
"name": "Liquidatable"
},
{
"name": "BecameNotLiquidatable"
}
]
}
},
{
"name": "OracleType",
"type": {

View File

@ -138,12 +138,13 @@ impl<'a> Orderbook<'a> {
matched_order_changes.push((best_opposing.handle, new_best_opposing_quantity));
}
let seq_num = event_queue.header.seq_num;
let fill = FillEvent::new(
side,
maker_out,
best_opposing.node.owner_slot,
now_ts,
event_queue.header.seq_num,
seq_num,
best_opposing.node.owner,
best_opposing.node.client_order_id,
market.maker_fee,
@ -160,7 +161,7 @@ impl<'a> Orderbook<'a> {
emit!(FilledPerpOrderLog {
mango_group: market.group.key(),
perp_market_index: market.perp_market_index,
seq_num: event_queue.header.seq_num,
seq_num: seq_num,
});
}
let total_quote_lots_taken = order.max_quote_lots - remaining_quote_lots;

View File

@ -7202,6 +7202,23 @@ export type MangoV4 = {
]
}
},
{
"name": "CheckLiquidatable",
"type": {
"kind": "enum",
"variants": [
{
"name": "NotLiquidatable"
},
{
"name": "Liquidatable"
},
{
"name": "BecameNotLiquidatable"
}
]
}
},
{
"name": "OracleType",
"type": {
@ -16234,6 +16251,23 @@ export const IDL: MangoV4 = {
]
}
},
{
"name": "CheckLiquidatable",
"type": {
"kind": "enum",
"variants": [
{
"name": "NotLiquidatable"
},
{
"name": "Liquidatable"
},
{
"name": "BecameNotLiquidatable"
}
]
}
},
{
"name": "OracleType",
"type": {