aboutsummaryrefslogtreecommitdiff
path: root/src/node/context.h
Commit message (Collapse)AuthorAgeFilesLines
* scripted-diff: [net processing] Rename PeerLogicValidation to PeerManagerJohn Newbery2020-09-071-2/+2
| | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i 's/PeerLogicValidation/PeerManager/g' $(git grep -l PeerLogicValidation ./src ./test) sed -i 's/peer_logic/peerman/g' $(git grep -l peer_logic ./src ./test) -END VERIFY SCRIPT- PeerLogicValidation was originally net_processing's implementation to the validation interface. It has since grown to contain much of net_processing's logic. Therefore rename it to reflect its responsibilities. Suggested in https://github.com/bitcoin/bitcoin/pull/10756#pullrequestreview-53892618.
* Remove mempool globalMarcoFalke2020-09-051-1/+1
|
* refactor: Move wallet methods out of chain.h and node.hRussell Yanofsky2020-08-271-0/+5
| | | | | | | | | | | | | Add WalletClient interface so node interface is cleaner and don't need wallet-specific methods. The new NodeContext::wallet_client pointer will also be needed to eliminate global wallet variables like ::vpwallets, because createWallet(), loadWallet(), getWallets(), etc methods called by the GUI need a way to get a reference to the list of open wallets if it is no longer a global variable. Also tweaks splash screen registration for load wallet events to be delayed until after wallet client is created.
* gui: Fix regression in GUI consoleHennadii Stepanov2020-07-081-0/+2
| | | | | This change prevents "Shutting down" message during "dumptxoutset", "gettxoutsetinfo" and "scantxoutset" calls.
* refactor: Remove unused EnsureChainmanMarcoFalke2020-06-151-6/+0
|
* node: Add chainman alias for g_chainmanMarcoFalke2020-05-211-0/+9
|
* scripted-diff: Bump copyright headersMarcoFalke2020-04-161-1/+1
| | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
* node: Add args alias for gArgs globalMarcoFalke2020-04-151-0/+2
|
* [lib] add scheduler to node contextAmiti Uttarwar2020-02-171-0/+2
| | | | - also update test setup & access point in denial of service test
* node: Add reference to mempool in NodeContextMarcoFalke2019-11-151-3/+4
| | | | | | | | | | | | | | Currently it is an alias to the global ::mempool and should be used as follows. * Node code (validation and transaction relay) can use either ::mempool or node.mempool, whichever seems a better fit. * RPC code should use the added convenience getter EnsureMempool, which makes sure the mempool exists before use. This prepares the RPC code to a future where the mempool might be disabled at runtime or compile time. * Test code should use m_node.mempool directly, as the mempool is always initialized for tests.
* scripted-diff: Remove g_connman, g_banman globalsRussell Yanofsky2019-10-281-0/+6
| | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i 's:#include <interfaces/chain.h>:#include <banman.h>\n#include <interfaces/chain.h>\n#include <net.h>\n#include <net_processing.h>:' src/node/context.cpp sed -i 's/namespace interfaces {/class BanMan;\nclass CConnman;\nclass PeerLogicValidation;\n&/' src/node/context.h sed -i 's/std::unique_ptr<interfaces::Chain> chain/std::unique_ptr<CConnman> connman;\n std::unique_ptr<PeerLogicValidation> peer_logic;\n std::unique_ptr<BanMan> banman;\n &/' src/node/context.h sed -i '/std::unique_ptr<[^>]\+> \(g_connman\|g_banman\|peerLogic\);/d' src/banman.h src/net.h src/init.cpp sed -i 's/g_connman/m_context.connman/g' src/interfaces/node.cpp sed -i 's/g_banman/m_context.banman/g' src/interfaces/node.cpp sed -i 's/g_connman/m_node.connman/g' src/interfaces/chain.cpp src/test/setup_common.cpp sed -i 's/g_banman/m_node.banman/g' src/test/setup_common.cpp sed -i 's/g_connman/node.connman/g' src/init.cpp src/node/transaction.cpp sed -i 's/g_banman/node.banman/g' src/init.cpp sed -i 's/peerLogic/node.peer_logic/g' src/init.cpp sed -i 's/g_connman/g_rpc_node->connman/g' src/rpc/mining.cpp src/rpc/net.cpp src/rpc/rawtransaction.cpp sed -i 's/g_banman/g_rpc_node->banman/g' src/rpc/net.cpp sed -i 's/std::shared_ptr<CWallet> wallet =/node.context()->connman = std::move(test.m_node.connman);\n &/' src/qt/test/wallettests.cpp -END VERIFY SCRIPT-
* Pass NodeContext, ConnMan, BanMan references more placesRussell Yanofsky2019-10-281-1/+16
| | | | So g_connman and g_banman globals can be removed next commit.
* MOVEONLY: Move NodeContext struct to node/context.hRussell Yanofsky2019-10-281-0/+23