dogecoin/src
MarcoFalke 4b705b1c98
Merge #19098: test: Remove duplicate NodeContext hacks
edc316020e test: Remove duplicate NodeContext hacks (Russell Yanofsky)

Pull request description:

  Qt tests currently are currently using two NodeContext structs at the same time, one in interfaces::NodeImpl::m_context, and the other in BasicTestingSetup::m_node, and the tests have hacks transferring state between them.

  Fix this by getting rid of the NodeImpl::m_context struct and making it a pointer. This way a common BitcoinApplication object can be used for all qt tests, but they can still have their own testing setups.

  Non-test code is changing but non-test behavior is still the same as before.

  Motivation for this PR is to be able to remove the "std::move(test.m_node.connman)" and mempool hacks for swapping individual NodeContext members in Qt tests, because followup PR #19099 adds yet another member (wallet_client) that needs to be swapped. After this change, the whole NodeContext struct can be swapped instead of individual members, so the workarounds are less fragile and invasive.

ACKs for top commit:
  MarcoFalke:
    crACK edc316020e 🌮
  promag:
    ACK edc316020e.

Tree-SHA512: c1650e4127f43a4020304ca7c13b5d9122fb5723aacd8fa1cf855d03c6052fcfb7685810aa2a5ef708561015f0022fecaacbad479295104ca45d2c17579466a4
2020-08-07 08:07:37 +02:00
..
bench Make CHash256/CHash160 output to Span 2020-07-30 13:57:54 -07:00
compat net: Use C++11 member initialization in protocol 2020-05-20 08:27:07 -04:00
config
consensus Add txids with non-standard inputs to reject filter 2020-08-04 13:29:40 -04:00
crc32c
crypto build: improve builtin_clz* detection 2020-06-29 11:31:17 +08:00
index scripted-diff: Move ui_interface to the node lib 2020-06-27 11:49:28 -04:00
interfaces Merge #19098: test: Remove duplicate NodeContext hacks 2020-08-07 08:07:37 +02:00
leveldb
logging
node Add support for tx-relay via wtxid 2020-07-19 02:05:29 -04:00
policy Add txids with non-standard inputs to reject filter 2020-08-04 13:29:40 -04:00
primitives refactor: add GenTxid (=txid or wtxid) type and use it for tx request logic 2020-07-30 13:44:54 -07:00
qt Merge #19098: test: Remove duplicate NodeContext hacks 2020-08-07 08:07:37 +02:00
rpc Merge #19326: Simplify hash.h interface using Spans 2020-08-03 17:27:49 +02:00
script Make Hash[160] consume range-like objects 2020-07-30 13:57:54 -07:00
secp256k1 Update src/secp256k1 subtree 2020-06-09 13:39:09 -07:00
support Limit scope of all global std::once_flag 2020-05-29 17:22:07 -04:00
test Merge #19098: test: Remove duplicate NodeContext hacks 2020-08-07 08:07:37 +02:00
univalue
util Merge #19614: util: use HAVE_FDATASYNC to determine fdatasync() use 2020-08-05 17:33:42 +02:00
wallet Merge #19634: rpc: Document getwalletinfo's unlocked_until field as optional 2020-08-04 09:14:45 +08:00
zmq
.clang-format tools: clang-format 6 compatibility 2020-07-06 03:52:37 +02:00
addrdb.cpp refactor: Use uint16_t instead of unsigned short 2020-06-22 12:12:22 +02:00
addrdb.h Clean up separated ban/discourage interface 2020-07-03 20:43:55 -07:00
addrman.cpp
addrman.h Remove useless 2500 limit on AddrMan queries 2020-07-24 18:02:20 +03:00
amount.h
arith_uint256.cpp
arith_uint256.h
attributes.h
banman.cpp banlist: log post-swept banlist size at startup 2020-07-08 21:44:45 +08:00
banman.h Clean up separated ban/discourage interface 2020-07-03 20:43:55 -07:00
base58.cpp Make Hash[160] consume range-like objects 2020-07-30 13:57:54 -07:00
base58.h
bech32.cpp
bech32.h
bitcoin-cli-res.rc
bitcoin-cli.cpp scripted-diff: Replace gArgs with local argsman 2020-07-29 16:39:00 +07:00
bitcoin-tx-res.rc
bitcoin-tx.cpp scripted-diff: Replace gArgs with local argsman 2020-07-29 16:39:00 +07:00
bitcoin-wallet-res.rc
bitcoin-wallet.cpp scripted-diff: Replace gArgs with local argsman 2020-07-29 16:39:00 +07:00
bitcoind-res.rc
bitcoind.cpp Add <datadir>/settings.json persistent settings storage. 2020-07-11 05:41:12 -04:00
blockencodings.cpp Get rid of -Wthread-safety-precise warnings 2020-05-28 09:55:39 +03:00
blockencodings.h Get rid of -Wthread-safety-precise warnings 2020-05-28 09:55:39 +03:00
blockfilter.cpp Make CHash256/CHash160 output to Span 2020-07-30 13:57:54 -07:00
blockfilter.h [indexes] Fix default [de]serialization of BlockFilter. 2020-05-26 17:27:15 -04:00
bloom.cpp scripted-diff: TxoutType C++11 scoped enum class 2020-06-21 06:41:55 -04:00
bloom.h Merge #18317: Serialization improvements step 6 (all except wallet/gui) 2020-05-20 07:30:29 -04:00
chain.cpp
chain.h
chainparams.cpp refactor: use local argsmanager in CRegTestParams 2020-07-29 16:39:03 +07:00
chainparams.h
chainparamsbase.cpp scripted-diff: Replace gArgs with local argsman 2020-07-29 16:39:00 +07:00
chainparamsbase.h refactor: add unused ArgsManager to replace gArgs 2020-07-29 16:36:44 +07:00
chainparamsseeds.h
checkqueue.h
clientversion.cpp
clientversion.h
coins.cpp Add CChainState::ResizeCoinsCaches 2020-07-01 14:44:28 -04:00
coins.h Add CChainState::ResizeCoinsCaches 2020-07-01 14:44:28 -04:00
compat.h
compressor.cpp
compressor.h
core_io.h
core_memusage.h
core_read.cpp refactor: Replace const char* to std::string 2020-05-22 01:40:31 +09:00
core_write.cpp Merge #16525: Dump transaction version as an unsigned integer in RPC/TxToUniv 2020-07-16 21:38:09 +02:00
cuckoocache.h
dbwrapper.cpp
dbwrapper.h Drop unused CDBWrapper methods 2020-07-08 14:26:14 +03:00
dummywallet.cpp scripted-diff: Replace gArgs with local argsman 2020-07-29 16:39:00 +07:00
flatfile.cpp
flatfile.h Merge #18317: Serialization improvements step 6 (all except wallet/gui) 2020-05-20 07:30:29 -04:00
fs.cpp Add missing includes to fix compile errors 2020-06-16 15:15:46 -04:00
fs.h
hash.cpp Make MurmurHash3 consume Spans 2020-07-30 13:57:54 -07:00
hash.h Make Hash[160] consume range-like objects 2020-07-30 13:57:54 -07:00
httprpc.cpp Merge #18740: Remove g_rpc_node global 2020-05-21 06:53:39 -04:00
httprpc.h refactor: Pass NodeContext to RPC and REST methods through util::Ref 2020-05-13 16:20:13 -04:00
httpserver.cpp scripted-diff: Move ui_interface to the node lib 2020-06-27 11:49:28 -04:00
httpserver.h
indirectmap.h
init.cpp Merge #19604: Pass mempool pointer to UnloadBlockIndex/GetCoinsCacheSizeState 2020-07-30 17:30:52 +02:00
init.h refactor: Pass NodeContext to RPC and REST methods through util::Ref 2020-05-13 16:20:13 -04:00
key.cpp Make CHash256/CHash160 output to Span 2020-07-30 13:57:54 -07:00
key.h
key_io.cpp
key_io.h
limitedmap.h
logging.cpp log: remove deprecated db log category 2020-06-07 17:03:49 +02:00
logging.h refactor: Rename LockGuard to StdLockGuard for consistency with StdMutex 2020-05-28 09:54:24 +03:00
Makefile.am build: Sort Makefile.am after renaming file 2020-06-27 11:49:35 -04:00
Makefile.bench.include Replace current benchmarking framework with nanobench 2020-06-13 12:24:18 +02:00
Makefile.crc32c.include
Makefile.leveldb.include build: Enable -Wsuggest-override 2020-05-12 18:03:39 +03:00
Makefile.qt.include scripted-diff: rename movie folder to animation 2020-06-29 18:49:13 +01:00
Makefile.qt_locale.include
Makefile.qttest.include
Makefile.test.include [util] add RunCommandParseJSON 2020-07-31 13:38:10 +02:00
Makefile.test_fuzz.include
Makefile.test_util.include
memusage.h
merkleblock.cpp Make Hash[160] consume range-like objects 2020-07-30 13:57:54 -07:00
merkleblock.h
miner.cpp refactor: Remove unused BlockAssembler::pblock member var 2020-06-15 08:08:19 -04:00
miner.h refactor: Remove unused BlockAssembler::pblock member var 2020-06-15 08:08:19 -04:00
net.cpp Merge #19326: Simplify hash.h interface using Spans 2020-08-03 17:27:49 +02:00
net.h Add addr permission flag enabling non-cached addr sharing 2020-07-30 14:38:50 +03:00
net_permissions.cpp Add addr permission flag enabling non-cached addr sharing 2020-07-30 14:38:50 +03:00
net_permissions.h Add addr permission flag enabling non-cached addr sharing 2020-07-30 14:38:50 +03:00
net_processing.cpp Merge #19620: Add txids with non-standard inputs to reject filter 2020-08-07 07:34:27 +08:00
net_processing.h Merge #19472: [net processing] Reduce cs_main scope in MaybeDiscourageAndDisconnect() 2020-07-24 17:20:58 +02:00
net_types.h
netaddress.cpp Make Hash[160] consume range-like objects 2020-07-30 13:57:54 -07:00
netaddress.h net: save the network type explicitly in CNetAddr 2020-07-27 15:13:24 +02:00
netbase.cpp refactor: Use uint16_t instead of unsigned short 2020-06-22 12:12:22 +02:00
netbase.h
netmessagemaker.h refactor: s/command/msg_type/ in CNetMsgMaker and CSerializedNetMsg 2020-05-11 00:20:57 +02:00
noui.cpp scripted-diff: Move ui_interface to the node lib 2020-06-27 11:49:28 -04:00
noui.h
optional.h
outputtype.cpp Enable Wswitch for OutputType 2020-07-01 18:03:12 -04:00
outputtype.h Remove confusing OutputType::CHANGE_AUTO 2020-07-01 18:02:38 -04:00
pow.cpp
pow.h
prevector.h
protocol.cpp refactor: add GenTxid (=txid or wtxid) type and use it for tx request logic 2020-07-30 13:44:54 -07:00
protocol.h scripted-diff: Remove Reference Links 2020-08-01 23:42:07 -04:00
psbt.cpp psbt: always put a non_witness_utxo and don't remove it 2020-06-24 16:32:19 -04:00
psbt.h psbt: always put a non_witness_utxo and don't remove it 2020-06-24 16:32:19 -04:00
pubkey.cpp
pubkey.h Make Hash[160] consume range-like objects 2020-07-30 13:57:54 -07:00
random.cpp Merge #18781: Add templated GetRandDuration<> 2020-05-15 08:58:49 -04:00
random.h
randomenv.cpp
randomenv.h
rest.cpp rpc: Avoid useless mempool query in gettxoutproof 2020-07-26 16:44:07 +02:00
reverse_iterator.h
scheduler.cpp clang-format scheduler 2020-06-21 06:02:59 -04:00
scheduler.h clang-format scheduler 2020-06-21 06:02:59 -04:00
serialize.h refactor: Use uint16_t instead of unsigned short 2020-06-22 12:12:22 +02:00
shutdown.cpp
shutdown.h
span.h Add MakeUCharSpan, to help constructing Span<[const] unsigned char> 2020-07-30 13:57:09 -07:00
streams.h refactor: Drop unused CBufferedFile::Seek() 2020-07-26 22:46:28 +03:00
sync.cpp test: Add LockStackEmpty() 2020-08-02 16:42:39 +03:00
sync.h test: Add LockStackEmpty() 2020-08-02 16:42:39 +03:00
threadinterrupt.cpp
threadinterrupt.h
threadsafety.h Add means to handle negative capabilities in thread safety annotations 2020-06-11 15:49:39 +03:00
timedata.cpp scripted-diff: Move ui_interface to the node lib 2020-06-27 11:49:28 -04:00
timedata.h
tinyformat.h
torcontrol.cpp
torcontrol.h
txdb.cpp Merge #18637: coins: allow cache resize after init 2020-07-29 07:53:19 +02:00
txdb.h txdb: add CCoinsViewDB::ChangeCacheSize 2020-07-01 14:44:24 -04:00
txmempool.cpp refactor: make txmempool interface use GenTxid 2020-07-30 13:45:03 -07:00
txmempool.h refactor: make txmempool interface use GenTxid 2020-07-30 13:45:03 -07:00
uint256.cpp scripted-diff: rename base_blob::data to m_data 2020-07-30 13:57:09 -07:00
uint256.h Make uint256 Span-convertible by adding ::data() 2020-07-30 13:57:09 -07:00
undo.h
validation.cpp Merge #19620: Add txids with non-standard inputs to reject filter 2020-08-07 07:34:27 +08:00
validation.h Pass mempool pointer to GetCoinsCacheSizeState 2020-07-29 12:30:11 +02:00
validationinterface.cpp trivial: Suggested cleanups to surrounding code 2020-05-22 16:30:07 -04:00
validationinterface.h trivial: Suggested cleanups to surrounding code 2020-05-22 16:30:07 -04:00
version.h Add p2p message "wtxidrelay" 2020-07-19 02:10:41 -04:00
versionbits.cpp
versionbits.h
versionbitsinfo.cpp
versionbitsinfo.h
walletinitinterface.h refactor: add unused ArgsManager to replace gArgs 2020-07-29 16:36:44 +07:00
warnings.cpp Make SetMiscWarning() accept bilingual_str argument 2020-06-10 15:01:20 +03:00
warnings.h Make SetMiscWarning() accept bilingual_str argument 2020-06-10 15:01:20 +03:00