cashshuffle / cashshuffle-electron-cash-plugin

Electron cash cash-shuffle plugin
27 stars 13 forks source link

Prevent plugin from entering shuffling round when it has insufficient funds #10

Open checksum0 opened 6 years ago

checksum0 commented 6 years ago

Currently, the plugin will try to enter a shuffle if a shuffler has unconfirmed outputs to shuffle, resulting in a insufficient fund blame. Make sure plugin behavior prevent this from doing so.

Exception in thread Thread-67: Traceback (most recent call last): File "C:\Users\iande\AppData\Local\Programs\Python\Python36-32\lib\threading.py", line 916, in _bootstrap_inner self.run() File "C:\Users\iande\AppData\Local\Programs\Python\Python36-32\lib\threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "D:\fresh\Electron Cash-3.0\plugins\shuffle\coin_shuffle.py", line 206, in protocol_definition self.blame_insufficient_funds() File "D:\fresh\Electron Cash-3.0\plugins\shuffle\coin_shuffle.py", line 121, in blame_insufficient_funds raise BlameException('Insufficient funds') electroncash_plugins.shuffle.coin_shuffle.BlameException: Insufficient funds

clifordsymack commented 6 years ago

This exception arise when some player from pool have unsufficient funds. Shuffle button will not be enbled if player have insufficient fund, but you can't check other players funds before protocol started

checksum0 commented 6 years ago

I agree, but this arose from somebody using the plugin with unconfirmed funds, so leading to the round failing. I agree the server can't check it but the plugin should prevent the users from entering the round if their funds is unconfirmed.