Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cancel orders if all electrum servers are down #2281

Open
cipig opened this issue Nov 25, 2024 · 0 comments
Open

cancel orders if all electrum servers are down #2281

cipig opened this issue Nov 25, 2024 · 0 comments

Comments

@cipig
Copy link
Member

cipig commented Nov 25, 2024

atm, when you post an order with setprice and later all electrum servers of the coin go offline (and stay offline), the order is still in orderbook... problem with that is that the order can't be filled and can lead to situations like this:
image
spread is negative, everybody tries to buy those cheap coins and everybody fails and complains that it doesn't work

so question is if mm2 can simply cancel existing orders when there are no electrum servers left

mm2 shows this in log when calling my_balance on the coin:

25 09:17:25, coins::utxo::rpc_clients::electrum_rpc::client:313] WARN [coin=BTX-segwit] Failed to send the request using active connections, trying all connections.
25 09:17:25, coins::utxo::rpc_clients::electrum_rpc::client:426] WARN [coin=BTX-segwit], Error while sending request to btx-electrumx.coinsmunity.com:50002: Transport("Failed to establish connection: Temporary(\"Couldn't connect to the electrum server: Os { code: 111, kind: ConnectionRefused, message: \\\"Connection refused\\\" }\")")

my_balance shows this as result in such cases:

{"error":"rpc:182] dispatcher_legacy:140] legacy:242] utxo_common:218] Transport: JsonRpcError { client_info: \"coin: BTX-segwit\", request: JsonRpcBatchRequest([JsonRpcRequest { jsonrpc: \"2.0\", id: 15432, method: \"blockchain.scripthash.get_balance\", params: [String(\"e17b257cd2f2af705cd39060a1c75653cc8a5f5dab9ef93d412b6af8385a8fb5\")] }, JsonRpcRequest { jsonrpc: \"2.0\", id: 15433, method: \"blockchain.scripthash.get_balance\", params: [String(\"4b50b42533ef7808385e58db1309846f223ec52308d1deff243f7424731c5191\")] }]), error: Internal(\"All servers errored: [(btx-electrumx.coinsmunity.com:50002, Transport(\\\"Failed to establish connection: Temporary(\\\\\\\"Couldn't connect to the electrum server: Os { code: 111, kind: ConnectionRefused, message: \\\\\\\\\\\\\\\"Connection refused\\\\\\\\\\\\\\\" }\\\\\\\")\\\"))]\") }"}
@KomodoPlatform KomodoPlatform deleted a comment Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant