Simpler code, fewer allocations. No change of behavior. The code has good test coverage in interface_bitcoin_cli.py.
This is a backport of core#19453
Differential D9988
cli: reduce DefaultRequestHandler memory allocations PiRK on Aug 31 2021, 07:45. Authored by Tags None Subscribers None
Details
This is a backport of core#19453 ninja all check-all
Diff Detail
Event TimelineComment Actions Build Bitcoin ABC Diffs / Diff Testing (build-clang-tidy) failed.
Tail of the build log: [386/445] Running utility command for check-bitcoin-key_tests [387/445] bitcoin: testing radix_tests [388/445] Running utility command for check-bitcoin-blockfilter_index_tests [389/445] bitcoin: testing scheduler_tests [390/445] Running utility command for check-bitcoin-finalization_tests [391/445] bitcoin: testing merkleblock_tests [392/445] bitcoin: testing bip32_tests [393/445] Running utility command for check-bitcoin-addrman_tests [394/445] Running utility command for check-bitcoin-config_tests [395/445] bitcoin: testing schnorr_tests [396/445] bitcoin: testing sync_tests [397/445] Running utility command for check-bitcoin-blockindex_tests [398/445] bitcoin: testing crypto_tests [399/445] bitcoin: testing torcontrol_tests [400/445] Running utility command for check-bitcoin-fs_tests [401/445] Running utility command for check-bitcoin-merkleblock_tests [402/445] bitcoin: testing settings_tests [403/445] Running utility command for check-bitcoin-schnorr_tests [404/445] bitcoin: testing script_tests [405/445] bitcoin: testing serialize_tests [406/445] Running utility command for check-bitcoin-torcontrol_tests [407/445] bitcoin: testing streams_tests [408/445] Running utility command for check-bitcoin-sync_tests [409/445] bitcoin: testing timedata_tests [410/445] Running utility command for check-bitcoin-scheduler_tests [411/445] bitcoin: testing validation_flush_tests [412/445] Running utility command for check-bitcoin-script_tests [413/445] bitcoin: testing compilerbug_tests [414/445] Running utility command for check-bitcoin-crypto_tests [415/445] bitcoin: testing checkpoints_tests [416/445] Running utility command for check-bitcoin-validation_chainstate_tests [417/445] bitcoin: testing coins_tests [418/445] bitcoin: testing util_tests [419/445] Running utility command for check-bitcoin-streams_tests [420/445] bitcoin: testing validationinterface_tests [421/445] Running utility command for check-bitcoin-settings_tests [422/445] bitcoin: testing script_standard_tests [423/445] Running utility command for check-bitcoin-blockcheck_tests [424/445] Running utility command for check-bitcoin-checkpoints_tests [425/445] bitcoin: testing blockstatus_tests [426/445] bitcoin: testing versionbits_tests [427/445] Running utility command for check-bitcoin-script_standard_tests [428/445] bitcoin: testing monolith_opcodes_tests [429/445] Running utility command for check-bitcoin-serialize_tests [430/445] bitcoin: testing cashaddr_tests [431/445] Running utility command for check-bitcoin-timedata_tests [432/445] Running utility command for check-bitcoin-util_tests [433/445] Running utility command for check-bitcoin-cashaddr_tests [434/445] Running utility command for check-bitcoin-validation_flush_tests [435/445] Running utility command for check-bitcoin-validationinterface_tests [436/445] Running utility command for check-bitcoin-radix_tests [437/445] Running utility command for check-bitcoin-coins_tests [438/445] Running utility command for check-bitcoin-blockstatus_tests [439/445] Running utility command for check-bitcoin-bswap_tests [440/445] Running utility command for check-bitcoin-bip32_tests [441/445] Running utility command for check-bitcoin-monolith_opcodes_tests [442/445] Running utility command for check-bitcoin-versionbits_tests [443/445] Running utility command for check-bitcoin-compilerbug_tests ninja: build stopped: cannot make progress due to previous errors. Build build-clang-tidy failed with exit code 1 Comment Actions Build Bitcoin ABC Diffs / Diff Testing (build-diff) failed.
Tail of the build log: [0m[0;32mrpc_psbt.py | ✓ Passed | 17 s [0m[0;32mrpc_rawtransaction.py | ✓ Passed | 13 s [0m[0;32mrpc_scantxoutset.py | ✓ Passed | 3 s [0m[0;32mrpc_setban.py | ✓ Passed | 2 s [0m[0;32mrpc_signmessage.py | ✓ Passed | 1 s [0m[0;32mrpc_signrawtransaction.py | ✓ Passed | 1 s [0m[0;32mrpc_txoutproof.py | ✓ Passed | 2 s [0m[0;32mrpc_uptime.py | ✓ Passed | 1 s [0m[0;32mrpc_users.py | ✓ Passed | 5 s [0m[0;32mrpc_whitelist.py | ✓ Passed | 1 s [0m[0;32mtool_wallet.py | ✓ Passed | 4 s [0m[0;32mwallet_abandonconflict.py | ✓ Passed | 11 s [0m[0;32mwallet_address_types.py | ✓ Passed | 14 s [0m[0;32mwallet_avoidreuse.py | ✓ Passed | 4 s [0m[0;32mwallet_backup.py | ✓ Passed | 21 s [0m[0;32mwallet_balance.py | ✓ Passed | 14 s [0m[0;32mwallet_basic.py | ✓ Passed | 27 s [0m[0;32mwallet_coinbase_category.py | ✓ Passed | 1 s [0m[0;32mwallet_create_tx.py | ✓ Passed | 5 s [0m[0;32mwallet_createwallet.py | ✓ Passed | 2 s [0m[0;32mwallet_createwallet.py --usecli | ✓ Passed | 3 s [0m[0;32mwallet_descriptor.py | ✓ Passed | 6 s [0m[0;32mwallet_disable.py | ✓ Passed | 1 s [0m[0;32mwallet_dump.py | ✓ Passed | 4 s [0m[0;32mwallet_encryption.py | ✓ Passed | 5 s [0m[0;32mwallet_groups.py | ✓ Passed | 21 s [0m[0;32mwallet_hd.py | ✓ Passed | 6 s [0m[0;32mwallet_import_rescan.py | ✓ Passed | 5 s [0m[0;32mwallet_import_with_label.py | ✓ Passed | 1 s [0m[0;32mwallet_importdescriptors.py | ✓ Passed | 4 s [0m[0;32mwallet_importmulti.py | ✓ Passed | 3 s [0m[0;32mwallet_importprunedfunds.py | ✓ Passed | 2 s [0m[0;32mwallet_keypool.py | ✓ Passed | 3 s [0m[0;32mwallet_keypool_topup.py | ✓ Passed | 2 s [0m[0;32mwallet_labels.py | ✓ Passed | 1 s [0m[0;32mwallet_listreceivedby.py | ✓ Passed | 25 s [0m[0;32mwallet_listsinceblock.py | ✓ Passed | 4 s [0m[0;32mwallet_listtransactions.py | ✓ Passed | 6 s [0m[0;32mwallet_multiwallet.py | ✓ Passed | 39 s [0m[0;32mwallet_multiwallet.py --usecli | ✓ Passed | 14 s [0m[0;32mwallet_reorgsrestore.py | ✓ Passed | 3 s [0m[0;32mwallet_resendwallettransactions.py | ✓ Passed | 7 s [0m[0;32mwallet_txn_clone.py | ✓ Passed | 1 s [0m[0;32mwallet_txn_clone.py --mineblock | ✓ Passed | 3 s [0m[0;32mwallet_txn_doublespend.py | ✓ Passed | 1 s [0m[0;32mwallet_txn_doublespend.py --mineblock | ✓ Passed | 3 s [0m[0;32mwallet_watchonly.py | ✓ Passed | 1 s [0m[0;32mwallet_watchonly.py --usecli | ✓ Passed | 1 s [0m[0;32mwallet_zapwallettxes.py | ✓ Passed | 3 s [0m[1m ALL | ✓ Passed | 937 s (accumulated) [0mRuntime: 188 s ---------------------------------------------------------------------- Ran 5 tests in 0.001s OK ninja: build stopped: cannot make progress due to previous errors. Build build-diff failed with exit code 1 |