0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-05 14:06:27 -05:00
bitcoin-core/src
W. J. van der Laan 80b4e8fb87
Merge bitcoin/bitcoin#23112: wallet: enable SQLite extended result codes
90be29c5b5 wallet: enable SQLite extended result codes (Sebastian Falbesoner)

Pull request description:

  With this change, we get more fine-grained error messages if something goes wrong in the course of communicating with the SQLite database. To pick some random examples, the error codes SQLITE_IOERR_NOMEM, SQLITE_IOERR_CORRUPTFS or SQLITE_IOERR_FSYNC are way more specific than just a plain SQLITE_IOERR, and the corresponding error messages generated by sqlite3_errstr() will hence give a better hint to the user (or also to the developers, if an error report is sent) what the cause for a failure is.

  See the SQLite documentation
  https://www.sqlite.org/c3ref/extended_result_codes.html
  https://www.sqlite.org/c3ref/c_abort_rollback.html
  > In its default configuration, SQLite API routines return one of 30 integer result codes. However, experience has shown that many of these result codes are too coarse-grained. They do not provide as much information about problems as programmers might like. In an effort to address this, newer versions of SQLite (version 3.3.8 2006-10-09 and later) include support for additional result codes that provide more detailed information about errors.

ACKs for top commit:
  Sjors:
    utACK 90be29c
  achow101:
    ACK 90be29c5b5
  laanwj:
    Code review ACK 90be29c5b5

