-
Notifications
You must be signed in to change notification settings - Fork 189
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
[fusion] Consolidating better, misc cleanup #1971
[fusion] Consolidating better, misc cleanup #1971
Conversation
markblundeberg
commented
Aug 21, 2020
- Make it so that consolidation is always actually shrinking wallet utxo set by each fusion having max of 3 outputs (thus minimum of 8 inputs). This way it always has an endpoint.
- Misc cleanups of locking in plugin.py
- Misc other cleanups in plugin.py
The lock wasn't being held everywhere it should, and anyway it doesn't need to be held so long in the plugins loop. This switches plugin.lock to be a finer grained lock, and reverses locking order (see create_fusion)... this likely needs more work in future.
- At most 3 outputs when we consolidate. - Therefore consolidation has an endpoint. - Try to slow down consolidations in late stages. (Maybe max_outputs should be made into a gui/config option for the power gamers?)
# Locking order wallet.lock -> plugin.lock. | ||
self.lock = threading.Lock() | ||
|
||
self.fusions = weakref.WeakKeyDictionary() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so self.lock
only guards self.fusions
? Or? Maybe we can have # Guarded by self.lock
here for each attribute it does guard...
Well so I have no further old lady complaints. It seems to run for me. Did you test it and stuff? Is it ready for merge? |
I've been running it with 2 instances since yesterday, I've seen no issues. |