Skip to content
This repository
Browse code

cleaned up test.test_p2p.Test.test_sharereq

  • Loading branch information...
commit 11c160ff3319a91a7f6494e699a33622d6f8e85e 1 parent 309110c
Forrest Voight authored

Showing 1 changed file with 13 additions and 13 deletions. Show diff stats Hide diff stats

  1. +13 13 p2pool/test/test_p2p.py
26 p2pool/test/test_p2p.py
@@ -5,23 +5,23 @@
5 5
6 6 from p2pool import networks, p2p
7 7
8   -class MyNode(p2p.Node):
9   - def __init__(self, df):
10   - p2p.Node.__init__(self, lambda: None, 29333, networks.nets['bitcoin'], {}, set([('127.0.0.1', 9333)]), 0, 0, 0, 0)
11   -
12   - self.id_to_use = random.randrange(2**256)
13   - self.df = df
14   -
15   - def handle_share_hashes(self, hashes, peer):
16   - peer.get_shares(
17   - hashes=[hashes[0]],
18   - parents=5,
19   - stops=[],
20   - ).chainDeferred(self.df)
21 8
22 9 class Test(unittest.TestCase):
23 10 @defer.inlineCallbacks
24 11 def test_sharereq(self):
  12 + class MyNode(p2p.Node):
  13 + def __init__(self, df):
  14 + p2p.Node.__init__(self, lambda: None, 29333, networks.nets['bitcoin'], {}, set([('127.0.0.1', 9333)]), 0, 0, 0, 0)
  15 +
  16 + self.df = df
  17 +
  18 + def handle_share_hashes(self, hashes, peer):
  19 + peer.get_shares(
  20 + hashes=[hashes[0]],
  21 + parents=5,
  22 + stops=[],
  23 + ).chainDeferred(self.df)
  24 +
25 25 df = defer.Deferred()
26 26 n = MyNode(df)
27 27 n.start()

0 comments on commit 11c160f

Please sign in to comment.
Something went wrong with that request. Please try again.