shohu / c0ban

c0ban source tree
MIT License
0 stars 0 forks source link

Pass for p2p-versionbits-warning.py #40

Closed shohu closed 6 years ago

shohu commented 6 years ago

test code

# test/functional/p2p-versionbits-warning.py
2018-06-01 09:10:20.321000 TestFramework (INFO): Initializing test directory /tmp/testg0dd3c9x
2018-06-01 09:10:20.603000 TestFramework.mininode (INFO): Connecting to Bitcoin Node: 127.0.0.1:13380
2018-06-01 09:11:21.121000 TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/c0ban/test/functional/test_framework/test_framework.py", line 120, in main
    self.run_test()
  File "test/functional/p2p-versionbits-warning.py", line 96, in run_test
    self.send_blocks_with_version(test_node, VB_THRESHOLD, nVersion)
  File "test/functional/p2p-versionbits-warning.py", line 58, in send_blocks_with_version
    peer.sync_with_ping()
  File "/c0ban/test/functional/test_framework/mininode.py", line 1623, in sync_with_ping
    wait_until(test_function, timeout=timeout, lock=mininode_lock)
  File "/c0ban/test/functional/test_framework/util.py", line 222, in wait_until
    assert_greater_than(timeout, time.time())
  File "/c0ban/test/functional/test_framework/util.py", line 42, in assert_greater_than
    raise AssertionError("%s <= %s" % (str(thing1), str(thing2)))
AssertionError: 1527844281.1169803 <= 1527844281.121348
2018-06-01 09:11:21.139000 TestFramework (INFO): Stopping nodes
2018-06-01 09:11:23.265000 TestFramework (WARNING): Not cleaning up dir /tmp/testg0dd3c9x
2018-06-01 09:11:23.266000 TestFramework (ERROR): Test failed. Test logging available at /tmp/testg0dd3c9x/test_framework.log

debug.log

2018-06-01 09:10:21.184354 Misbehaving: 127.0.0.1:33342 peer=0 (50 -> 100) BAN THRESHOLD EXCEEDED
2018-06-01 09:10:21.184380 ERROR: ProcessNewBlock: AcceptBlock FAILED
shohu commented 6 years ago

I changed to #35 source. I got success.

# test/functional/p2p-versionbits-warning.py
2018-06-05 07:08:57.106000 TestFramework (INFO): Initializing test directory /tmp/test9lf2d_lw
2018-06-05 07:08:57.370000 TestFramework.mininode (INFO): Connecting to Bitcoin Node: 127.0.0.1:13890
2018-06-05 07:09:03.583000 TestFramework (INFO): Stopping nodes
2018-06-05 07:09:05.720000 TestFramework (INFO): Cleaning up
2018-06-05 07:09:05.726000 TestFramework (INFO): Tests successful