|
17 | 17 | #include <policy/rbf.h>
|
18 | 18 | #include <rpc/mining.h>
|
19 | 19 | #include <rpc/rawtransaction.h>
|
20 |
| -#include <rpc/safemode.h> |
21 | 20 | #include <rpc/server.h>
|
22 | 21 | #include <rpc/util.h>
|
23 | 22 | #include <script/sign.h>
|
@@ -525,8 +524,6 @@ UniValue sendtoaddress(const JSONRPCRequest& request)
|
525 | 524 | + HelpExampleRpc("sendtoaddress", "\"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\", 0.1, \"donation\", \"seans outpost\"")
|
526 | 525 | );
|
527 | 526 |
|
528 |
| - ObserveSafeMode(); |
529 |
| - |
530 | 527 | // Make sure the results are valid at least up to the most recent block
|
531 | 528 | // the user could have gotten from another RPC command prior to now
|
532 | 529 | pwallet->BlockUntilSyncedToCurrentChain();
|
@@ -607,8 +604,6 @@ UniValue listaddressgroupings(const JSONRPCRequest& request)
|
607 | 604 | + HelpExampleRpc("listaddressgroupings", "")
|
608 | 605 | );
|
609 | 606 |
|
610 |
| - ObserveSafeMode(); |
611 |
| - |
612 | 607 | // Make sure the results are valid at least up to the most recent block
|
613 | 608 | // the user could have gotten from another RPC command prior to now
|
614 | 609 | pwallet->BlockUntilSyncedToCurrentChain();
|
@@ -724,8 +719,6 @@ UniValue getreceivedbyaddress(const JSONRPCRequest& request)
|
724 | 719 | + HelpExampleRpc("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX\", 6")
|
725 | 720 | );
|
726 | 721 |
|
727 |
| - ObserveSafeMode(); |
728 |
| - |
729 | 722 | // Make sure the results are valid at least up to the most recent block
|
730 | 723 | // the user could have gotten from another RPC command prior to now
|
731 | 724 | pwallet->BlockUntilSyncedToCurrentChain();
|
@@ -798,8 +791,6 @@ UniValue getreceivedbylabel(const JSONRPCRequest& request)
|
798 | 791 | + HelpExampleRpc("getreceivedbylabel", "\"tabby\", 6")
|
799 | 792 | );
|
800 | 793 |
|
801 |
| - ObserveSafeMode(); |
802 |
| - |
803 | 794 | // Make sure the results are valid at least up to the most recent block
|
804 | 795 | // the user could have gotten from another RPC command prior to now
|
805 | 796 | pwallet->BlockUntilSyncedToCurrentChain();
|
@@ -879,8 +870,6 @@ UniValue getbalance(const JSONRPCRequest& request)
|
879 | 870 | + HelpExampleRpc("getbalance", "\"*\", 6")
|
880 | 871 | );
|
881 | 872 |
|
882 |
| - ObserveSafeMode(); |
883 |
| - |
884 | 873 | // Make sure the results are valid at least up to the most recent block
|
885 | 874 | // the user could have gotten from another RPC command prior to now
|
886 | 875 | pwallet->BlockUntilSyncedToCurrentChain();
|
@@ -933,8 +922,6 @@ UniValue getunconfirmedbalance(const JSONRPCRequest &request)
|
933 | 922 | "getunconfirmedbalance\n"
|
934 | 923 | "Returns the server's total unconfirmed balance\n");
|
935 | 924 |
|
936 |
| - ObserveSafeMode(); |
937 |
| - |
938 | 925 | // Make sure the results are valid at least up to the most recent block
|
939 | 926 | // the user could have gotten from another RPC command prior to now
|
940 | 927 | pwallet->BlockUntilSyncedToCurrentChain();
|
@@ -980,7 +967,6 @@ UniValue movecmd(const JSONRPCRequest& request)
|
980 | 967 | + HelpExampleRpc("move", "\"timotei\", \"akiko\", 0.01, 6, \"happy birthday!\"")
|
981 | 968 | );
|
982 | 969 |
|
983 |
| - ObserveSafeMode(); |
984 | 970 | LOCK2(cs_main, pwallet->cs_wallet);
|
985 | 971 |
|
986 | 972 | std::string strFrom = LabelFromValue(request.params[0]);
|
@@ -1039,8 +1025,6 @@ UniValue sendfrom(const JSONRPCRequest& request)
|
1039 | 1025 | + HelpExampleRpc("sendfrom", "\"tabby\", \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\", 0.01, 6, \"donation\", \"seans outpost\"")
|
1040 | 1026 | );
|
1041 | 1027 |
|
1042 |
| - ObserveSafeMode(); |
1043 |
| - |
1044 | 1028 | // Make sure the results are valid at least up to the most recent block
|
1045 | 1029 | // the user could have gotten from another RPC command prior to now
|
1046 | 1030 | pwallet->BlockUntilSyncedToCurrentChain();
|
@@ -1170,8 +1154,6 @@ UniValue sendmany(const JSONRPCRequest& request)
|
1170 | 1154 |
|
1171 | 1155 | if (request.fHelp || request.params.size() < 2 || request.params.size() > 8) throw std::runtime_error(help_text);
|
1172 | 1156 |
|
1173 |
| - ObserveSafeMode(); |
1174 |
| - |
1175 | 1157 | // Make sure the results are valid at least up to the most recent block
|
1176 | 1158 | // the user could have gotten from another RPC command prior to now
|
1177 | 1159 | pwallet->BlockUntilSyncedToCurrentChain();
|
@@ -1683,8 +1665,6 @@ UniValue listreceivedbyaddress(const JSONRPCRequest& request)
|
1683 | 1665 | + HelpExampleRpc("listreceivedbyaddress", "6, true, true, \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\"")
|
1684 | 1666 | );
|
1685 | 1667 |
|
1686 |
| - ObserveSafeMode(); |
1687 |
| - |
1688 | 1668 | // Make sure the results are valid at least up to the most recent block
|
1689 | 1669 | // the user could have gotten from another RPC command prior to now
|
1690 | 1670 | pwallet->BlockUntilSyncedToCurrentChain();
|
@@ -1735,8 +1715,6 @@ UniValue listreceivedbylabel(const JSONRPCRequest& request)
|
1735 | 1715 | + HelpExampleRpc("listreceivedbylabel", "6, true, true")
|
1736 | 1716 | );
|
1737 | 1717 |
|
1738 |
| - ObserveSafeMode(); |
1739 |
| - |
1740 | 1718 | // Make sure the results are valid at least up to the most recent block
|
1741 | 1719 | // the user could have gotten from another RPC command prior to now
|
1742 | 1720 | pwallet->BlockUntilSyncedToCurrentChain();
|
@@ -1974,8 +1952,6 @@ UniValue listtransactions(const JSONRPCRequest& request)
|
1974 | 1952 | }
|
1975 | 1953 | if (request.fHelp || request.params.size() > 4) throw std::runtime_error(help_text);
|
1976 | 1954 |
|
1977 |
| - ObserveSafeMode(); |
1978 |
| - |
1979 | 1955 | // Make sure the results are valid at least up to the most recent block
|
1980 | 1956 | // the user could have gotten from another RPC command prior to now
|
1981 | 1957 | pwallet->BlockUntilSyncedToCurrentChain();
|
@@ -2088,8 +2064,6 @@ UniValue listaccounts(const JSONRPCRequest& request)
|
2088 | 2064 | + HelpExampleRpc("listaccounts", "6")
|
2089 | 2065 | );
|
2090 | 2066 |
|
2091 |
| - ObserveSafeMode(); |
2092 |
| - |
2093 | 2067 | // Make sure the results are valid at least up to the most recent block
|
2094 | 2068 | // the user could have gotten from another RPC command prior to now
|
2095 | 2069 | pwallet->BlockUntilSyncedToCurrentChain();
|
@@ -2202,8 +2176,6 @@ UniValue listsinceblock(const JSONRPCRequest& request)
|
2202 | 2176 | + HelpExampleRpc("listsinceblock", "\"000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad\", 6")
|
2203 | 2177 | );
|
2204 | 2178 |
|
2205 |
| - ObserveSafeMode(); |
2206 |
| - |
2207 | 2179 | // Make sure the results are valid at least up to the most recent block
|
2208 | 2180 | // the user could have gotten from another RPC command prior to now
|
2209 | 2181 | pwallet->BlockUntilSyncedToCurrentChain();
|
@@ -2339,8 +2311,6 @@ UniValue gettransaction(const JSONRPCRequest& request)
|
2339 | 2311 | + HelpExampleRpc("gettransaction", "\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"")
|
2340 | 2312 | );
|
2341 | 2313 |
|
2342 |
| - ObserveSafeMode(); |
2343 |
| - |
2344 | 2314 | // Make sure the results are valid at least up to the most recent block
|
2345 | 2315 | // the user could have gotten from another RPC command prior to now
|
2346 | 2316 | pwallet->BlockUntilSyncedToCurrentChain();
|
@@ -2407,8 +2377,6 @@ UniValue abandontransaction(const JSONRPCRequest& request)
|
2407 | 2377 | );
|
2408 | 2378 | }
|
2409 | 2379 |
|
2410 |
| - ObserveSafeMode(); |
2411 |
| - |
2412 | 2380 | // Make sure the results are valid at least up to the most recent block
|
2413 | 2381 | // the user could have gotten from another RPC command prior to now
|
2414 | 2382 | pwallet->BlockUntilSyncedToCurrentChain();
|
@@ -2889,7 +2857,6 @@ UniValue listlockunspent(const JSONRPCRequest& request)
|
2889 | 2857 | + HelpExampleRpc("listlockunspent", "")
|
2890 | 2858 | );
|
2891 | 2859 |
|
2892 |
| - ObserveSafeMode(); |
2893 | 2860 | LOCK2(cs_main, pwallet->cs_wallet);
|
2894 | 2861 |
|
2895 | 2862 | std::vector<COutPoint> vOutpts;
|
@@ -2968,8 +2935,6 @@ UniValue getwalletinfo(const JSONRPCRequest& request)
|
2968 | 2935 | + HelpExampleRpc("getwalletinfo", "")
|
2969 | 2936 | );
|
2970 | 2937 |
|
2971 |
| - ObserveSafeMode(); |
2972 |
| - |
2973 | 2938 | // Make sure the results are valid at least up to the most recent block
|
2974 | 2939 | // the user could have gotten from another RPC command prior to now
|
2975 | 2940 | pwallet->BlockUntilSyncedToCurrentChain();
|
@@ -3126,8 +3091,6 @@ UniValue listunspent(const JSONRPCRequest& request)
|
3126 | 3091 | + HelpExampleRpc("listunspent", "6, 9999999, [] , true, { \"minimumAmount\": 0.005 } ")
|
3127 | 3092 | );
|
3128 | 3093 |
|
3129 |
| - ObserveSafeMode(); |
3130 |
| - |
3131 | 3094 | int nMinDepth = 1;
|
3132 | 3095 | if (!request.params[0].isNull()) {
|
3133 | 3096 | RPCTypeCheckArgument(request.params[0], UniValue::VNUM);
|
@@ -3300,7 +3263,6 @@ UniValue fundrawtransaction(const JSONRPCRequest& request)
|
3300 | 3263 | + HelpExampleCli("sendrawtransaction", "\"signedtransactionhex\"")
|
3301 | 3264 | );
|
3302 | 3265 |
|
3303 |
| - ObserveSafeMode(); |
3304 | 3266 | RPCTypeCheck(request.params, {UniValue::VSTR});
|
3305 | 3267 |
|
3306 | 3268 | // Make sure the results are valid at least up to the most recent block
|
|
0 commit comments