diff options
Diffstat (limited to 'src/bitcoinrpc.cpp')
-rw-r--r-- | src/bitcoinrpc.cpp | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index f3ea0adb40..6ecb70309b 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -3,30 +3,27 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "chainparams.h" -#include "main.h" -#include "wallet.h" +#include "bitcoinrpc.h" + +#include "base58.h" #include "init.h" +#include "main.h" #include "util.h" -#include "sync.h" -#include "ui_interface.h" -#include "base58.h" -#include "bitcoinrpc.h" -#include "db.h" +#include "wallet.h" + +#include <stdint.h> #include <boost/algorithm/string.hpp> #include <boost/asio.hpp> -#include <boost/asio/ip/v6_only.hpp> #include <boost/asio/ssl.hpp> #include <boost/bind.hpp> #include <boost/filesystem.hpp> -#include <boost/filesystem/fstream.hpp> #include <boost/foreach.hpp> #include <boost/iostreams/concepts.hpp> #include <boost/iostreams/stream.hpp> #include <boost/lexical_cast.hpp> #include <boost/shared_ptr.hpp> -#include <list> +#include "json/json_spirit_writer_template.h" using namespace std; using namespace boost; @@ -89,18 +86,18 @@ void RPCTypeCheck(const Object& o, } } -int64 AmountFromValue(const Value& value) +int64_t AmountFromValue(const Value& value) { double dAmount = value.get_real(); if (dAmount <= 0.0 || dAmount > 21000000.0) throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount"); - int64 nAmount = roundint64(dAmount * COIN); + int64_t nAmount = roundint64(dAmount * COIN); if (!MoneyRange(nAmount)) throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount"); return nAmount; } -Value ValueFromAmount(int64 amount) +Value ValueFromAmount(int64_t amount) { return (double)amount / (double)COIN; } @@ -897,7 +894,7 @@ void RPCRunHandler(const boost::system::error_code& err, boost::function<void(vo func(); } -void RPCRunLater(const std::string& name, boost::function<void(void)> func, int64 nSeconds) +void RPCRunLater(const std::string& name, boost::function<void(void)> func, int64_t nSeconds) { assert(rpc_io_service != NULL); |