Skip to content

Commit

Permalink
chore: align repo with changes to minting flow
Browse files Browse the repository at this point in the history
  • Loading branch information
cdummett committed May 16, 2024
1 parent 0749a44 commit 40ecff7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 28 deletions.
25 changes: 3 additions & 22 deletions vega_sim/environment/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
from vega_sim.null_service import VegaServiceNull
from vega_sim.service import VegaService

from vega_sim.service import VegaFaucetError

logger = logging.getLogger(__name__)

MarketState = namedtuple(
Expand Down Expand Up @@ -304,16 +302,8 @@ def step(self, vega: VegaService) -> None:
if self.random_agent_ordering
else self.agents
):
# TODO: Remove this once fauceting error has been investigated
try:
agent.step(vega)
except VegaFaucetError:
logger.exception(
f"Agent {agent.name()} failed to step. Funds from faucet never"
" received."
)
# Mint forwards blocks, wait for catchup
vega.wait_for_total_catchup()
agent.step(vega)
vega.wait_for_total_catchup()


class MarketEnvironmentWithState(MarketEnvironment):
Expand Down Expand Up @@ -431,16 +421,7 @@ def step(self, vega: VegaService) -> None:
if self.random_agent_ordering
else self.agents
):
# TODO: Remove this once fauceting error has been investigated
try:
agent.step(state)
except VegaFaucetError:
logger.exception(
f"Agent {agent.name()} failed to step. Funds from faucet never"
" received."
)
# Mint forwards blocks, wait for catchup
vega.wait_for_total_catchup()
agent.step(state)


class NetworkEnvironment(MarketEnvironmentWithState):
Expand Down
2 changes: 0 additions & 2 deletions vega_sim/scenario/common/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,6 @@ def step(self, vega_state: VegaState):
asset=self.asset_id,
amount=self.initial_asset_mint,
key_name=self.key_name,
raise_error=False,
)
self.vega.wait_for_total_catchup()

Expand Down Expand Up @@ -3271,7 +3270,6 @@ def step(self, vega_state: VegaState):
asset=self.asset_id,
amount=self.initial_asset_mint,
key_name=self.key_name,
raise_error=False,
)

# Ensure volume maximising range is at least 100bps wide to
Expand Down
4 changes: 0 additions & 4 deletions vega_sim/scenario/fuzzed_markets/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ def check_balance(self, asset_id: str, amount: float):
wallet_name=self.wallet_name,
asset=asset_id,
amount=amount,
raise_error=False,
)


Expand Down Expand Up @@ -364,7 +363,6 @@ def step(self, vega_state):
wallet_name=self.wallet_name,
amount=self.initial_asset_mint,
asset=self.asset_id,
raise_error=False,
)
self.close_outs += 1
self.commitment_amount = 0
Expand Down Expand Up @@ -466,7 +464,6 @@ def step(self, vega_state):
wallet_name=self.wallet_name,
amount=self.initial_asset_mint,
asset=self.asset_id,
raise_error=False,
)
self.close_outs += 1
self.commitment_amount = 0
Expand Down Expand Up @@ -639,7 +636,6 @@ def step(self, vega_state):
wallet_name=self.wallet_name,
amount=self.initial_asset_mint,
asset=self.asset_id,
raise_error=False,
)
return

Expand Down

0 comments on commit 40ecff7

Please sign in to comment.