Page MenuHomePhabricator

Drop JSONRPCRequest constructors
ClosedPublic

Authored by PiRK on Jun 2 2022, 16:13.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC5ae548070bd5: Drop JSONRPCRequest constructors
Summary

This just makes an additional simplification after D11552 replaced util::Ref with std::any.

Note that we sometimes wrap the context in a HTTPRPCRequestProcessorinstance, so some changes don't apply in bitcoind.cpp and init.cpp.

This is a backport of core#21574
Depends on D11552

Test Plan

ninja all check-all

Diff Detail

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

Event Timeline

PiRK requested review of this revision.Jun 2 2022, 16:13
PiRK planned changes to this revision.Jun 2 2022, 16:17

minor changes to be applied : revert a blank line accidentaly deleted

Tail of the build log:

[419/471] bitcoin: testing bip32_tests
[420/471] Running utility command for check-bitcoin-bip32_tests
[421/471] bitcoin: testing sync_tests
[422/471] Running utility command for check-bitcoin-sync_tests
[423/471] bitcoin: testing torcontrol_tests
[424/471] Running utility command for check-bitcoin-torcontrol_tests
[425/471] bitcoin: testing undo_tests
[426/471] Running utility command for check-bitcoin-undo_tests
[427/471] bitcoin: testing schnorr_tests
[428/471] Running utility command for check-bitcoin-schnorr_tests
[429/471] bitcoin: testing util_threadnames_tests
[430/471] Running utility command for check-bitcoin-util_threadnames_tests
[431/471] bitcoin: testing wallet_crypto_tests
[432/471] Running utility command for check-bitcoin-wallet_crypto_tests
[433/471] bitcoin: testing blockstatus_tests
[434/471] Running utility command for check-bitcoin-blockstatus_tests
[435/471] bitcoin: testing prevector_tests
[436/471] Running utility command for check-bitcoin-prevector_tests
[437/471] Running utility command for check-avalanche-processor_tests
[438/471] bitcoin: testing ismine_tests
[439/471] Running utility command for check-avalanche-voterecord_tests
[440/471] Running avalanche test suite
PASSED: avalanche test suite
[441/471] Running utility command for check-bitcoin-ismine_tests
[442/471] Running utility command for check-pow-aserti32d_tests
[443/471] Running pow test suite
PASSED: pow test suite
[444/471] bitcoin: testing cashaddr_tests
[445/471] Running utility command for check-bitcoin-cashaddr_tests
[446/471] bitcoin: testing monolith_opcodes_tests
[447/471] Running utility command for check-bitcoin-monolith_opcodes_tests
[448/471] secp256k1: testing secp256k1-tests
[449/471] Running secp256k1 test suite
PASSED: secp256k1 test suite
[450/471] bitcoin: testing util_tests
[451/471] Running utility command for check-bitcoin-util_tests
[452/471] bitcoin: testing versionbits_tests
[453/471] Running utility command for check-bitcoin-versionbits_tests
[454/471] bitcoin: testing txrequest_tests
[455/471] Running utility command for check-bitcoin-txrequest_tests
[456/471] Linking CXX executable src/qt/test/test_bitcoin-qt
[457/471] bitcoin: testing cuckoocache_tests
[458/471] Running utility command for check-bitcoin-cuckoocache_tests
[459/471] bitcoin: testing blockcheck_tests
[460/471] Running utility command for check-bitcoin-blockcheck_tests
[461/471] bitcoin-qt: testing test_bitcoin-qt
[462/471] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[463/471] bitcoin: testing crypto_tests
[464/471] Running utility command for check-bitcoin-crypto_tests
[465/471] bitcoin: testing coinselector_tests
[466/471] Running utility command for check-bitcoin-coinselector_tests
[467/471] bitcoin: testing checkqueue_tests
[468/471] Running utility command for check-bitcoin-checkqueue_tests
[469/471] bitcoin: testing coins_tests
[470/471] Running utility command for check-bitcoin-coins_tests
[471/471] Running bitcoin test suite
PASSED: bitcoin test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-debug failed with exit code 1

Tail of the build log:

