From 70ed81c7ec7314a054e274223d9802b13746f559 Mon Sep 17 00:00:00 2001 From: Forrest Voight Date: Tue, 29 Nov 2011 10:26:48 -0500 Subject: [PATCH] fixed handle_shares not setting Share.peer --- p2pool/p2p.py | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/p2pool/p2p.py b/p2pool/p2p.py index 1bb193a..3e979e3 100644 --- a/p2pool/p2p.py +++ b/p2pool/p2p.py @@ -210,7 +210,11 @@ class Protocol(bitcoin_p2p.BaseProtocol): ('shares', bitcoin_data.ListType(p2pool_data.new_share_type)), ]) def handle_shares(self, shares): - self.node.handle_shares([p2pool_data.Share.from_share(x, self.node.net) for x in shares], self) + res = [] + for share in shares: + share_obj = p2pool_data.Share.from_share(share, self.node.net) + share_obj.peer = self + self.node.handle_shares(res) message_share1as = bitcoin_data.ComposedType([ ('share1as', bitcoin_data.ListType(p2pool_data.share1a_type)), -- 1.7.1