0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-06 14:19:59 -05:00
bitcoin-core/src
Wladimir J. van der Laan b59f2787e5
Merge #18017: txmempool: split epoch logic into class
fd6580e405 [refactor] txmempool: split epoch logic into class (Anthony Towns)

Pull request description:

  Splits the epoch logic introduced in #17925 into a separate class.

  Uses clang's thread safety annotations and encapsulates the data more strongly to reduce chances of bugs from API misuse.

ACKs for top commit:
  jonatack:
    ACK fd6580e405 using clang thread safety annotations looks like a very good idea, and the encapsulation this change adds should improve robustness (and possible unit test-ability) of the code. Verified that changing some of the locking duly provoked build-time warnings with Clang 9 on Debian and that small changes in the new `Epoch` class were covered by failing functional test assertions in `mempool_updatefromblock.py`, `mempool_resurrect.py`, and `mempool_reorg.py`
  hebasto:
    re-ACK fd6580e405, since my [previous](https://github.com/bitcoin/bitcoin/pull/18017#pullrequestreview-569619362) review:

Tree-SHA512: 7004623faa02b56639aa05ab7a078320a6d8d54ec62d8022876221e33f350f47df51ddff056c0de5be798f8eb39b5c03c2d3f035698555d70abc218e950f2f8c
2021-02-24 09:57:21 +01:00
..
bench
compat assumptions: check C++17 assumption with MSVC 2021-02-23 12:51:50 +08:00
config
consensus
crc32c
crypto
index
interfaces
leveldb
logging
node
policy
primitives
qt Merge bitcoin-core/gui#213: qt: Add Copy Address Action to Payment Requests 2021-02-23 11:09:16 +01:00
rpc Merge #21053: rpc, test: document {previous,next}blockhash as optional 2021-02-23 18:28:23 +01:00
script
secp256k1
support
test Merge #16546: External signer support - Wallet Box edition 2021-02-23 17:56:43 +01:00
univalue
util Merge #18017: txmempool: split epoch logic into class 2021-02-24 09:57:21 +01:00
wallet wallet: fix doc typo in signer option 2021-02-23 11:05:13 -08:00
zmq
.clang-format
addrdb.cpp
addrdb.h
addrman.cpp
addrman.h
amount.h
arith_uint256.cpp
arith_uint256.h
attributes.h
banman.cpp
banman.h
base58.cpp
base58.h
bech32.cpp
bech32.h
bitcoin-cli-res.rc
bitcoin-cli.cpp
bitcoin-tx-res.rc
bitcoin-tx.cpp
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.h
chain.cpp
chain.h
chainparams.cpp
chainparams.h
chainparamsbase.cpp
chainparamsbase.h
chainparamsseeds.h
checkqueue.h
clientversion.cpp
clientversion.h
coins.cpp
coins.h
compat.h
compressor.cpp
compressor.h
core_io.h
core_memusage.h
core_read.cpp
core_write.cpp
cuckoocache.h
dbwrapper.cpp
dbwrapper.h
dummywallet.cpp wallet: add -signer argument for external signer command 2021-02-23 14:34:30 +01:00
flatfile.cpp
flatfile.h
fs.cpp
fs.h
hash.cpp
hash.h
httprpc.cpp
httprpc.h
httpserver.cpp
httpserver.h
indirectmap.h
init.cpp
init.h
key.cpp
key.h
key_io.cpp
key_io.h
logging.cpp
logging.h
Makefile.am Merge #18017: txmempool: split epoch logic into class 2021-02-24 09:57:21 +01:00
Makefile.bench.include
Makefile.crc32c.include
Makefile.leveldb.include
Makefile.qt.include gui: Add Roboto Mono font 2021-02-21 21:01:02 +02:00
Makefile.qt_locale.include
Makefile.qttest.include
Makefile.test.include
Makefile.test_fuzz.include
Makefile.test_util.include
mapport.cpp
mapport.h
memusage.h
merkleblock.cpp
merkleblock.h
miner.cpp
miner.h
net.cpp Merge #21222: log: Clarify log message when file does not exist 2021-02-23 16:03:19 +01:00
net.h
net_permissions.cpp
net_permissions.h
net_processing.cpp Merge #20845: net: Log to net debug in MaybeDiscourageAndDisconnect except for noban and manual peers 2021-02-22 09:43:57 +01:00
net_processing.h
net_types.h
netaddress.cpp
netaddress.h
netbase.cpp
netbase.h
netmessagemaker.h
noui.cpp
noui.h
optional.h
outputtype.cpp
outputtype.h
pow.cpp
pow.h
prevector.h
protocol.cpp
protocol.h
psbt.cpp
psbt.h
pubkey.cpp
pubkey.h
random.cpp
random.h
randomenv.cpp
randomenv.h
rest.cpp
reverse_iterator.h
scheduler.cpp
scheduler.h
serialize.h
shutdown.cpp init: only use pipe2 if availabile, check in configure 2021-02-22 14:17:24 +01:00
shutdown.h
signet.cpp
signet.h
span.h
streams.h
sync.cpp
sync.h
threadinterrupt.cpp
threadinterrupt.h
threadsafety.h
timedata.cpp
timedata.h
tinyformat.h
torcontrol.cpp
torcontrol.h
txdb.cpp
txdb.h
txmempool.cpp Merge #18017: txmempool: split epoch logic into class 2021-02-24 09:57:21 +01:00
txmempool.h Merge #18017: txmempool: split epoch logic into class 2021-02-24 09:57:21 +01:00
txrequest.cpp
txrequest.h
uint256.cpp
uint256.h
undo.h
validation.cpp Merge #21202: [validation] Two small clang lock annotation improvements 2021-02-22 09:47:15 +01:00
validation.h
validationinterface.cpp
validationinterface.h
version.h
versionbits.cpp
versionbits.h
versionbitsinfo.cpp
versionbitsinfo.h
walletinitinterface.h
warnings.cpp
warnings.h