shohu / c0ban

c0ban source tree
MIT License
0 stars 0 forks source link

Pass signlogic for maxuploadtarget.py #63

Closed shohu closed 6 years ago

shohu commented 6 years ago
# test/functional/maxuploadtarget.py
2018-07-11 06:08:17.127000 TestFramework (INFO): Initializing test directory /tmp/test5vt1oeae
2018-07-11 06:08:17.532000 TestFramework.mininode (INFO): Connecting to Bitcoin Node: 127.0.0.1:13211
2018-07-11 06:08:17.532000 TestFramework.mininode (INFO): Connecting to Bitcoin Node: 127.0.0.1:13211
2018-07-11 06:08:17.533000 TestFramework.mininode (INFO): Connecting to Bitcoin Node: 127.0.0.1:13211
2018-07-11 06:08:17.621000 TestFramework (ERROR): JSONRPC error
Traceback (most recent call last):
  File "/c0ban/test/functional/test_framework/test_framework.py", line 120, in main
    self.run_test()
  File "test/functional/maxuploadtarget.py", line 69, in run_test
    mine_large_block(self.nodes[0], self.utxo_cache)
  File "/c0ban/test/functional/test_framework/util.py", line 568, in mine_large_block
    create_lots_of_big_transactions(node, txouts, utxos, num, fee=fee)
  File "/c0ban/test/functional/test_framework/util.py", line 553, in create_lots_of_big_transactions
    signresult = node.signrawtransaction(newtx, None, None, "NONE")
  File "/c0ban/test/functional/test_framework/coverage.py", line 46, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/c0ban/test/functional/test_framework/authproxy.py", line 154, in __call__
    raise JSONRPCException(response['error'])
test_framework.authproxy.JSONRPCException: Signature must use SIGHASH_FORKID (-8)
2018-07-11 06:08:17.638000 TestFramework (INFO): Stopping nodes
2018-07-11 06:08:19.758000 TestFramework (WARNING): Not cleaning up dir /tmp/test5vt1oeae
2018-07-11 06:08:19.759000 TestFramework (ERROR): Test failed. Test logging available at /tmp/test5vt1oeae/test_framework.log
shohu commented 6 years ago

I passed this test by https://github.com/shohu/c0ban/commit/95f42812d6b56f4aa37daad5fee8fc1e3eaf98bd 👍

# test/functional/maxuploadtarget.py
2018-07-12 04:36:06.944000 TestFramework (INFO): Initializing test directory /tmp/test3olvhrrc
2018-07-12 04:36:07.340000 TestFramework.mininode (INFO): Connecting to Bitcoin Node: 127.0.0.1:12997
2018-07-12 04:36:07.340000 TestFramework.mininode (INFO): Connecting to Bitcoin Node: 127.0.0.1:12997
2018-07-12 04:36:07.341000 TestFramework.mininode (INFO): Connecting to Bitcoin Node: 127.0.0.1:12997
2018-07-12 04:38:42.482000 TestFramework (INFO): Peer 0 disconnected after downloading old block too many times

2018-07-12 04:40:27.304000 TestFramework (INFO): Peer 1 able to repeatedly download new block
2018-07-12 04:40:27.462000 TestFramework (INFO): Peer 1 disconnected after trying to download old block
2018-07-12 04:40:27.462000 TestFramework (INFO): Advancing system time on node to clear counters...
2018-07-12 04:40:27.726000 TestFramework (INFO): Peer 2 able to download old block
2018-07-12 04:40:27.726000 TestFramework (INFO): Restarting nodes with -whitelist=127.0.0.1
2018-07-12 04:40:30.120000 TestFramework.mininode (INFO): Connecting to Bitcoin Node: 127.0.0.1:12997
2018-07-12 04:40:33.025000 TestFramework (INFO): Peer still connected after trying to download old block (whitelisted)
2018-07-12 04:40:33.025000 TestFramework (INFO): Stopping nodes
2018-07-12 04:40:35.147000 TestFramework (INFO): Cleaning up
2018-07-12 04:40:35.151000 TestFramework (INFO): Tests successful