MR !1128 introduced this code but on second reading I realized the double-copy from this MR can be remove by using `try_emplace` and also by actually giving the `TxInfo` type a real constructor. This commit is just a minor code quality commit to reduce the creation of a temporary. In most cases the optimizer will elide this temporary anyway, but for debug builds it may not, and also it's of higher code quality to just avoid creating it.
Details
Details
- Reviewers
PiRK - Group Reviewers
Restricted Project - Commits
- rABCa632bcc850b4: Avoid double copy when emplacing into DisconnectedBlockTransactons::txInfo
ninja all check-all
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- MR1191
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 22104 Build 43843: Build Diff build-debug · lint-circular-dependencies · build-without-wallet · build-diff · build-clang · build-clang-tidy Build 43842: arc lint + arc unit
Event Timeline
Comment Actions
Build Bitcoin ABC Diffs / Diff Testing (build-diff) failed.
Failed tests logs:
====== Bitcoin ABC functional tests with the next upgrade activated: rpc_deprecated.py ====== ------- Stdout: ------- 2023-02-27T15:17:46.030000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_ _20230227_151555/rpc_deprecated_28 2023-02-27T15:17:46.495000Z TestFramework (INFO): Check isfinaltransaction returns false when looking for unknown transactions 2023-02-27T15:17:46.499000Z TestFramework (INFO): Check isfinalblock and isfinaltransaction returns false when the quorum is not established 2023-02-27T15:17:51.376000Z TestFramework (INFO): Check the getblocktemplate output with and without -deprecatedrpc=getblocktemplate_sigops 2023-02-27T15:17:56.864000Z TestFramework (INFO): Check the getblockchaininfo output with and without -deprecatedrpc=softforks 2023-02-27T15:17:56.893000Z TestFramework (ERROR): Assertion failed Traceback (most recent call last): File "/work/test/functional/test_framework/test_framework.py", line 136, in main self.run_test() File "/work/test/functional/rpc_deprecated.py", line 151, in run_test assert 'ancestorcount' in utxo AssertionError 2023-02-27T15:17:56.943000Z TestFramework (INFO): Stopping nodes 2023-02-27T15:17:57.045000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_ _20230227_151555/rpc_deprecated_28 2023-02-27T15:17:57.045000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_ _20230227_151555/rpc_deprecated_28/test_framework.log 2023-02-27T15:17:57.045000Z TestFramework (ERROR): 2023-02-27T15:17:57.045000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_ _20230227_151555/rpc_deprecated_28' to consolidate all logs 2023-02-27T15:17:57.045000Z TestFramework (ERROR): 2023-02-27T15:17:57.045000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log. 2023-02-27T15:17:57.045000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues 2023-02-27T15:17:57.045000Z TestFramework (ERROR):
Each failure log is accessible here:
Bitcoin ABC functional tests with the next upgrade activated: rpc_deprecated.py