This check is excessive since we don't support walletless mode for now.
[novacoin.git] / src / rpcwallet.cpp
index d966245..ef9276c 100644 (file)
@@ -88,8 +88,8 @@ Value getinfo(const Array& params, bool fHelp)
     auto nNtpOffset = GetNtpOffset(),
             nP2POffset = GetNodesOffset();
 
-    timestamping.push_back(Pair("ntpoffset", nNtpOffset != INT64_MAX ? nNtpOffset : Value::null));
-    timestamping.push_back(Pair("p2poffset", nP2POffset != INT64_MAX ? nP2POffset : Value::null));
+    timestamping.push_back(Pair("ntpoffset", nNtpOffset != numeric_limits<int64_t>::max() ? nNtpOffset : Value::null));
+    timestamping.push_back(Pair("p2poffset", nP2POffset != numeric_limits<int64_t>::max() ? nP2POffset : Value::null));
 
     obj.push_back(Pair("timestamping", timestamping));
 
@@ -790,7 +790,7 @@ Value sendmany(const Array& params, bool fHelp)
 
         totalAmount += nAmount;
 
-        vecSend.push_back(make_pair(scriptPubKey, nAmount));
+        vecSend.push_back({ scriptPubKey, nAmount });
     }
 
     EnsureWalletIsUnlocked();
@@ -1754,7 +1754,7 @@ Value validateaddress(const Array& params, bool fHelp)
             auto currentAddress = address.ToString();
             auto dest = address.Get();
             ret.push_back(Pair("address", currentAddress));
-            auto mine = pwalletMain ? IsMine(*pwalletMain, address) : MINE_NO;
+            auto mine = IsMine(*pwalletMain, address);
             ret.push_back(Pair("ismine", mine != MINE_NO));
             if (mine != MINE_NO) {
                 ret.push_back(Pair("watchonly", mine == MINE_WATCH_ONLY));