X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=p2pool%2Fp2p.py;h=102990e4dad70ddcf3684533973be7bd9d7f2881;hb=62c10bd7ab9030595e971cac953acffe0e197532;hp=697fd060de65112275e8552930db7dba0d20ab94;hpb=d1c47c28c3e9ba9432da19c1c8d1aee2aa1568fc;p=p2pool.git diff --git a/p2pool/p2p.py b/p2pool/p2p.py index 697fd06..102990e 100644 --- a/p2pool/p2p.py +++ b/p2pool/p2p.py @@ -325,13 +325,15 @@ class Protocol(p2protocol.Protocol): ('tx_hashes', pack.ListType(pack.IntType(256))), ]) def handle_have_tx(self, tx_hashes): - assert self.remote_tx_hashes.isdisjoint(tx_hashes) + #assert self.remote_tx_hashes.isdisjoint(tx_hashes) self.remote_tx_hashes.update(tx_hashes) + while len(self.remote_tx_hashes) > 10000: + self.remote_tx_hashes.pop() message_losing_tx = pack.ComposedType([ ('tx_hashes', pack.ListType(pack.IntType(256))), ]) def handle_losing_tx(self, tx_hashes): - assert self.remote_tx_hashes.issuperset(tx_hashes) + #assert self.remote_tx_hashes.issuperset(tx_hashes) self.remote_tx_hashes.difference_update(tx_hashes)