Tree-SHA512: 2b7a60860c206f2b5f8ff9d4a7698efdee897c9ad024621b8fd165b841c20746d9780da3cf46aaf448a777e229a5b3cdf3a4792e8ef82cda9c5d46e354a9a598
2021-09-30 12:11:00 +02:00
..
bench scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
compat compat: remove glibc_compat.cpp 2021-09-10 11:18:58 +08:00
config
consensus consensus/params: simplify ValidDeployment check to avoid gcc warning 2021-08-02 23:48:32 +10:00
crc32c
crypto
index Remove txindex migration code 2021-08-20 16:59:41 +02:00
init Start using init makeNode, makeChain, etc methods 2021-08-17 03:05:15 -05:00
interfaces Make GUI UTXO lock/unlock persistent 2021-09-25 23:50:06 +12:00
ipc
leveldb
logging Make unexpected time type in BCLog::LogMsg() a compile-time error 2021-09-07 19:19:31 +02:00
node scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
policy add missing includes in policy/rbf 2021-09-20 13:34:48 +01:00
primitives
qt Merge bitcoin-core/gui#336: Do not exit and re-enter main event loop during shutdown 2021-09-30 11:35:15 +02:00
rpc Merge bitcoin/bitcoin#22722: rpc: update estimatesmartfee to return max of CBlockPolicyEstimator::estimateSmartFee, mempoolMinFee and minRelayTxFee 2021-09-29 10:55:29 +13:00
script Merge bitcoin/bitcoin#22650: Remove -deprecatedrpc=addresses flag and corresponding code/logic 2021-09-29 10:41:30 +13:00
secp256k1
support
test Merge bitcoin/bitcoin#23064: fuzz: Fix memory leak in system fuzz target 2021-09-29 17:58:50 +02:00
univalue
util scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
wallet Merge bitcoin/bitcoin#23112: wallet: enable SQLite extended result codes 2021-09-30 12:11:00 +02:00
zmq scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
.clang-format
.clang-tidy Enable clang-tidy bugprone-argument-comment and fix violations 2021-09-07 09:11:10 +02:00
addrdb.cpp scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
addrdb.h Raise InitError when peers.dat is invalid or corrupted 2021-09-09 09:20:43 +02:00
addrman.cpp addrman: Replace assert with throw on corrupt data 2021-09-21 10:09:45 +02:00
addrman.h Refactor: Turn the internal addrman check helper into a forced check 2021-09-21 10:07:48 +02:00
amount.h
arith_uint256.cpp
arith_uint256.h
attributes.h
banman.cpp Ignore banlist.dat 2021-07-30 11:21:51 +02:00
banman.h Ignore banlist.dat 2021-07-30 11:21:51 +02:00
base58.cpp
base58.h
bech32.cpp Add references for the generator/constant used in Bech32(m) 2021-08-20 15:49:50 -04:00
bech32.h
bitcoin-cli-res.rc windres: use PACKAGE_VERSION rather than building more version numbers 2021-08-17 16:54:47 +08:00
bitcoin-cli.cpp scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
bitcoin-tx-res.rc windres: use PACKAGE_VERSION rather than building more version numbers 2021-08-17 16:54:47 +08:00
bitcoin-tx.cpp rpc: remove deprecated addresses and reqSigs from rpc outputs 2021-09-24 14:22:49 -05:00
bitcoin-util-res.rc windres: use PACKAGE_VERSION rather than building more version numbers 2021-08-17 16:54:47 +08:00
bitcoin-util.cpp
bitcoin-wallet-res.rc windres: use PACKAGE_VERSION rather than building more version numbers 2021-08-17 16:54:47 +08:00
bitcoin-wallet.cpp
bitcoind-res.rc windres: use PACKAGE_VERSION rather than building more version numbers 2021-08-17 16:54:47 +08:00
bitcoind.cpp
blockencodings.cpp
blockencodings.h
blockfilter.cpp
blockfilter.h
bloom.cpp bloom: cleanup includes 2021-09-29 09:48:36 +08:00
bloom.h bloom: cleanup includes 2021-09-29 09:48:36 +08:00
chain.cpp
chain.h chain: add BLOCK_ASSUMED_VALID for use with assumeutxo 2021-09-15 15:46:44 -04:00
chainparams.cpp doc: Remove un-actionable TODO from chainparams.cpp 2021-09-28 20:18:20 +02:00
chainparams.h
chainparamsbase.cpp test: Activate all regtest softforks at height 1, unless overridden 2021-09-16 18:53:04 +02:00
chainparamsbase.h
chainparamsseeds.h contrib, p2p: update I2P hardcoded seeds 2021-07-30 11:03:44 +02:00
checkqueue.h
clientversion.cpp wallet: use FormatFullVersion instead of CLIENT_BUILD in rpcdump 2021-08-16 16:04:47 +08:00
clientversion.h wallet: use FormatFullVersion instead of CLIENT_BUILD in rpcdump 2021-08-16 16:04:47 +08:00
coins.cpp
coins.h
compat.h
compressor.cpp
compressor.h
core_io.h refactor: minor styling, prefer snake case and same line if 2021-09-24 14:22:53 -05:00
core_memusage.h
core_read.cpp
core_write.cpp refactor: minor styling, prefer snake case and same line if 2021-09-24 14:22:53 -05:00
cuckoocache.h
dbwrapper.cpp
dbwrapper.h
deploymentinfo.cpp
deploymentinfo.h
deploymentstatus.cpp consensus/params: simplify ValidDeployment check to avoid gcc warning 2021-08-02 23:48:32 +10:00
deploymentstatus.h
dummywallet.cpp Merge bitcoin/bitcoin#22219: multiprocess: Start using init makeNode, makeChain, etc methods 2021-09-16 08:47:38 +08:00
external_signer.cpp
external_signer.h
flatfile.cpp
flatfile.h
fs.cpp Merge bitcoin/bitcoin#20586: Fix Windows build with --enable-werror 2021-08-27 08:31:45 +02:00
fs.h
hash.cpp bloom: use Span instead of std::vector for insert and contains 2021-09-29 09:40:10 +08:00
hash.h
httprpc.cpp Replace use of boost::trim use with locale-independent TrimString 2021-09-02 13:17:46 +08:00
httprpc.h
httpserver.cpp scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
httpserver.h
i2p.cpp
i2p.h
indirectmap.h
init.cpp scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
init.h
key.cpp Stricter BIP32 decoding and test vector 5 2021-08-30 12:02:04 -04:00
key.h doc: Remove stale comment for CPrivKey 2021-09-16 21:16:39 +09:00
key_io.cpp
key_io.h
logging.cpp log, sync: add LOCK logging category, apply it to lock contention 2021-08-18 19:57:15 +02:00
logging.h log, sync: add LOCK logging category, apply it to lock contention 2021-08-18 19:57:15 +02:00
Makefile.am build: remove glibc-back-compat from build system 2021-09-10 11:18:58 +08:00
Makefile.bench.include
Makefile.crc32c.include
Makefile.leveldb.include
Makefile.qt.include Start using init makeNode, makeChain, etc methods 2021-08-17 03:05:15 -05:00
Makefile.qt_locale.include
Makefile.qttest.include Start using init makeNode, makeChain, etc methods 2021-08-17 03:05:15 -05:00
Makefile.test.include fuzz: Move all addrman fuzz targets to one file 2021-09-21 10:09:56 +02:00
Makefile.test_fuzz.include
Makefile.test_util.include move-only: unittest: add test/util/chainstate.h 2021-09-15 15:46:48 -04:00
mapport.cpp
mapport.h
memusage.h
merkleblock.cpp
merkleblock.h
miner.cpp scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
miner.h
net.cpp scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
net.h Merge bitcoin/bitcoin#22911: [net] Minor cleanups to asmap 2021-09-10 14:04:16 +08:00
net_permissions.cpp
net_permissions.h
net_processing.cpp scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
net_processing.h Merge bitcoin/bitcoin#22577: Close minor startup race between main and scheduler threads 2021-08-04 16:37:12 +02:00
net_types.cpp MOVEONLY: Expose BanMapToJson / BanMapFromJson 2021-09-03 05:21:58 -04:00
net_types.h MOVEONLY: Expose BanMapToJson / BanMapFromJson 2021-09-03 05:21:58 -04:00
netaddress.cpp [asmap] Remove SanityCheckASMap() from netaddress 2021-09-07 13:31:10 +01:00
netaddress.h [asmap] Remove SanityCheckASMap() from netaddress 2021-09-07 13:31:10 +01:00
netbase.cpp Cleanup headers after #20788 2021-09-11 10:47:02 +03:00
netbase.h
netmessagemaker.h
noui.cpp
noui.h
outputtype.cpp make ParseOutputType return a std::optional<OutputType> 2021-08-04 19:20:32 +08:00
outputtype.h make ParseOutputType return a std::optional<OutputType> 2021-08-04 19:20:32 +08:00
pow.cpp
pow.h
prevector.h
protocol.cpp
protocol.h doc: Remove incorrect INIT_PROTO_VERSION from nTime comment 2021-08-23 18:53:34 +02:00
psbt.cpp
psbt.h
pubkey.cpp Merge bitcoin/bitcoin#22836: Stricter BIP32 decoding and test vector 5 2021-09-02 10:41:16 +08:00
pubkey.h Consolidate XOnlyPubKey lookup hack 2021-08-23 21:38:34 -04:00
random.cpp
random.h
randomenv.cpp
randomenv.h
rest.cpp
reverse_iterator.h
scheduler.cpp
scheduler.h
serialize.h
shutdown.cpp
shutdown.h
signet.cpp Enable clang-tidy bugprone-argument-comment and fix violations 2021-09-07 09:11:10 +02:00
signet.h
span.h
streams.h
sync.cpp sync: inline lock contention logging macro to fix time duration 2021-09-06 23:43:51 +02:00
sync.h sync: inline lock contention logging macro to fix time duration 2021-09-06 23:43:51 +02:00
threadinterrupt.cpp
threadinterrupt.h
threadsafety.h
timedata.cpp scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
timedata.h
tinyformat.h
torcontrol.cpp
torcontrol.h
txdb.cpp scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
txdb.h Remove txindex migration code 2021-08-20 16:59:41 +02:00
txmempool.cpp Use C++11 member initializer in CTxMemPoolEntry 2021-09-21 16:04:27 +02:00
txmempool.h Use C++11 member initializer in CTxMemPoolEntry 2021-09-21 16:04:27 +02:00
txorphanage.cpp
txorphanage.h
txrequest.cpp
txrequest.h
uint256.cpp
uint256.h
undo.h
validation.cpp scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
validation.h Merge bitcoin/bitcoin#21526: validation: UpdateTip/CheckBlockIndex assumeutxo support 2021-09-23 22:22:07 +02:00
validationinterface.cpp
validationinterface.h
version.h
versionbits.cpp
versionbits.h
walletinitinterface.h
warnings.cpp
warnings.h