From cc13397fe61b2e1644e6e96addbda91610fe60d8 Mon Sep 17 00:00:00 2001 From: Forrest Voight Date: Sat, 3 Dec 2011 18:01:24 -0500 Subject: [PATCH] removed share0s --- p2pool/p2p.py | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/p2pool/p2p.py b/p2pool/p2p.py index 5c3bf01..57f79f0 100644 --- a/p2pool/p2p.py +++ b/p2pool/p2p.py @@ -114,7 +114,7 @@ class Protocol(bitcoin_p2p.BaseProtocol): self._think2() if best_share_hash is not None: - self.handle_share0s(hashes=[best_share_hash]) + self.node.handle_share_hashes([best_share_hash], self) message_ping = bitcoin_data.ComposedType([]) def handle_ping(self): @@ -181,12 +181,6 @@ class Protocol(bitcoin_p2p.BaseProtocol): def handle_getshares(self, hashes, parents, stops): self.node.handle_get_shares(hashes, parents, stops, self) - message_share0s = bitcoin_data.ComposedType([ - ('hashes', bitcoin_data.ListType(bitcoin_data.HashType())), - ]) - def handle_share0s(self, hashes): - self.node.handle_share_hashes(hashes, self) - message_share1as = bitcoin_data.ComposedType([ ('share1as', bitcoin_data.ListType(p2pool_data.share1a_type)), ]) @@ -229,7 +223,6 @@ class Protocol(bitcoin_p2p.BaseProtocol): def send_shares(self, shares): share1bs = [] - share0s = [] share1as = [] # XXX doesn't need to send full block when it's not urgent # eg. when getting history @@ -245,7 +238,6 @@ class Protocol(bitcoin_p2p.BaseProtocol): att(f, **dict((k, v[:len(v)//2]) for k, v in kwargs.iteritems())) att(f, **dict((k, v[len(v)//2:]) for k, v in kwargs.iteritems())) if share1bs: att(self.send_share1bs, share1bs=share1bs) - if share0s: att(self.send_share0s, hashes=share0s) if share1as: att(self.send_share1as, share1as=share1as) def connectionLost(self, reason): -- 1.7.1