if (strMethod == "mergecoins" && n > 1) ConvertTo<double>(params[1]);
if (strMethod == "mergecoins" && n > 2) ConvertTo<double>(params[2]);
if (strMethod == "settxfee" && n > 0) ConvertTo<double>(params[0]);
- if (strMethod == "getreceivedbyaddress" && n > 1) ConvertTo<boost::int64_t>(params[1]);
- if (strMethod == "getreceivedbyaccount" && n > 1) ConvertTo<boost::int64_t>(params[1]);
- if (strMethod == "listreceivedbyaddress" && n > 0) ConvertTo<boost::int64_t>(params[0]);
+ if (strMethod == "getreceivedbyaddress" && n > 1) ConvertTo<int64_t>(params[1]);
+ if (strMethod == "getreceivedbyaccount" && n > 1) ConvertTo<int64_t>(params[1]);
+ if (strMethod == "listreceivedbyaddress" && n > 0) ConvertTo<int64_t>(params[0]);
if (strMethod == "listreceivedbyaddress" && n > 1) ConvertTo<bool>(params[1]);
- if (strMethod == "listreceivedbyaccount" && n > 0) ConvertTo<boost::int64_t>(params[0]);
+ if (strMethod == "listreceivedbyaccount" && n > 0) ConvertTo<int64_t>(params[0]);
if (strMethod == "listreceivedbyaccount" && n > 1) ConvertTo<bool>(params[1]);
- if (strMethod == "getbalance" && n > 1) ConvertTo<boost::int64_t>(params[1]);
+ if (strMethod == "getbalance" && n > 1) ConvertTo<int64_t>(params[1]);
if (strMethod == "getblock" && n > 1) ConvertTo<bool>(params[1]);
- if (strMethod == "getblockbynumber" && n > 0) ConvertTo<boost::int64_t>(params[0]);
+ if (strMethod == "getblockbynumber" && n > 0) ConvertTo<int64_t>(params[0]);
if (strMethod == "getblockbynumber" && n > 1) ConvertTo<bool>(params[1]);
- if (strMethod == "getblockhash" && n > 0) ConvertTo<boost::int64_t>(params[0]);
+ if (strMethod == "getblockhash" && n > 0) ConvertTo<int64_t>(params[0]);
if (strMethod == "move" && n > 2) ConvertTo<double>(params[2]);
- if (strMethod == "move" && n > 3) ConvertTo<boost::int64_t>(params[3]);
+ if (strMethod == "move" && n > 3) ConvertTo<int64_t>(params[3]);
if (strMethod == "sendfrom" && n > 2) ConvertTo<double>(params[2]);
- if (strMethod == "sendfrom" && n > 3) ConvertTo<boost::int64_t>(params[3]);
- if (strMethod == "listtransactions" && n > 1) ConvertTo<boost::int64_t>(params[1]);
- if (strMethod == "listtransactions" && n > 2) ConvertTo<boost::int64_t>(params[2]);
- if (strMethod == "listaccounts" && n > 0) ConvertTo<boost::int64_t>(params[0]);
- if (strMethod == "walletpassphrase" && n > 1) ConvertTo<boost::int64_t>(params[1]);
+ if (strMethod == "sendfrom" && n > 3) ConvertTo<int64_t>(params[3]);
+ if (strMethod == "listtransactions" && n > 1) ConvertTo<int64_t>(params[1]);
+ if (strMethod == "listtransactions" && n > 2) ConvertTo<int64_t>(params[2]);
+ if (strMethod == "listaccounts" && n > 0) ConvertTo<int64_t>(params[0]);
+ if (strMethod == "walletpassphrase" && n > 1) ConvertTo<int64_t>(params[1]);
if (strMethod == "walletpassphrase" && n > 2) ConvertTo<bool>(params[2]);
if (strMethod == "getblocktemplate" && n > 0) ConvertTo<Object>(params[0]);
- if (strMethod == "listsinceblock" && n > 1) ConvertTo<boost::int64_t>(params[1]);
+ if (strMethod == "listsinceblock" && n > 1) ConvertTo<int64_t>(params[1]);
if (strMethod == "scaninput" && n > 1) ConvertTo<int>(params[1]);
if (strMethod == "scaninput" && n > 2) ConvertTo<double>(params[2]);
if (strMethod == "scaninput" && n > 3) ConvertTo<int>(params[3]);
- if (strMethod == "sendalert" && n > 2) ConvertTo<boost::int64_t>(params[2]);
- if (strMethod == "sendalert" && n > 3) ConvertTo<boost::int64_t>(params[3]);
- if (strMethod == "sendalert" && n > 4) ConvertTo<boost::int64_t>(params[4]);
- if (strMethod == "sendalert" && n > 5) ConvertTo<boost::int64_t>(params[5]);
- if (strMethod == "sendalert" && n > 6) ConvertTo<boost::int64_t>(params[6]);
+ if (strMethod == "sendalert" && n > 2) ConvertTo<int64_t>(params[2]);
+ if (strMethod == "sendalert" && n > 3) ConvertTo<int64_t>(params[3]);
+ if (strMethod == "sendalert" && n > 4) ConvertTo<int64_t>(params[4]);
+ if (strMethod == "sendalert" && n > 5) ConvertTo<int64_t>(params[5]);
+ if (strMethod == "sendalert" && n > 6) ConvertTo<int64_t>(params[6]);
if (strMethod == "sendmany" && n > 1) ConvertTo<Object>(params[1]);
- if (strMethod == "sendmany" && n > 2) ConvertTo<boost::int64_t>(params[2]);
+ if (strMethod == "sendmany" && n > 2) ConvertTo<int64_t>(params[2]);
if (strMethod == "reservebalance" && n > 0) ConvertTo<bool>(params[0]);
if (strMethod == "reservebalance" && n > 1) ConvertTo<double>(params[1]);
- if (strMethod == "addmultisigaddress" && n > 0) ConvertTo<boost::int64_t>(params[0]);
+ if (strMethod == "addmultisigaddress" && n > 0) ConvertTo<int64_t>(params[0]);
if (strMethod == "addmultisigaddress" && n > 1) ConvertTo<Array>(params[1]);
- if (strMethod == "listunspent" && n > 0) ConvertTo<boost::int64_t>(params[0]);
- if (strMethod == "listunspent" && n > 1) ConvertTo<boost::int64_t>(params[1]);
+ if (strMethod == "listunspent" && n > 0) ConvertTo<int64_t>(params[0]);
+ if (strMethod == "listunspent" && n > 1) ConvertTo<int64_t>(params[1]);
if (strMethod == "listunspent" && n > 2) ConvertTo<Array>(params[2]);
- if (strMethod == "getrawtransaction" && n > 1) ConvertTo<boost::int64_t>(params[1]);
+ if (strMethod == "getrawtransaction" && n > 1) ConvertTo<int64_t>(params[1]);
if (strMethod == "createrawtransaction" && n > 0) ConvertTo<Array>(params[0]);
if (strMethod == "createrawtransaction" && n > 1) ConvertTo<Object>(params[1]);
- if (strMethod == "createmultisig" && n > 0) ConvertTo<boost::int64_t>(params[0]);
+ if (strMethod == "createmultisig" && n > 0) ConvertTo<int64_t>(params[0]);
if (strMethod == "createmultisig" && n > 1) ConvertTo<Array>(params[1]);
if (strMethod == "signrawtransaction" && n > 1) ConvertTo<Array>(params[1], true);
if (strMethod == "signrawtransaction" && n > 2) ConvertTo<Array>(params[2], true);
- if (strMethod == "keypoolrefill" && n > 0) ConvertTo<boost::int64_t>(params[0]);
- if (strMethod == "keypoolreset" && n > 0) ConvertTo<boost::int64_t>(params[0]);
+ if (strMethod == "keypoolrefill" && n > 0) ConvertTo<int64_t>(params[0]);
+ if (strMethod == "keypoolreset" && n > 0) ConvertTo<int64_t>(params[0]);
if (strMethod == "importaddress" && n > 2) ConvertTo<bool>(params[2]);
return params;
namespace json_spirit
{
- const spirit_namespace::int_parser < boost::int64_t > int64_p = spirit_namespace::int_parser < boost::int64_t >();
- const spirit_namespace::uint_parser< boost::uint64_t > uint64_p = spirit_namespace::uint_parser< boost::uint64_t >();
+ const spirit_namespace::int_parser < int64_t > int64_p = spirit_namespace::int_parser < int64_t >();
+ const spirit_namespace::uint_parser< uint64_t > uint64_p = spirit_namespace::uint_parser< uint64_t >();
template< class Iter_type >
bool is_eq( Iter_type first, Iter_type last, const char* c_str )
add_to_current( Value_type() );
}
- void new_int( boost::int64_t i )
+ void new_int( int64_t i )
{
add_to_current( i );
}
- void new_uint64( boost::uint64_t ui )
+ void new_uint64( uint64_t ui )
{
add_to_current( ui );
}
typedef boost::function< void( Char_type ) > Char_action;
typedef boost::function< void( Iter_type, Iter_type ) > Str_action;
typedef boost::function< void( double ) > Real_action;
- typedef boost::function< void( boost::int64_t ) > Int_action;
- typedef boost::function< void( boost::uint64_t ) > Uint64_action;
+ typedef boost::function< void( int64_t ) > Int_action;
+ typedef boost::function< void( uint64_t ) > Uint64_action;
Char_action begin_obj ( boost::bind( &Semantic_actions_t::begin_obj, &self.actions_, _1 ) );
Char_action end_obj ( boost::bind( &Semantic_actions_t::end_obj, &self.actions_, _1 ) );
#include <cassert>
#include <sstream>
#include <stdexcept>
-#include <boost/config.hpp>
-#include <boost/cstdint.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/variant.hpp>
+#include <boost/config.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/variant.hpp>
namespace json_spirit
{
Value_impl( const Array& value );
Value_impl( bool value );
Value_impl( int value );
- Value_impl( boost::int64_t value );
- Value_impl( boost::uint64_t value );
+ Value_impl( int64_t value );
+ Value_impl( uint64_t value );
Value_impl( double value );
Value_impl( const Value_impl& other );
typedef boost::variant< String_type,
boost::recursive_wrapper< Object >, boost::recursive_wrapper< Array >,
- bool, boost::int64_t, double > Variant;
+ bool, int64_t, double > Variant;
Value_type type_;
Variant v_;
template< class Config >
Value_impl< Config >::Value_impl( int value )
: type_( int_type )
- , v_( static_cast< boost::int64_t >( value ) )
+ , v_( static_cast< int64_t >( value ) )
, is_uint64_( false )
{
}
template< class Config >
- Value_impl< Config >::Value_impl( boost::int64_t value )
+ Value_impl< Config >::Value_impl( int64_t value )
: type_( int_type )
, v_( value )
, is_uint64_( false )
}
template< class Config >
- Value_impl< Config >::Value_impl( boost::uint64_t value )
+ Value_impl< Config >::Value_impl( uint64_t value )
: type_( int_type )
, v_( static_cast< boost::int64_t >( value ) )
, is_uint64_( true )
}
template< class Config >
- boost::int64_t Value_impl< Config >::get_int64() const
+ int64_t Value_impl< Config >::get_int64() const
{
check_type( int_type );
- return boost::get< boost::int64_t >( v_ );
+ return boost::get< int64_t >( v_ );
}
template< class Config >
- boost::uint64_t Value_impl< Config >::get_uint64() const
+ uint64_t Value_impl< Config >::get_uint64() const
{
check_type( int_type );
- return static_cast< boost::uint64_t >( get_int64() );
+ return static_cast< uint64_t >( get_int64() );
}
template< class Config >
}
template< class Value >
- boost::int64_t get_value( const Value& value, Type_to_type< boost::int64_t > )
+ int64_t get_value( const Value& value, Type_to_type< int64_t > )
{
return value.get_int64();
}
template< class Value >
- boost::uint64_t get_value( const Value& value, Type_to_type< boost::uint64_t > )
+ uint64_t get_value( const Value& value, Type_to_type< uint64_t > )
{
return value.get_uint64();
}
result.push_back(Pair("version", block.nVersion));
result.push_back(Pair("merkleroot", block.hashMerkleRoot.GetHex()));
result.push_back(Pair("mint", ValueFromAmount(blockindex->nMint)));
- result.push_back(Pair("time", (boost::int64_t)block.GetBlockTime()));
- result.push_back(Pair("nonce", (boost::uint64_t)block.nNonce));
+ result.push_back(Pair("time", (int64_t)block.GetBlockTime()));
+ result.push_back(Pair("nonce", (uint64_t)block.nNonce));
result.push_back(Pair("bits", HexBits(block.nBits)));
result.push_back(Pair("difficulty", GetDifficulty(blockindex)));
result.push_back(Pair("blocktrust", leftTrim(blockindex->GetBlockTrust().GetHex(), '0')));
obj.push_back(Pair("addr", stats.addrName));
obj.push_back(Pair("services", strprintf("%08" PRIx64, stats.nServices)));
- obj.push_back(Pair("lastsend", (boost::int64_t)stats.nLastSend));
- obj.push_back(Pair("lastrecv", (boost::int64_t)stats.nLastRecv));
- obj.push_back(Pair("bytessent", (boost::int64_t)stats.nSendBytes));
- obj.push_back(Pair("bytesrecv", (boost::int64_t)stats.nRecvBytes));
- obj.push_back(Pair("conntime", (boost::int64_t)stats.nTimeConnected));
+ obj.push_back(Pair("lastsend", (int64_t)stats.nLastSend));
+ obj.push_back(Pair("lastrecv", (int64_t)stats.nLastRecv));
+ obj.push_back(Pair("bytessent", (int64_t)stats.nSendBytes));
+ obj.push_back(Pair("bytesrecv", (int64_t)stats.nRecvBytes));
+ obj.push_back(Pair("conntime", (int64_t)stats.nTimeConnected));
obj.push_back(Pair("version", stats.nVersion));
obj.push_back(Pair("subver", stats.strSubVer));
obj.push_back(Pair("inbound", stats.fInbound));
- obj.push_back(Pair("releasetime", (boost::int64_t)stats.nReleaseTime));
+ obj.push_back(Pair("releasetime", (int64_t)stats.nReleaseTime));
obj.push_back(Pair("startingheight", stats.nStartingHeight));
obj.push_back(Pair("banscore", stats.nMisbehavior));
if (stats.fSyncNode)
"and current time.");
Object obj;
- obj.push_back(Pair("totalbytesrecv", static_cast< boost::uint64_t>(CNode::GetTotalBytesRecv())));
- obj.push_back(Pair("totalbytessent", static_cast<boost::uint64_t>(CNode::GetTotalBytesSent())));
- obj.push_back(Pair("timemillis", static_cast<boost::int64_t>(GetTimeMillis())));
+ obj.push_back(Pair("totalbytesrecv", static_cast<uint64_t>(CNode::GetTotalBytesRecv())));
+ obj.push_back(Pair("totalbytessent", static_cast<uint64_t>(CNode::GetTotalBytesSent())));
+ obj.push_back(Pair("timemillis", static_cast<int64_t>(GetTimeMillis())));
return obj;
}
\ No newline at end of file
{
entry.push_back(Pair("txid", tx.GetHash().GetHex()));
entry.push_back(Pair("version", tx.nVersion));
- entry.push_back(Pair("time", (boost::int64_t)tx.nTime));
- entry.push_back(Pair("locktime", (boost::int64_t)tx.nLockTime));
+ entry.push_back(Pair("time", (int64_t)tx.nTime));
+ entry.push_back(Pair("locktime", (int64_t)tx.nLockTime));
Array vin;
BOOST_FOREACH(const CTxIn& txin, tx.vin)
{
else
{
in.push_back(Pair("txid", txin.prevout.hash.GetHex()));
- in.push_back(Pair("vout", (boost::int64_t)txin.prevout.n));
+ in.push_back(Pair("vout", (int64_t)txin.prevout.n));
Object o;
o.push_back(Pair("asm", txin.scriptSig.ToString()));
o.push_back(Pair("hex", HexStr(txin.scriptSig.begin(), txin.scriptSig.end())));
in.push_back(Pair("scriptSig", o));
}
- in.push_back(Pair("sequence", (boost::int64_t)txin.nSequence));
+ in.push_back(Pair("sequence", (int64_t)txin.nSequence));
vin.push_back(in);
}
entry.push_back(Pair("vin", vin));
const CTxOut& txout = tx.vout[i];
Object out;
out.push_back(Pair("value", ValueFromAmount(txout.nValue)));
- out.push_back(Pair("n", (boost::int64_t)i));
+ out.push_back(Pair("n", (int64_t)i));
Object o;
ScriptPubKeyToJSON(txout.scriptPubKey, o, true);
out.push_back(Pair("scriptPubKey", o));
if (pindex->IsInMainChain())
{
entry.push_back(Pair("confirmations", 1 + nBestHeight - pindex->nHeight));
- entry.push_back(Pair("time", (boost::int64_t)pindex->nTime));
- entry.push_back(Pair("blocktime", (boost::int64_t)pindex->nTime));
+ entry.push_back(Pair("time", (int64_t)pindex->nTime));
+ entry.push_back(Pair("blocktime", (int64_t)pindex->nTime));
}
else
entry.push_back(Pair("confirmations", 0));
{
entry.push_back(Pair("blockhash", wtx.hashBlock.GetHex()));
entry.push_back(Pair("blockindex", wtx.nIndex));
- entry.push_back(Pair("blocktime", (boost::int64_t)(mapBlockIndex[wtx.hashBlock]->nTime)));
+ entry.push_back(Pair("blocktime", (int64_t)(mapBlockIndex[wtx.hashBlock]->nTime)));
}
entry.push_back(Pair("txid", wtx.GetHash().GetHex()));
- entry.push_back(Pair("time", (boost::int64_t)wtx.GetTxTime()));
- entry.push_back(Pair("timereceived", (boost::int64_t)wtx.nTimeReceived));
+ entry.push_back(Pair("time", (int64_t)wtx.GetTxTime()));
+ entry.push_back(Pair("timereceived", (int64_t)wtx.nTimeReceived));
BOOST_FOREACH(const PAIRTYPE(string,string)& item, wtx.mapValue)
entry.push_back(Pair(item.first, item.second));
}
obj.push_back(Pair("newmint", ValueFromAmount(pwalletMain->GetNewMint())));
obj.push_back(Pair("stake", ValueFromAmount(pwalletMain->GetStake())));
obj.push_back(Pair("blocks", (int)nBestHeight));
- obj.push_back(Pair("timeoffset", (boost::int64_t)GetTimeOffset()));
+ obj.push_back(Pair("timeoffset", (int64_t)GetTimeOffset()));
obj.push_back(Pair("moneysupply", ValueFromAmount(pindexBest->nMoneySupply)));
obj.push_back(Pair("connections", (int)vNodes.size()));
obj.push_back(Pair("proxy", (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string())));
obj.push_back(Pair("difficulty", diff));
obj.push_back(Pair("testnet", fTestNet));
- obj.push_back(Pair("keypoololdest", (boost::int64_t)pwalletMain->GetOldestKeyPoolTime()));
+ obj.push_back(Pair("keypoololdest", (int64_t)pwalletMain->GetOldestKeyPoolTime()));
obj.push_back(Pair("keypoolsize", (int)pwalletMain->GetKeyPoolSize()));
obj.push_back(Pair("paytxfee", ValueFromAmount(nTransactionFee)));
obj.push_back(Pair("mininput", ValueFromAmount(nMinimumInputValue)));
if (pwalletMain->IsCrypted())
- obj.push_back(Pair("unlocked_until", (boost::int64_t)nWalletUnlockTime / 1000));
+ obj.push_back(Pair("unlocked_until", (int64_t)nWalletUnlockTime / 1000));
obj.push_back(Pair("errors", GetWarnings("statusbar")));
return obj;
}
Object entry;
entry.push_back(Pair("account", acentry.strAccount));
entry.push_back(Pair("category", "move"));
- entry.push_back(Pair("time", (boost::int64_t)acentry.nTime));
+ entry.push_back(Pair("time", (int64_t)acentry.nTime));
entry.push_back(Pair("amount", ValueFromAmount(acentry.nCreditDebit)));
entry.push_back(Pair("otheraccount", acentry.strOtherAccount));
entry.push_back(Pair("comment", acentry.strComment));
req->id.id[1] &= 0x55555555;
req->id.id[2] |= 0x55555555;
req->id.id[3] &= 0x55555555;
- register char x = 20;
+ char x = 20;
do {
uint32_t s_elm = S_block[(uint8_t)randfiller];
randfiller ^= (randfiller << 5) | (randfiller >> (64 - 5));