Page MenuHomePhabricator

Return the blockhash of the tx mining block in gettransactionstatus
ClosedPublic

Authored by Fabien on Aug 16 2024, 09:47.

Details

Summary

This is only available if the transaction indexer is enabled.

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

Diff Detail

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

Event Timeline

Fabien requested review of this revision.Aug 16 2024, 09:47
This revision is now accepted and ready to land.Aug 16 2024, 10:11

Failed tests logs:

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

------- Stdout: -------
2024-08-16T10:31:31.941000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-debug/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20240816_102319/rpc_gettransactionstatus_281
2024-08-16T10:31:32.717000Z TestFramework (INFO): Tx doesn't exist in any memory pool
2024-08-16T10:31:32.717000Z TestFramework (INFO): Tx is in the memory pool
2024-08-16T10:31:32.770000Z TestFramework (INFO): Tx is in the conflicting pool
2024-08-16T10:31:32.824000Z TestFramework (INFO): Tx is in the orphan pool
2024-08-16T10:31:32.880000Z TestFramework (INFO): Tx is in a block
2024-08-16T10:31:32.929000Z TestFramework (INFO): mined_in_block is not present if txindex is not enabled
2024-08-16T10:31:32.934000Z TestFramework (INFO): Check the mined_in_block field when the txindex is enabled
2024-08-16T10:31:33.543000Z TestFramework (ERROR): JSONRPC error
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 147, in main
    self._run_test_internal()
  File "/work/test/functional/test_framework/test_framework.py", line 137, in _run_test_internal
    self.run_test()
  File "/work/test/functional/rpc_gettransactionstatus.py", line 80, in run_test
    node.gettransactionstatus(mempool_tx["txid"])["mined_in_block"], tip
  File "/work/test/functional/test_framework/coverage.py", line 46, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/work/test/functional/test_framework/authproxy.py", line 180, in __call__
    raise JSONRPCException(response["error"], status)
test_framework.authproxy.JSONRPCException: Blockchain transactions are still in the process of being indexed (-1)
2024-08-16T10:31:33.594000Z TestFramework (INFO): Stopping nodes
2024-08-16T10:31:33.697000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-debug/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20240816_102319/rpc_gettransactionstatus_281
2024-08-16T10:31:33.697000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-debug/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20240816_102319/rpc_gettransactionstatus_281/test_framework.log
2024-08-16T10:31:33.697000Z TestFramework (ERROR): 
2024-08-16T10:31:33.697000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-debug/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20240816_102319/rpc_gettransactionstatus_281' to consolidate all logs
2024-08-16T10:31:33.697000Z TestFramework (ERROR): 
2024-08-16T10:31:33.698000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2024-08-16T10:31:33.698000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2024-08-16T10:31:33.698000Z TestFramework (ERROR):

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

Make sure the index has synced in test