bitcoin/src
Wladimir J. van der Laan cd03513dc2 init: Signal-safe instant shutdown
Replace the 200ms polling loop with a faster and more efficient waiting
operation.

This was tried a few times before, but given up every time because
solutions use a condition variable which is not safe for use in signals
as they need to be reentrant.

On UNIX-ish OSes, use a safe way: a pipe. When shutdown is requested
write a dummy byte to the pipe. Waiting for shutdown is a matter of a
blocking read from the pipe.

On Windows, there are no signals so using a condition variable is safe.
2020-12-15 17:21:06 +01:00
..
bench Drop noop gcc version checks 2020-11-25 14:38:33 +02:00
compat
config
consensus doc: Move assumed-values doxygen comments to header 2020-10-15 11:28:13 +02:00
crc32c
crypto Merge #19845: net: CNetAddr: add support to (un)serialize as ADDRv2 2020-09-28 12:27:08 -07:00
index Merge #19733: Move comment about BaseIndex::DB from TxIndex::DB 2020-08-21 12:48:46 +08:00
interfaces interface: remove unused estimateSmartFee method from node 2020-12-03 12:56:36 +01:00
leveldb
logging
node Merge #18766: Disable fee estimation in blocksonly mode (by removing the fee estimates global) 2020-12-07 12:59:48 +01:00
policy feestimator: encapsulate estimation file logic 2020-12-03 12:56:37 +01:00
primitives Report and verify expirations 2020-10-12 12:14:53 -07:00
qt refactor: Use C++17 std::array where possible 2020-12-04 08:22:45 +01:00
rpc Merge #20568: doc: Use FeeModes doc helper in estimatesmartfee 2020-12-07 14:09:53 +01:00
script Don't make "in" parameters look like "out"/"in-out" parameters: pass by ref to const instead of ref to non-const 2020-12-06 00:22:40 +00:00
secp256k1 Update secp256k1 subtree to latest master 2020-10-27 23:08:48 -07:00
support Move Win32 defines to configure.ac to ensure they are globally defined 2020-08-20 17:55:06 +00:00
test Merge #18766: Disable fee estimation in blocksonly mode (by removing the fee estimates global) 2020-12-07 12:59:48 +01:00
univalue Update univalue subtree 2020-11-19 15:48:24 +01:00
util Merge #20255: util: Add Assume() identity function 2020-12-04 11:07:28 +01:00
wallet Don't make "in" parameters look like "out"/"in-out" parameters: pass by ref to const instead of ref to non-const 2020-12-06 00:22:40 +00:00
zmq zmq: Append address to notify log output 2020-10-01 00:33:38 +02:00
.clang-format
addrdb.cpp p2p: Add ReadAnchors() 2020-10-09 14:29:04 +03:00
addrdb.h p2p: Add ReadAnchors() 2020-10-09 14:29:04 +03:00
addrman.cpp [addrman] Specify max addresses and pct when calling GetAddresses() 2020-08-12 09:22:07 +01:00
addrman.h Merge #20291: [net] Consolidate logic around calling CAddrMan::Connected() 2020-11-19 16:30:54 +01:00
amount.h
arith_uint256.cpp
arith_uint256.h
attributes.h Remove NODISCARD 2020-11-26 09:07:33 +00:00
banman.cpp Ignore incorrectly-serialized banlist.dat entries 2020-10-12 15:35:08 -07:00
banman.h
base58.cpp scripted-diff: Use [[nodiscard]] (C++17) instead of NODISCARD 2020-11-26 09:05:59 +00:00
base58.h scripted-diff: Use [[nodiscard]] (C++17) instead of NODISCARD 2020-11-26 09:05:59 +00:00
bech32.cpp
bech32.h
bitcoin-cli-res.rc Drop the leading 0 from the version number 2020-11-18 12:00:57 -05:00
bitcoin-cli.cpp cli -netinfo: print oversized/extreme ping times as "-" 2020-10-25 16:51:21 +01:00
bitcoin-tx-res.rc Drop the leading 0 from the version number 2020-11-18 12:00:57 -05:00
bitcoin-tx.cpp Warn when binaries are built from a dirty branch. 2020-11-28 18:43:55 -05:00
bitcoin-wallet-res.rc Drop the leading 0 from the version number 2020-11-18 12:00:57 -05:00
bitcoin-wallet.cpp Warn when binaries are built from a dirty branch. 2020-11-28 18:43:55 -05:00
bitcoind-res.rc Drop the leading 0 from the version number 2020-11-18 12:00:57 -05:00
bitcoind.cpp init: Signal-safe instant shutdown 2020-12-15 17:21:06 +01:00
blockencodings.cpp
blockencodings.h
blockfilter.cpp Make CHash256/CHash160 output to Span 2020-07-30 13:57:54 -07:00
blockfilter.h
bloom.cpp
bloom.h doc: clarify CRollingBloomFilter size estimate 2020-10-01 22:22:56 -07:00
chain.cpp
chain.h chain: Remove UB CChain comparison 2020-08-27 20:07:27 -04:00
chainparams.cpp Merge #20238: doc: Missing comments for signet parameters 2020-11-16 10:40:56 +01:00
chainparams.h Remove gArgs global from CreateChainParams to aid testing 2020-09-29 10:20:05 +02:00
chainparamsbase.cpp net: Add alternative port for onion service 2020-09-29 09:59:51 +03:00
chainparamsbase.h net, refactor: Refactor CBaseChainParams::RPCPort function 2020-09-29 09:59:52 +03:00
chainparamsseeds.h net: Hardcoded seeds update for 0.21 2020-10-25 14:25:00 +01:00
checkqueue.h
clientversion.cpp Drop the leading 0 from the version number 2020-11-18 12:00:57 -05:00
clientversion.h Drop the leading 0 from the version number 2020-11-18 12:00:57 -05:00
coins.cpp
coins.h
compat.h net: Drop unneeded Windows headers in compat.h 2020-10-22 21:45:10 +03:00
compressor.cpp
compressor.h
core_io.h scripted-diff: Use [[nodiscard]] (C++17) instead of NODISCARD 2020-11-26 09:05:59 +00:00
core_memusage.h
core_read.cpp Merge #19851: refactor: Extract ParseOpCode from ParseScript 2020-11-20 05:36:01 +01:00
core_write.cpp refactor: Avoid duplicate map lookup in ScriptToAsmStr 2020-09-04 10:25:44 +01:00
cuckoocache.h
dbwrapper.cpp
dbwrapper.h
dummywallet.cpp wallet: Remove -upgradewallet from dummywallet 2020-11-04 12:16:57 -05:00
flatfile.cpp
flatfile.h
fs.cpp
fs.h
hash.cpp Add TaggedHash function (BIP 340) 2020-10-12 02:06:32 -07:00
hash.h scripted-diff: Use [[nodiscard]] (C++17) instead of NODISCARD 2020-11-26 09:05:59 +00:00
httprpc.cpp rpc: Validate -rpcauth arguments 2020-11-23 21:02:54 +00:00
httprpc.h
httpserver.cpp net: Drop unneeded headers when compat.h included 2020-10-22 21:45:20 +03:00
httpserver.h
indirectmap.h
init.cpp init: Signal-safe instant shutdown 2020-12-15 17:21:06 +01:00
init.h Don't make "in" parameters look like "out"/"in-out" parameters: pass by ref to const instead of ref to non-const 2020-12-06 00:22:40 +00:00
key_io.cpp
key_io.h
key.cpp tests: Add fuzzing harness for ec_seckey_import_der(...) and ec_seckey_export_der(...) 2020-08-18 18:03:57 +00:00
key.h
logging.cpp
logging.h
Makefile.am Merge #20494: refactor: Move node and wallet code out of src/interfaces 2020-12-01 09:39:56 +01:00
Makefile.bench.include Add libsqlite3 2020-10-14 11:18:12 -04:00
Makefile.crc32c.include
Makefile.leveldb.include
Makefile.qt_locale.include qt: Pre-splitoff translations update 2020-10-27 19:40:44 +01:00
Makefile.qt.include Add libsqlite3 2020-10-14 11:18:12 -04:00
Makefile.qttest.include Add libsqlite3 2020-10-14 11:18:12 -04:00
Makefile.test_fuzz.include
Makefile.test_util.include test: Mock IBD in net_processing fuzzers 2020-11-07 07:50:59 +01:00
Makefile.test.include Clean up assets test minimizer LDFLAGS 2020-11-26 14:56:25 -08:00
memusage.h
merkleblock.cpp Make Hash[160] consume range-like objects 2020-07-30 13:57:54 -07:00
merkleblock.h
miner.cpp
miner.h Remove mapLinks in favor of entry inlined structs with iterator type erasure 2020-09-04 09:46:44 -07:00
net_permissions.cpp Reduce MAX_PEER_TX_ANNOUNCEMENTS for non-PF_RELAY peers 2020-10-12 12:14:53 -07:00
net_permissions.h Reduce MAX_PEER_TX_ANNOUNCEMENTS for non-PF_RELAY peers 2020-10-12 12:14:53 -07:00
net_processing.cpp Merge #20561: p2p: periodically clear m_addr_known 2020-12-07 23:57:55 +01:00
net_processing.h Avoid calling CAddrMan::Connected() on block-relay-only peer addresses 2020-10-27 11:14:58 -04:00
net_types.h
net.cpp net: Treat raw message bytes as uint8_t 2020-11-20 15:11:21 +01:00
net.h net: Assume that SetCommonVersion is called at most once per peer 2020-12-04 11:19:15 +01:00
netaddress.cpp Break circuit earlier 2020-11-16 15:54:24 -03:00
netaddress.h Merge #20033: refactor: minor whitespace fixups, s/const/constexpr/ and remove template (followup to #19845) 2020-11-16 07:57:34 +01:00
netbase.cpp net: update GetNetworkName() with all enum Network cases 2020-10-15 19:21:38 +02:00
netbase.h
netmessagemaker.h
noui.cpp
noui.h
optional.h
outputtype.cpp
outputtype.h scripted-diff: Use [[nodiscard]] (C++17) instead of NODISCARD 2020-11-26 09:05:59 +00:00
pow.cpp
pow.h
prevector.h
protocol.cpp net: advertise support for ADDRv2 via new message 2020-10-09 16:42:50 +02:00
protocol.h net: advertise support for ADDRv2 via new message 2020-10-09 16:42:50 +02:00
psbt.cpp
psbt.h scripted-diff: Use [[nodiscard]] (C++17) instead of NODISCARD 2020-11-26 09:05:59 +00:00
pubkey.cpp Implement Taproot validation (BIP 341) 2020-10-12 17:17:56 -07:00
pubkey.h refactor: Improve use of explicit keyword 2020-12-01 18:36:39 +01:00
random.cpp Merge #17563: lib: fix a compiler warning: unused GetDevURandom() 2020-08-10 21:30:42 +08:00
random.h
randomenv.cpp src/randomenv.cpp: fix build on uclibc 2020-11-09 21:21:30 +01:00
randomenv.h
rest.cpp Merge #19849: Assert that RPCArg names are equal to CRPCCommand ones (blockchain,rawtransaction) 2020-09-22 17:08:08 +02:00
reverse_iterator.h
scheduler.cpp
scheduler.h
serialize.h Support bypassing range check in ReadCompactSize 2020-10-09 10:32:19 +02:00
shutdown.cpp init: Signal-safe instant shutdown 2020-12-15 17:21:06 +01:00
shutdown.h init: Signal-safe instant shutdown 2020-12-15 17:21:06 +01:00
signet.cpp refactor: Remove SignetTxs::m_valid and use optional instead 2020-09-22 22:31:31 +02:00
signet.h refactor: Remove SignetTxs::m_valid and use optional instead 2020-09-22 22:31:31 +02:00
span.h Merge #19387: span: update constructors to match c++20 draft spec and add lifetimebound attribute 2020-11-25 15:18:33 +01:00
streams.h net: CAddress & CAddrMan: (un)serialize as ADDRv2 2020-10-09 16:42:49 +02:00
sync.cpp sync: const-qualify the argument of double_lock_detected() 2020-11-26 14:42:00 +01:00
sync.h Merge #19337: sync: detect double lock from the same thread 2020-11-25 17:02:20 +01:00
threadinterrupt.cpp
threadinterrupt.h
threadsafety.h Drop deprecated and unused GUARDED_VAR and PT_GUARDED_VAR annotations 2020-08-18 10:46:53 +03:00
timedata.cpp Avoid the use of abs64 in timedata 2020-10-12 19:50:16 -07:00
timedata.h
tinyformat.h refactor: Improve use of explicit keyword 2020-12-01 18:36:39 +01:00
torcontrol.cpp net: Add compat.h header for htonl function 2020-10-22 21:45:20 +03:00
torcontrol.h net: Pass onion service target to Tor controller 2020-10-01 19:00:07 +03:00
txdb.cpp Merge #18637: coins: allow cache resize after init 2020-07-29 07:53:19 +02:00
txdb.h
txmempool.cpp refactor: Clean up CTxMemPool initializer list 2020-10-23 14:41:40 +02:00
txmempool.h refactor: Improve use of explicit keyword 2020-12-01 18:36:39 +01:00
txrequest.cpp refactor: Improve use of explicit keyword 2020-12-01 18:36:39 +01:00
txrequest.h Report and verify expirations 2020-10-12 12:14:53 -07:00
uint256.cpp Add txrequest module 2020-10-12 11:01:16 -07:00
uint256.h Add txrequest module 2020-10-12 11:01:16 -07:00
undo.h
validation.cpp Merge #18766: Disable fee estimation in blocksonly mode (by removing the fee estimates global) 2020-12-07 12:59:48 +01:00
validation.h Remove the remaining fee estimation globals 2020-12-03 12:56:37 +01:00
validationinterface.cpp Add 'sequence' zmq publisher to track all block (dis)connects, mempool deltas 2020-09-22 11:34:30 -04:00
validationinterface.h Add 'sequence' zmq publisher to track all block (dis)connects, mempool deltas 2020-09-22 11:34:30 -04:00
version.h net: CNetAddr: add support to (un)serialize as ADDRv2 2020-09-17 22:17:17 +02:00
versionbits.cpp
versionbits.h
versionbitsinfo.cpp Activate Taproot/Tapscript on regtest (BIP 341, BIP 342) 2020-10-12 17:18:47 -07:00
versionbitsinfo.h
walletinitinterface.h refactor: add unused ArgsManager to replace gArgs 2020-07-29 16:36:44 +07:00
warnings.cpp Remove dead CheckForkWarningConditionsOnNewFork 2020-11-03 14:01:40 +01:00
warnings.h Remove dead CheckForkWarningConditionsOnNewFork 2020-11-03 14:01:40 +01:00