mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 21:12:48 +01:00
0ab2f79f53
d8e9a2a
Remove "rpc" category from GetWarnings (Wladimir J. van der Laan)7da3b0a
rpc: Move RPC_FORBIDDEN_BY_SAFE_MODE code to reserved section (Wladimir J. van der Laan)2ae705d
Remove Safe mode (Andrew Chow) Pull request description: Rebase of #10563. Safe mode was [disabled by default and deprecated in 0.16](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.16.0.md#safe-mode-disabled-by-default), so probably should be removed for 0.17. > Rationale: > > Safe mode is useless. It only disables some RPC commands when large work forks are detected. Nothing else is affected by safe mode. It seems that very few people would be affected by safe mode. The people who use Core as a wallet are primarily using it through the GUI, which safe mode does not effect. In the GUI, transactions will still be made as normal; only a warning is displayed. > > I also don't think that we should be disabling RPC commands or any functionality in general. If we do, it should be done consistently, which safe mode is not. If we want to keep the idea of a safe mode around, I think that the current system needs to go first before a new system can be implemented. Tree-SHA512: 067938f47ca6e879fb6c3c4e21f9946fd7c5da3cde67ef436f1666798c78d049225b9111dc97064f42b3bc549d3915229fa19ad5a634588f381e34fc65d64044 Signed-off-by: pasta <pasta@dashboost.org> # Conflicts: # src/Makefile.am # src/rpc/protocol.h # src/rpc/rawtransaction.cpp # src/wallet/rpcdump.cpp # src/wallet/rpcwallet.cpp # test/functional/pruning.py
25 lines
899 B
C++
25 lines
899 B
C++
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
|
// Copyright (c) 2009-2016 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_WARNINGS_H
|
|
#define BITCOIN_WARNINGS_H
|
|
|
|
#include <stdlib.h>
|
|
#include <string>
|
|
|
|
void SetMiscWarning(const std::string& strWarning);
|
|
void SetfLargeWorkForkFound(bool flag);
|
|
bool GetfLargeWorkForkFound();
|
|
void SetfLargeWorkInvalidChainFound(bool flag);
|
|
/** Format a string that describes several potential problems detected by the core.
|
|
* strFor can have three values:
|
|
* - "statusbar": get all warnings
|
|
* - "gui": get all warnings, translated (where possible) for GUI
|
|
* This function only returns the highest priority warning of the set selected by strFor.
|
|
*/
|
|
std::string GetWarnings(const std::string& strFor);
|
|
|
|
#endif // BITCOIN_WARNINGS_H
|