[375/431] bitcoin: testing torcontrol_tests
[376/431] Running utility command for check-bitcoin-bip32_tests
[377/431] Running utility command for check-bitcoin-sync_tests
[378/431] Running utility command for check-bitcoin-torcontrol_tests
[379/431] bitcoin: testing txrequest_tests
[380/431] Running utility command for check-bitcoin-txrequest_tests
[381/431] bitcoin: testing settings_tests
[382/431] Running utility command for check-bitcoin-settings_tests
[383/431] bitcoin: testing timedata_tests
[384/431] Running utility command for check-bitcoin-timedata_tests
[385/431] bitcoin: testing txvalidationcache_tests
[386/431] Running utility command for check-bitcoin-txvalidationcache_tests
[387/431] bitcoin: testing serialize_tests
[388/431] Running utility command for check-bitcoin-serialize_tests
[389/431] bitcoin: testing undo_tests
[390/431] Running utility command for check-bitcoin-undo_tests
[391/431] bitcoin: testing util_threadnames_tests
[392/431] bitcoin: testing schnorr_tests
[393/431] Running utility command for check-bitcoin-util_threadnames_tests
[394/431] Running utility command for check-bitcoin-schnorr_tests
[395/431] bitcoin: testing blockcheck_tests
[396/431] bitcoin: testing cuckoocache_tests
[397/431] bitcoin: testing checkpoints_tests
[398/431] Running utility command for check-bitcoin-blockcheck_tests
[399/431] Running utility command for check-bitcoin-cuckoocache_tests
[400/431] Running utility command for check-bitcoin-checkpoints_tests
[401/431] bitcoin: testing script_tests
[402/431] bitcoin: testing radix_tests
[403/431] bitcoin: testing validationinterface_tests
[404/431] Running utility command for check-bitcoin-script_tests
[405/431] Running utility command for check-bitcoin-radix_tests
[406/431] bitcoin: testing checkqueue_tests
[407/431] Running utility command for check-bitcoin-validationinterface_tests
[408/431] Running utility command for check-bitcoin-checkqueue_tests
[409/431] bitcoin: testing script_standard_tests
[410/431] Running utility command for check-bitcoin-script_standard_tests
[411/431] bitcoin: testing cashaddr_tests
[412/431] Running utility command for check-bitcoin-cashaddr_tests
[413/431] bitcoin: testing getarg_tests
[414/431] Running utility command for check-bitcoin-getarg_tests
[415/431] bitcoin: testing util_tests
[416/431] Running utility command for check-bitcoin-util_tests
[417/431] bitcoin: testing validation_tests
[418/431] Running utility command for check-bitcoin-validation_tests
[419/431] bitcoin: testing crypto_tests
[420/431] Running utility command for check-bitcoin-crypto_tests
[421/431] bitcoin: testing skiplist_tests
[422/431] Running utility command for check-bitcoin-skiplist_tests
[423/431] bitcoin: testing validation_block_tests
[424/431] Running utility command for check-bitcoin-validation_block_tests
[425/431] bitcoin: testing intmath_tests
[426/431] Running utility command for check-bitcoin-intmath_tests
[427/431] bitcoin: testing transaction_tests
[428/431] Running utility command for check-bitcoin-transaction_tests
[429/431] bitcoin: testing coins_tests
[430/431] Running utility command for check-bitcoin-coins_tests
[431/431] Running bitcoin test suite
PASSED: bitcoin test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-without-wallet failed with exit code 1

Tail of the build log:

