bitcoin/src/wallet
fanquake 4f5d3ce5a0
Merge bitcoin/bitcoin#24486: wallet: refactor: dedup sqlite blob binding
8ea6167099 wallet: refactor: dedup sqlite blob binding (Sebastian Falbesoner)

Pull request description:

  This refactoring PR deduplicates repeated SQLite blob binding to a statement with a newly introduced helper function `BindBlobToStatement`, abstracting away the calls to `sqlite3_bind_blob(...)`.
  This should be more readable and less error-prone, e.g. in case that the error handling has to be adapted. As a slight drawback, the function where the binding happens is not printed anymore (`__func__`), i.e. one could argue this is not strictly a refactoring, but IMHO the advantages of deduplication outweigh this; binding errors are purely internal logic errors (wrong use of the sqlite API) rather than something that is dependend on external data like DB content.

ACKs for top commit:
  laanwj:
    Code review ACK 8ea6167099
  achow101:
    ACK 8ea6167099
  klementtan:
    ACK 8ea6167099

Tree-SHA512: 1de0d214f836bc405a01e98a3a2d71f2deaddc7d23c31cad80219d1614bec92619c06d9a4a091dd563d3e95ffb879649c29745d8f89669b2a5330552c212af3f
2022-03-10 12:40:20 +00:00
..
rpc
test
bdb.cpp
bdb.h
coincontrol.cpp
coincontrol.h
coinselection.cpp Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
coinselection.h
context.cpp
context.h
crypter.cpp
crypter.h
db.cpp
db.h
dump.cpp
dump.h
external_signer_scriptpubkeyman.cpp
external_signer_scriptpubkeyman.h
feebumper.cpp
feebumper.h
fees.cpp
fees.h
init.cpp
interfaces.cpp
ismine.h
load.cpp
load.h
receive.cpp
receive.h
salvage.cpp
salvage.h
scriptpubkeyman.cpp
scriptpubkeyman.h
spend.cpp
spend.h
sqlite.cpp
sqlite.h
transaction.cpp
transaction.h
wallet.cpp
wallet.h
walletdb.cpp
walletdb.h
wallettool.cpp
wallettool.h
walletutil.cpp
walletutil.h