Page MenuHomePhabricator

Add a test-only createwallettransaction RPC
ClosedPublic

Authored by Fabien on May 24 2023, 16:01.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABCf7a214f7fdeb: Add a test-only createwallettransaction RPC
Summary

This makes it possible to create a wallet transaction without broadcasting it. Thi swill be usefule for testing after we remive the pre-wellington chained tx-limit as it becomes impossible to generate a wallet that is rejected by the mempool anymore.

Because the tx is now valid upon reorg, the test has to be changed a bit.

Test Plan
./test/functional/test_runner.py wallet_balance.py

Diff Detail

Event Timeline

Fabien requested review of this revision.May 24 2023, 16:01

Failed tests logs:

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

------- Stdout: -------
2023-05-24T16:12:27.376000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20230524_160605/rpc_help_214
2023-05-24T16:12:27.977000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 142, in main
    self.run_test()
  File "/work/test/functional/rpc_help.py", line 51, in run_test
    self.test_client_conversion_table()
  File "/work/test/functional/rpc_help.py", line 74, in test_client_conversion_table
    raise AssertionError(
AssertionError: RPC client conversion table (/work/src/rpc/client.cpp) and RPC server named arguments mismatch!
{('createwallettransaction', 1, 'amount')}
2023-05-24T16:12:28.028000Z TestFramework (INFO): Stopping nodes
2023-05-24T16:12:28.129000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20230524_160605/rpc_help_214
2023-05-24T16:12:28.129000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20230524_160605/rpc_help_214/test_framework.log
2023-05-24T16:12:28.129000Z TestFramework (ERROR): 
2023-05-24T16:12:28.130000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20230524_160605/rpc_help_214' to consolidate all logs
2023-05-24T16:12:28.130000Z TestFramework (ERROR): 
2023-05-24T16:12:28.130000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2023-05-24T16:12:28.130000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2023-05-24T16:12:28.130000Z TestFramework (ERROR):

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

Failed tests logs:

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

------- Stdout: -------
2023-05-24T16:16:59.551000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20230524_161256/rpc_help_214
2023-05-24T16:16:59.866000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 142, in main
    self.run_test()
  File "/work/test/functional/rpc_help.py", line 51, in run_test
    self.test_client_conversion_table()
  File "/work/test/functional/rpc_help.py", line 74, in test_client_conversion_table
    raise AssertionError(
AssertionError: RPC client conversion table (/work/src/rpc/client.cpp) and RPC server named arguments mismatch!
{('createwallettransaction', 1, 'amount')}
2023-05-24T16:16:59.917000Z TestFramework (INFO): Stopping nodes
2023-05-24T16:17:00.018000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20230524_161256/rpc_help_214
2023-05-24T16:17:00.019000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20230524_161256/rpc_help_214/test_framework.log
2023-05-24T16:17:00.019000Z TestFramework (ERROR): 
2023-05-24T16:17:00.019000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20230524_161256/rpc_help_214' to consolidate all logs
2023-05-24T16:17:00.019000Z TestFramework (ERROR): 
2023-05-24T16:17:00.019000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2023-05-24T16:17:00.019000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2023-05-24T16:17:00.019000Z TestFramework (ERROR):
====== Bitcoin ABC functional tests with the next upgrade activated: rpc_help.py ======

------- Stdout: -------
2023-05-24T16:20:58.817000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20230524_161703/rpc_help_214
2023-05-24T16:20:59.130000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 142, in main
    self.run_test()
  File "/work/test/functional/rpc_help.py", line 51, in run_test
    self.test_client_conversion_table()
  File "/work/test/functional/rpc_help.py", line 74, in test_client_conversion_table
    raise AssertionError(
AssertionError: RPC client conversion table (/work/src/rpc/client.cpp) and RPC server named arguments mismatch!
{('createwallettransaction', 1, 'amount')}
2023-05-24T16:20:59.181000Z TestFramework (INFO): Stopping nodes
2023-05-24T16:20:59.282000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20230524_161703/rpc_help_214
2023-05-24T16:20:59.282000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20230524_161703/rpc_help_214/test_framework.log
2023-05-24T16:20:59.282000Z TestFramework (ERROR): 
2023-05-24T16:20:59.282000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20230524_161703/rpc_help_214' to consolidate all logs
2023-05-24T16:20:59.282000Z TestFramework (ERROR): 
2023-05-24T16:20:59.282000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2023-05-24T16:20:59.282000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2023-05-24T16:20:59.282000Z TestFramework (ERROR):

Each failure log is accessible here:
Bitcoin ABC functional tests: rpc_help.py
Bitcoin ABC functional tests with the next upgrade activated: rpc_help.py

Fix RPC argument conversion

PiRK added a subscriber: PiRK.
PiRK added inline comments.
src/wallet/wallet.h
672 ↗(On Diff #40409)

nit: I don't think eventually is the correct word here. I would use maybe or possibly
https://anglais-pratique.fr/index.php/rubriques/faux-amis/69-eventuellement-eventually

This revision is now accepted and ready to land.May 25 2023, 09:54
This revision was automatically updated to reflect the committed changes.