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 46b4937bc1
Merge bitcoin/bitcoin#23142: Return false on corrupt tx rather than asserting
0ab4c3b272 Return false on corrupt tx rather than asserting (Samuel Dobson)

Pull request description:

  Takes up #19793

  Rather than asserting, we log an error and return CORRUPT so that the user is informed. This type of error isn't critical so it isn't worth `assert`ing.

ACKs for top commit:
  achow101:
    ACK 0ab4c3b272
  laanwj:
    Code review ACK 0ab4c3b272
  ryanofsky:
    Code review ACK 0ab4c3b272. There may be room for more improvements later like better error messages or easier recovery options, but changing from an assert to an error seems like a clear improvement, and this seems to avoid all the pitfalls of the last PR that tried this.

Tree-SHA512: 4a1a412e7c473d176c4e09123b85f390a6b0ea195e78d28ebd50b13814b7852f8225a172511a2efb6affb555b11bd4e667c19eb8c78b060c5444b62f0fae5f7a
2021-10-01 10:32:10 +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
crc32c Update crc32c subtree 2021-09-29 14:10:29 +02:00
crypto
index Remove txindex migration code 2021-08-20 16:59:41 +02:00
init
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#342: wallet: Move wallets loading out from the main GUI thread 2021-09-30 17:35:14 +03: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#20457: util: Make Parse{Int,UInt}{32,64} use locale independent std::from_chars(…) (C++17) instead of locale dependent strto{l,ll,ul,ull} 2021-09-30 15:14:58 +02:00
univalue
util Merge bitcoin/bitcoin#20457: util: Make Parse{Int,UInt}{32,64} use locale independent std::from_chars(…) (C++17) instead of locale dependent strto{l,ll,ul,ull} 2021-09-30 15:14:58 +02:00
wallet Merge bitcoin/bitcoin#23142: Return false on corrupt tx rather than asserting 2021-10-01 10:32:10 +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
banman.h
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
bitcoin-cli.cpp scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
bitcoin-tx-res.rc
bitcoin-tx.cpp rpc: remove deprecated addresses and reqSigs from rpc outputs 2021-09-24 14:22:49 -05:00
bitcoin-util-res.rc
bitcoin-util.cpp
bitcoin-wallet-res.rc
bitcoin-wallet.cpp
bitcoind-res.rc
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
checkqueue.h
clientversion.cpp
clientversion.h
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
deploymentstatus.h
dummywallet.cpp Remove -rescan startup parameter 2021-09-30 12:06:27 +13: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 Merge bitcoin/bitcoin#23123: Remove -rescan startup parameter 2021-09-30 20:49:40 +02: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
logging.h
Makefile.am build: remove glibc-back-compat from build system 2021-09-10 11:18:58 +08:00
Makefile.bench.include
Makefile.crc32c.include build: remove support for weak linking getauxval() 2021-09-24 15:40:04 +08:00
Makefile.leveldb.include
Makefile.qt.include
Makefile.qt_locale.include
Makefile.qttest.include
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 [net processing] Dont request compact blocks in blocks-only mode 2021-09-28 22:11:30 +02:00
net_processing.h
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
outputtype.h
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 build: remove support for weak linking getauxval() 2021-09-24 15:40:04 +08:00
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 log: Avoid broken DEBUG_LOCKORDER log 2021-09-29 18:46:30 +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