Page MenuHomePhabricator

wallet: Replace CDataStream& with CDataStream&& where appropriate
ClosedPublic

Authored by PiRK on Aug 30 2021, 15:05.

Details

Summary

The keys and values are only to be used once because their memory is set
to zero. Make that explicit by moving the bytes into the lower level
methods.

This is a backport of core#19320 [2/2]
https://github.com/bitcoin/bitcoin/pull/19320/commits/fa8a341b88cabfd7f8d702db7cb9972b0804bf2a

Depends on D9982

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.Aug 30 2021, 15:05
This revision is now accepted and ready to land.Aug 30 2021, 17:31

Tail of the build log:

[387/445] Running utility command for check-bitcoin-txvalidationcache_tests
[388/445] bitcoin: testing crypto_tests
[389/445] Running utility command for check-bitcoin-wallet_crypto_tests
[390/445] bitcoin: testing merkleblock_tests
[391/445] bitcoin: testing schnorr_tests
[392/445] Running utility command for check-bitcoin-blockfilter_tests
[393/445] bitcoin: testing bip32_tests
[394/445] Running utility command for check-bitcoin-validation_chainstate_tests
[395/445] Running utility command for check-bitcoin-radix_tests
[396/445] bitcoin: testing coins_tests
[397/445] bitcoin: testing sync_tests
[398/445] bitcoin: testing script_tests
[399/445] Running utility command for check-bitcoin-merkleblock_tests
[400/445] bitcoin: testing torcontrol_tests
[401/445] Running utility command for check-bitcoin-coins_tests
[402/445] bitcoin: testing serialize_tests
[403/445] Running utility command for check-bitcoin-sync_tests
[404/445] bitcoin: testing settings_tests
[405/445] Running utility command for check-bitcoin-scheduler_tests
[406/445] bitcoin: testing streams_tests
[407/445] Running utility command for check-bitcoin-torcontrol_tests
[408/445] bitcoin: testing timedata_tests
[409/445] Running utility command for check-bitcoin-settings_tests
[410/445] Running utility command for check-bitcoin-bswap_tests
[411/445] bitcoin: testing validation_flush_tests
[412/445] bitcoin: testing util_tests
[413/445] Running utility command for check-bitcoin-schnorr_tests
[414/445] bitcoin: testing compilerbug_tests
[415/445] Running utility command for check-bitcoin-finalization_tests
[416/445] bitcoin: testing checkpoints_tests
[417/445] Running utility command for check-bitcoin-bip32_tests
[418/445] bitcoin: testing validationinterface_tests
[419/445] Running utility command for check-bitcoin-blockcheck_tests
[420/445] bitcoin: testing script_standard_tests
[421/445] Running utility command for check-bitcoin-checkpoints_tests
[422/445] Running utility command for check-bitcoin-streams_tests
[423/445] bitcoin: testing versionbits_tests
[424/445] bitcoin: testing blockstatus_tests
[425/445] Running utility command for check-bitcoin-timedata_tests
[426/445] Running utility command for check-bitcoin-validation_flush_tests
[427/445] bitcoin: testing monolith_opcodes_tests
[428/445] bitcoin: testing cashaddr_tests
[429/445] Running utility command for check-bitcoin-script_standard_tests
[430/445] Running utility command for check-bitcoin-versionbits_tests
[431/445] Running utility command for check-bitcoin-cashaddr_tests
[432/445] Running utility command for check-bitcoin-crypto_tests
[433/445] Running utility command for check-bitcoin-blockindex_tests
[434/445] Running utility command for check-bitcoin-util_tests
[435/445] Running utility command for check-bitcoin-blockstatus_tests
[436/445] Running utility command for check-bitcoin-monolith_opcodes_tests
[437/445] Running utility command for check-bitcoin-blockfilter_index_tests
[438/445] Running utility command for check-bitcoin-validationinterface_tests
[439/445] Running utility command for check-bitcoin-compilerbug_tests
[440/445] Running utility command for check-bitcoin-serialize_tests
[441/445] Running utility command for check-bitcoin-init_tests
[442/445] Running utility command for check-bitcoin-script_tests
[443/445] Running bitcoin test suite
PASSED: bitcoin test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1

rebase to fix segfault unrelated to this diff (fixed by D9990)