bitcoin/src/wallet
laanwj 196b459920
Merge bitcoin/bitcoin#23438: refactor: Use spans of std::byte in serialize
fa5d2e678c Remove unused char serialize (MarcoFalke)
fa24493d63 Use spans of std::byte in serialize (MarcoFalke)
fa65bbf217 span: Add BytePtr helper (MarcoFalke)

Pull request description:

  This changes the serialize code (`.read()` and `.write()` functions) to take a `Span` instead of a pointer and size. This is a breaking change for the serialize interface, so at no additional cost we can also switch to `std::byte` (instead of using `char`).

  The benefits of using `Span`:
  * Less verbose and less fragile code when passing an already existing `Span`(-like) object to or from serialization

  The benefits of using `std::byte`:
  * `std::byte` can't accidentally be mistaken for an integer

  The goal here is to only change serialize to use spans of `std::byte`. If needed, `AsBytes`,  `MakeUCharSpan`, ... can be used (temporarily) to pass spans of the right type.

  Other changes that are included here:

  * [#22167](https://github.com/bitcoin/bitcoin/pull/22167) (refactor: Remove char serialize by MarcoFalke)
  * [#21906](https://github.com/bitcoin/bitcoin/pull/21906) (Preserve const in cast on CTransactionSignatureSerializer by promag)

ACKs for top commit:
  laanwj:
    Concept and code review ACK fa5d2e678c
  sipa:
    re-utACK fa5d2e678c

Tree-SHA512: 08ee9eced5fb777cedae593b11e33660bed9a3e1711a7451a87b835089a96c99ce0632918bb4666a4e859c4d020f88fb50f2dd734216b0c3d1a9a704967ece6f
2022-01-27 19:19:12 +01:00
..
rpc Merge bitcoin/bitcoin#24067: wallet: Actually treat (un)confirmed txs as (un)confirmed 2022-01-25 16:17:51 -05:00
test Require CBlockIndex::GetBlockPos() to hold mutex cs_main 2022-01-25 20:43:12 +01:00
bdb.cpp Merge bitcoin/bitcoin#23438: refactor: Use spans of std::byte in serialize 2022-01-27 19:19:12 +01:00
bdb.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
coincontrol.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
coincontrol.h wallet: add input weights to CCoinControl 2022-01-24 11:23:31 -05:00
coinselection.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
coinselection.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
context.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
context.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
crypter.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
crypter.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
db.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
db.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
dump.cpp Merge bitcoin/bitcoin#23438: refactor: Use spans of std::byte in serialize 2022-01-27 19:19:12 +01:00
dump.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
external_signer_scriptpubkeyman.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
external_signer_scriptpubkeyman.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
feebumper.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
feebumper.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
fees.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
fees.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
init.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
interfaces.cpp interfaces: Remove unused is_final 2022-01-14 11:28:45 +01:00
ismine.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
load.cpp fs: Make compatible with boost 1.78 2022-01-19 16:25:20 -05:00
load.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
receive.cpp wallet: Avoid dropping confirmed coins 2022-01-25 10:15:12 +01:00
receive.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
salvage.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
salvage.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
scriptpubkeyman.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
scriptpubkeyman.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
spend.cpp Merge bitcoin/bitcoin#24067: wallet: Actually treat (un)confirmed txs as (un)confirmed 2022-01-25 16:17:51 -05:00
spend.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
sqlite.cpp Merge bitcoin/bitcoin#23438: refactor: Use spans of std::byte in serialize 2022-01-27 19:19:12 +01:00
sqlite.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
transaction.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
transaction.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
wallet.cpp wallet: Allow user specified input size to override 2022-01-24 11:23:31 -05:00
wallet.h wallet: Allow user specified input size to override 2022-01-24 11:23:31 -05:00
walletdb.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
walletdb.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
wallettool.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
wallettool.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
walletutil.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
walletutil.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00