mirror of
https://github.com/JoinMarket-Org/joinmarket-clientserver.git
synced 2026-08-13 12:33:40 +02:00
ob-watcher: tackle stale orders by first removing all of them
when checking for timed-out counterparties (or refreshing the orderbook), stale entries are preserved because those peers disconnected prematurely. This fix prevents that issue by first removing all entries before requesting for the orderbook.
This commit is contained in:
parent
bbd5019620
commit
ace9996d8e
1 changed files with 3 additions and 1 deletions
|
|
@ -684,6 +684,9 @@ class OrderbookPageRequestHeader(http.server.SimpleHTTPRequestHandler):
|
|||
if self.path not in pages:
|
||||
return
|
||||
if self.path == '/refreshorderbook':
|
||||
with self.taker.dblock:
|
||||
self.taker.db.execute("DELETE FROM orderbook;")
|
||||
self.taker.db.execute("DELETE FROM fidelitybonds;")
|
||||
self.taker.msgchan.request_orderbook()
|
||||
time.sleep(5)
|
||||
self.path = '/'
|
||||
|
|
@ -768,7 +771,6 @@ def on_privmsg(inst, nick, message):
|
|||
except:
|
||||
pass
|
||||
|
||||
|
||||
def get_dummy_nick():
|
||||
"""In Joinmarket-CS nick creation is negotiated
|
||||
between client and server/daemon so as to allow
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue