Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jonfung-dydx committed Mar 15, 2024
1 parent b6bbdd0 commit d84db8f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
4 changes: 1 addition & 3 deletions protocol/app/testdata/default_genesis_state.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@
},
"block_rate_limit_config": {
"max_short_term_orders_and_cancels_per_n_blocks": [],
"max_stateful_orders_per_n_blocks": [],
"max_short_term_order_cancellations_per_n_blocks": [],
"max_short_term_orders_per_n_blocks": []
"max_stateful_orders_per_n_blocks": []
},
"equity_tier_limit_config": {
"short_term_order_equity_tiers": [],
Expand Down
4 changes: 2 additions & 2 deletions protocol/testing/containertest/preupgrade_genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@
},
"clob": {
"block_rate_limit_config": {
"max_short_term_orders_per_n_blocks": [
"max_short_term_orders_and_cancels_per_n_blocks": [
{
"limit": 200,
"limit": 400,
"num_blocks": 1
}
],
Expand Down
6 changes: 2 additions & 4 deletions protocol/x/clob/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,7 @@ func TestAppModuleBasic_DefaultGenesis(t *testing.T) {
expected += `{"max_notional_liquidated":"100000000000000","max_quantums_insurance_lost":"100000000000000"},`
expected += `"fillable_price_config":{"bankruptcy_adjustment_ppm":1000000,`
expected += `"spread_to_maintenance_margin_ratio_ppm":100000}},"block_rate_limit_config":`
expected += `{"max_short_term_orders_and_cancels_per_n_blocks":[],"max_stateful_orders_per_n_blocks":[],`
expected += `"max_short_term_order_cancellations_per_n_blocks":[],"max_short_term_orders_per_n_blocks":[]},`
expected += `{"max_short_term_orders_and_cancels_per_n_blocks":[],"max_stateful_orders_per_n_blocks":[]},`
expected += `"equity_tier_limit_config":{"short_term_order_equity_tiers":[], "stateful_order_equity_tiers":[]}}`

require.JSONEq(t, expected, string(json))
Expand Down Expand Up @@ -428,8 +427,7 @@ func TestAppModule_InitExportGenesis(t *testing.T) {
expected += `"spread_to_maintenance_margin_ratio_ppm":100000}},"block_rate_limit_config":`
expected += `{"max_short_term_orders_and_cancels_per_n_blocks":[{"limit": 400,"num_blocks":1}],`
expected += `"max_stateful_orders_per_n_blocks":[{"limit": 2,"num_blocks":1},`
expected += `{"limit": 20,"num_blocks":100}],"max_short_term_order_cancellations_per_n_blocks":[],`
expected += `"max_short_term_orders_per_n_blocks":[]},`
expected += `{"limit": 20,"num_blocks":100}]},`
expected += `"equity_tier_limit_config":{"short_term_order_equity_tiers":[{"limit":0,"usd_tnc_required":"0"},`
expected += `{"limit":1,"usd_tnc_required":"20"},{"limit":5,"usd_tnc_required":"100"},`
expected += `{"limit":10,"usd_tnc_required":"1000"},{"limit":100,"usd_tnc_required":"10000"},`
Expand Down

0 comments on commit d84db8f

Please sign in to comment.