Function: closeTradeMarketTimeout(uint256 _order)
Unregisters the close pending market order.
Inputs
_order
Control: Fully controlled by caller.
Constraints: No constaints.
Impact: The close pending market order ID to unregister.
Branches and code coverage
Intended branches
Delegate calls the
closeTradeMarket
function and unregisters the pending market order.
Negative behavior
Revert if no such trade exists.
Revert if caller is not the trader for the trade.
Revert if the time-out has not yet been reached.
Revert if no such close market order is found.
Function call analysis
this.registry.getContractAddress("tradingStorage")
What is controllable? N/A.
If the return value is controllable, how is it used and how can it go wrong? Returned value is the TradingStorage contract address.
What happens if it reverts, reenters or does other unusual control flow? N/A.
storageT.reqID_pendingMarketOrder(_order)
What is controllable?
_order
.If the return value is controllable, how is it used and how can it go wrong? Returns the
PendingMarketOrder
struct values. The return value is controllable as_order
is taken as an argument, but there are checks to ensure that the trader of the pending market order is the caller of this function.What happens if it reverts, reenters or does other unusual control flow? N/A.
storageT.unregisterPendingMarketOrder(_order, False)
What is controllable?
_order
.If the return value is controllable, how is it used and how can it go wrong? Unregisters the pending market order — no return value.
What happens if it reverts, reenters or does other unusual control flow? If it reverts, the entire call will revert — no reentrancy scenarios.