Closed AdamISZ closed 7 years ago
First, the basic check already existed in csjson.py, but due to the above comment, it has been changed to the conservative version (status = busy if available < max), with an appropriate comment.
Further, to support dynamic loading, there is now a task.LoopingCall that updates the wallet.unspent list at high frequency (1s for now) to support funding the wallet without restart. (Note the funding must be to an address in the cache, but it will be if a sync ever picked it up. (Worst scenario is only that a client uses independent code to generate addresses and funds something outside the gap limit, it is ignored, but the coins are there anyway).
Implemented as described above in 53c2be85d5b30f9e38d23972f5bef6c93656c2ab.
Done some concurrent user tests, seems correct so far. The unspent monitoring loop is only for the server (real time funding for client during run is not useful).
Doing it dynamically is a privacy leak. Better: stop accepting coinswaps if balance falls below configured maximum.