[754/807] Running utility command for check-bitcoin-upgrade-activated-compress_tests
[755/807] bitcoin: testing script_tests
[756/807] Running utility command for check-bitcoin-upgrade-activated-getarg_tests
[757/807] bitcoin: testing radix_tests
[758/807] Running utility command for check-bitcoin-script_tests
[759/807] Running utility command for check-bitcoin-radix_tests
[760/807] bitcoin: testing versionbits_tests
[761/807] bitcoin-upgrade-activated: testing activation_tests
[762/807] bitcoin-upgrade-activated: testing prevector_tests
[763/807] bitcoin-upgrade-activated: testing bswap_tests
[764/807] Running utility command for check-bitcoin-versionbits_tests
[765/807] Running utility command for check-bitcoin-upgrade-activated-activation_tests
[766/807] Running utility command for check-bitcoin-upgrade-activated-prevector_tests
[767/807] Running utility command for check-bitcoin-upgrade-activated-bswap_tests
[768/807] bitcoin-upgrade-activated: testing rpc_server_tests
[769/807] Running utility command for check-bitcoin-upgrade-activated-rpc_server_tests
[770/807] bitcoin: testing checkqueue_tests
[771/807] Running utility command for check-bitcoin-checkqueue_tests
[772/807] bitcoin: testing util_tests
[773/807] Running utility command for check-avalanche-proof_tests
[774/807] bitcoin: testing cashaddr_tests
[775/807] Running utility command for check-bitcoin-util_tests
[776/807] Running utility command for check-avalanche-processor_tests
[777/807] Running utility command for check-bitcoin-cashaddr_tests
[778/807] Running utility command for check-avalanche-peermanager_tests
[779/807] Running utility command for check-avalanche-voterecord_tests
[780/807] Running avalanche test suite
PASSED: avalanche test suite
[781/807] bitcoin: testing crypto_tests
[782/807] Running utility command for check-bitcoin-crypto_tests
[783/807] bitcoin-upgrade-activated: testing dbwrapper_tests
[784/807] Running utility command for check-bitcoin-upgrade-activated-dbwrapper_tests
[785/807] bitcoin: testing monolith_opcodes_tests
[786/807] Running utility command for check-bitcoin-monolith_opcodes_tests
[787/807] bitcoin-upgrade-activated: testing blockcheck_tests
[788/807] Running utility command for check-bitcoin-upgrade-activated-blockcheck_tests
[789/807] bitcoin-upgrade-activated: testing checkdatasig_tests
[790/807] Running utility command for check-bitcoin-upgrade-activated-checkdatasig_tests
[791/807] bitcoin-upgrade-activated: testing checkqueue_tests
[792/807] Running utility command for check-bitcoin-upgrade-activated-checkqueue_tests
[793/807] bitcoin-upgrade-activated: testing wallet_tests
[794/807] Running utility command for check-bitcoin-upgrade-activated-wallet_tests
[795/807] bitcoin-upgrade-activated: testing cuckoocache_tests
[796/807] Running utility command for check-bitcoin-upgrade-activated-cuckoocache_tests
[797/807] Linking CXX executable src/qt/test/test_bitcoin-qt
[798/807] bitcoin: testing coinselector_tests
[799/807] Running utility command for check-bitcoin-coinselector_tests
[800/807] bitcoin: testing coins_tests
[801/807] Running utility command for check-bitcoin-coins_tests
[802/807] Running bitcoin test suite
PASSED: bitcoin test suite
[803/807] bitcoin-qt: testing test_bitcoin-qt
[804/807] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[805/807] bitcoin-upgrade-activated: testing coins_tests
[806/807] Running utility command for check-bitcoin-upgrade-activated-coins_tests
[807/807] Running bitcoin-upgrade-activated test suite
PASSED: bitcoin-upgrade-activated test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-diff failed with exit code 1

@bot build-debug build-without-wallet

Tail of the build log:

