From 3d0f826afeec7707d17d0fe685e5e217114041f3 Mon Sep 17 00:00:00 2001 From: James Lovejoy Date: Sun, 3 Dec 2017 17:15:11 -0500 Subject: [PATCH] Fix incorrect indentation causing shares to be reported as rejected to the miner despite being accepted --- p2pool/bitcoin/stratum.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/p2pool/bitcoin/stratum.py b/p2pool/bitcoin/stratum.py index 75095187..34fff1bf 100644 --- a/p2pool/bitcoin/stratum.py +++ b/p2pool/bitcoin/stratum.py @@ -76,14 +76,14 @@ def rpc_submit(self, worker_name, job_id, extranonce2, ntime, nonce): res = got_response(header, worker_name, coinb_nonce) if len(self.wb._inner.my_share_hashes) > 20: if float(len(self.wb._inner.my_doa_share_hashes)) / float(len(self.wb._inner.my_share_hashes)) > 0.60: - self.transport.loseConnection() - return res + self.transport.loseConnection() # Disconnect miners with large hash > target to prevent DoS if self.wb._inner.total_hashes > 20: if float(self.wb._inner.invalid_hashes) / float(self.wb._inner.total_hashes) > 0.05: self.transport.loseConnection() - return res + + return res def close(self): self.wb.new_work_event.unwatch(self.watch_id)