Page MenuHomePhabricator

test: Add p2p test for forcerelay permission
ClosedPublic

Authored by PiRK on Aug 23 2021, 15:41.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABC0e28cc9f14f1: test: Add p2p test for forcerelay permission
Summary

This is a backport of core#17984

Backport note:

  • Most of the PR is not relevant for us (segwit stuff or codestyle), so this includes only the commit that adds a useful new test for forcerelay permission.
  • The code to build the transaction is different because Core uses some kind of dark magic to make a transaction that does not require a signature. I used a normal address and signed it, instead.
Test Plan

ninja check-functional

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Aug 23 2021, 15:41

Failed tests logs:

====== Bitcoin ABC functional tests: p2p_permissions.py ======

------- Stdout: -------
2021-08-23T15:44:07.621000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20210823_154311/p2p_permissions_45
2021-08-23T15:44:09.710000Z TestFramework (ERROR): JSONRPC error
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 127, in main
    self.run_test()
  File "/work/test/functional/p2p_permissions.py", line 32, in run_test
    self.check_tx_relay()
  File "/work/test/functional/p2p_permissions.py", line 149, in check_tx_relay
    self.nodes[0].signrawtransactionwithwallet(raw_tx)['hex'])
  File "/work/test/functional/test_framework/coverage.py", line 48, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/work/test/functional/test_framework/authproxy.py", line 159, in __call__
    raise JSONRPCException(response['error'], status)
test_framework.authproxy.JSONRPCException: Method not found (-32601)
2021-08-23T15:44:09.764000Z TestFramework (INFO): Stopping nodes
2021-08-23T15:44:09.970000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20210823_154311/p2p_permissions_45
2021-08-23T15:44:09.970000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20210823_154311/p2p_permissions_45/test_framework.log
2021-08-23T15:44:09.971000Z TestFramework (ERROR): 
2021-08-23T15:44:09.971000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20210823_154311/p2p_permissions_45' to consolidate all logs
2021-08-23T15:44:09.971000Z TestFramework (ERROR): 
2021-08-23T15:44:09.971000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2021-08-23T15:44:09.971000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2021-08-23T15:44:09.971000Z TestFramework (ERROR):

Each failure log is accessible here:
Bitcoin ABC functional tests: p2p_permissions.py

majcosta requested changes to this revision.Aug 23 2021, 21:10
majcosta added a subscriber: majcosta.

tests failing, back on your court

This revision now requires changes to proceed.Aug 23 2021, 21:10
PiRK planned changes to this revision.Aug 24 2021, 05:34

make the transaction not depend on the wallet, to pass the tests when the wallet is not compiled

This revision is now accepted and ready to land.Aug 24 2021, 15:34