[08:53:47]i:		 [Seeder_Test_Suite] parse_name_tests.parse_name_label_tests
[08:53:47]i:		 [Seeder_Test_Suite] parse_name_tests.parse_name_qname_length_tests
[08:53:47]i:		 [Seeder_Test_Suite] write_name_tests.write_name_simple_tests
[08:53:47]i:		 [Seeder_Test_Suite] write_name_tests.write_name_label_tests
[08:53:47]i:		 [Seeder_Test_Suite] write_name_tests.write_name_qname_length_tests
[08:54:05]W:			 [Creating archive artifacts.tar.gz] Error while creating archive 'artifacts.tar.gz': java.io.IOException: Error while closing archive 'artifacts.tar.gz' with 147 entries: /home/teamcity/buildAgent/work/jailed-build/results/artifacts/functional/test_runner_₿₵_  _20220603_085241/cache/core (Permission denied)
[08:54:05]E:	 [Step 1/1] Failed to publish artifacts: jetbrains.buildServer.agent.ArtifactPreprocessingFailedException: Error while creating archive 'artifacts.tar.gz': java.io.IOException: Error while closing archive 'artifacts.tar.gz' with 147 entries: /home/teamcity/buildAgent/work/jailed-build/results/artifacts/functional/test_runner_₿₵_  _20220603_085241/cache/core (Permission denied)
[08:54:06]E:	 [Step 1/1] Failed to publish artifacts: jetbrains.buildServer.agent.ArtifactPreprocessingFailedException: Error while creating archive 'artifacts.tar.gz': java.io.IOException: Error while closing archive 'artifacts.tar.gz' with 147 entries: /home/teamcity/buildAgent/work/jailed-build/results/artifacts/functional/test_runner_₿₵_  _20220603_085241/cache/core (Permission denied)
[08:53:47]i:	 [Step 1/1] ##teamcity[publishArtifacts '+:results/artifacts=>artifacts.tar.gz']
[08:54:06]E:	 [Step 1/1] Build build-without-wallet failed with exit code 1
[08:54:05]i:	 [Step 1/1] ##teamcity[buildProblem timestamp='2022-06-03T08:53:56.216' description='Build build-without-wallet failed with exit code 1']
[08:54:05] :	 [Step 1/1] [406/431] Running utility command for check-bitcoin-crypto_tests
[08:54:05] :	 [Step 1/1] [407/431] bitcoin: testing checkpoints_tests
[08:54:05] :	 [Step 1/1] [408/431] Running utility command for check-bitcoin-script_tests
[08:54:05] :	 [Step 1/1] [409/431] Running utility command for check-bitcoin-schnorr_tests
[08:54:05] :	 [Step 1/1] [410/431] Running utility command for check-bitcoin-checkpoints_tests
[08:54:05] :	 [Step 1/1] [411/431] bitcoin: testing validationinterface_tests
[08:54:05] :	 [Step 1/1] [412/431] Running utility command for check-bitcoin-validationinterface_tests
[08:54:05] :	 [Step 1/1] [413/431] bitcoin: testing cashaddr_tests
[08:54:05] :	 [Step 1/1] [414/431] bitcoin: testing script_standard_tests
[08:54:05] :	 [Step 1/1] [415/431] bitcoin: testing getarg_tests
[08:54:05] :	 [Step 1/1] [416/431] Running utility command for check-bitcoin-cashaddr_tests
[08:54:05] :	 [Step 1/1] [417/431] Running utility command for check-bitcoin-script_standard_tests
[08:54:05] :	 [Step 1/1] [418/431] Running utility command for check-bitcoin-getarg_tests
[08:54:05] :	 [Step 1/1] [419/431] bitcoin: testing checkqueue_tests
[08:54:05] :	 [Step 1/1] [420/431] Running utility command for check-bitcoin-checkqueue_tests
[08:54:05] :	 [Step 1/1] [421/431] bitcoin: testing util_tests
[08:54:05] :	 [Step 1/1] [422/431] Running utility command for check-bitcoin-util_tests
[08:54:05] :	 [Step 1/1] [423/431] bitcoin: testing validation_tests
[08:54:05] :	 [Step 1/1] [424/431] bitcoin: testing validation_block_tests
[08:54:05] :	 [Step 1/1] [425/431] Running utility command for check-bitcoin-validation_tests
[08:54:05] :	 [Step 1/1] [426/431] Running utility command for check-bitcoin-validation_block_tests
[08:54:05] :	 [Step 1/1] [427/431] bitcoin: testing transaction_tests
[08:54:05] :	 [Step 1/1] [428/431] Running utility command for check-bitcoin-transaction_tests
[08:54:05] :	 [Step 1/1] [429/431] bitcoin: testing coins_tests
[08:54:05] :	 [Step 1/1] [430/431] Running utility command for check-bitcoin-coins_tests
[08:54:05] :	 [Step 1/1] [431/431] Running bitcoin test suite
[08:54:05] :	 [Step 1/1] PASSED: bitcoin test suite
[08:54:05] :	 [Step 1/1] ninja: build stopped: cannot make progress due to previous errors.
[08:54:05] :	 [Step 1/1] Build build-without-wallet failed with exit code 1
[08:54:13]W:	 [Step 1/1] Process exited with code 1
[08:54:13]E:	 [Step 1/1] Process exited with code 1 (Step: Command Line)
[08:54:13] :	 [Step 1/1] Waiting for 1 service processes to complete
[08:54:13] :	 [Step 1/1] Ant JUnit report watcher
[08:54:13] :		 [Ant JUnit report watcher] 4 reports found for paths:
[08:54:13] :		 [Ant JUnit report watcher] /home/teamcity/buildAgent/work/jailed-build/results/artifacts/junit/*.xml
[08:54:13] :		 [Ant JUnit report watcher] Successfully parsed
[08:54:13] :			 [Successfully parsed] 4 reports
[08:54:13]E:	 [Step 1/1] Step Command Line failed
[08:54:14]E: Ant JUnit report watcher
[08:54:14]E:	 [Ant JUnit report watcher] No reports found for paths:
[08:54:14]E:	 [Ant JUnit report watcher] +:results/test_bitcoin.xml
[08:54:14]E:	 [Ant JUnit report watcher] +:results/**/junit_results*.xml
[08:54:14] : Publishing internal artifacts (2s)
[08:54:16] :	 [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[08:54:16] :	 [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[08:54:14]W: Publishing artifacts (2s)
[08:54:14] :	 [Publishing artifacts] Collecting files to publish: [+:results/**/junit_results*.xml]
[08:54:14]W:	 [Publishing artifacts] Artifacts path 'results/**/junit_results*.xml' not found
[08:54:16] : Build finished

Tail of the build log:

[418/471] Running utility command for check-bitcoin-transaction_tests
[419/471] Running utility command for check-bitcoin-sighashtype_tests
[420/471] bitcoin: testing bip32_tests
[421/471] Running utility command for check-bitcoin-bip32_tests
[422/471] bitcoin: testing txvalidationcache_tests
[423/471] bitcoin: testing sync_tests
[424/471] Running utility command for check-bitcoin-txvalidationcache_tests
[425/471] Running utility command for check-bitcoin-sync_tests
[426/471] bitcoin: testing schnorr_tests
[427/471] bitcoin: testing torcontrol_tests
[428/471] bitcoin: testing undo_tests
[429/471] bitcoin: testing wallet_crypto_tests
[430/471] bitcoin: testing util_threadnames_tests
[431/471] Running utility command for check-bitcoin-undo_tests
[432/471] Running utility command for check-bitcoin-schnorr_tests
[433/471] bitcoin: testing prevector_tests
[434/471] Running utility command for check-bitcoin-torcontrol_tests
[435/471] Running utility command for check-bitcoin-wallet_crypto_tests
[436/471] Running utility command for check-bitcoin-util_threadnames_tests
[437/471] Running utility command for check-bitcoin-prevector_tests
[438/471] bitcoin: testing blockstatus_tests
[439/471] Running utility command for check-bitcoin-blockstatus_tests
[440/471] bitcoin: testing ismine_tests
[441/471] Running utility command for check-avalanche-processor_tests
[442/471] Running utility command for check-bitcoin-ismine_tests
[443/471] Running utility command for check-avalanche-voterecord_tests
[444/471] bitcoin: testing cashaddr_tests
[445/471] Running avalanche test suite
PASSED: avalanche test suite
[446/471] Running utility command for check-bitcoin-cashaddr_tests
[447/471] bitcoin: testing txrequest_tests
[448/471] bitcoin: testing monolith_opcodes_tests
[449/471] Running utility command for check-bitcoin-monolith_opcodes_tests
[450/471] Running utility command for check-bitcoin-txrequest_tests
[451/471] bitcoin: testing util_tests
[452/471] Running utility command for check-bitcoin-util_tests
[453/471] bitcoin-qt: testing test_bitcoin-qt
[454/471] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[455/471] bitcoin: testing cuckoocache_tests
[456/471] bitcoin: testing versionbits_tests
[457/471] Running utility command for check-bitcoin-cuckoocache_tests
[458/471] Running utility command for check-bitcoin-versionbits_tests
[459/471] bitcoin: testing blockcheck_tests
[460/471] Running utility command for check-bitcoin-blockcheck_tests
[461/471] bitcoin: testing crypto_tests
[462/471] Running utility command for check-bitcoin-crypto_tests
[463/471] secp256k1: testing secp256k1-tests
[464/471] Running secp256k1 test suite
PASSED: secp256k1 test suite
[465/471] bitcoin: testing coinselector_tests
[466/471] Running utility command for check-bitcoin-coinselector_tests
[467/471] bitcoin: testing checkqueue_tests
[468/471] Running utility command for check-bitcoin-checkqueue_tests
[469/471] bitcoin: testing coins_tests
[470/471] Running utility command for check-bitcoin-coins_tests
[471/471] Running bitcoin test suite
PASSED: bitcoin test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-debug failed with exit code 1

the fix seems to be to pass a std::any ref as context to the HTTPRPCRequestProcessor instead of passing directly a pointer to the NodeContext. But I'm not sure why the first solution doesn't work.

Let's see if all the CI tests pass.

PiRK retitled this revision from Drop JSONRPCRequest constructors after #21366 to Drop JSONRPCRequest constructors.Jun 3 2022, 10:00
This revision is now accepted and ready to land.Jun 4 2022, 01:22
This revision was automatically updated to reflect the committed changes.