aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKamil Domanski <kdomanski@kdemail.net>2014-05-06 14:58:43 +0200
committerKamil Domanski <kdomanski@kdemail.net>2014-05-13 11:42:00 +0200
commitd56e30ca898469cf5988b0fc9847ec79b43be49c (patch)
tree91e3b06618e0aa222197fa854648d2a939b469d6 /src
parent3e74ac22d5298f3259115848db5ac96e00d74e4a (diff)
removed a few unnecessary casts
Diffstat (limited to 'src')
-rw-r--r--src/rpcblockchain.cpp4
-rw-r--r--src/rpcmisc.cpp6
-rw-r--r--src/rpcnet.cpp18
-rw-r--r--src/rpcwallet.cpp8
4 files changed, 18 insertions, 18 deletions
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 0a0fff41d7..a303b5d3ef 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -64,7 +64,7 @@ Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex)
BOOST_FOREACH(const CTransaction&tx, block.vtx)
txs.push_back(tx.GetHash().GetHex());
result.push_back(Pair("tx", txs));
- result.push_back(Pair("time", (int64_t)block.GetBlockTime()));
+ result.push_back(Pair("time", 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)));
@@ -175,7 +175,7 @@ Value getrawmempool(const Array& params, bool fHelp)
Object info;
info.push_back(Pair("size", (int)e.GetTxSize()));
info.push_back(Pair("fee", ValueFromAmount(e.GetFee())));
- info.push_back(Pair("time", (int64_t)e.GetTime()));
+ info.push_back(Pair("time", e.GetTime()));
info.push_back(Pair("height", (int)e.GetHeight()));
info.push_back(Pair("startingpriority", e.GetPriority(e.GetHeight())));
info.push_back(Pair("currentpriority", e.GetPriority(chainActive.Height())));
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 0dd98fd765..27d6d61a36 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -69,18 +69,18 @@ Value getinfo(const Array& params, bool fHelp)
}
#endif
obj.push_back(Pair("blocks", (int)chainActive.Height()));
- obj.push_back(Pair("timeoffset", (int64_t)GetTimeOffset()));
+ obj.push_back(Pair("timeoffset", GetTimeOffset()));
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", (double)GetDifficulty()));
obj.push_back(Pair("testnet", TestNet()));
#ifdef ENABLE_WALLET
if (pwalletMain) {
- obj.push_back(Pair("keypoololdest", (int64_t)pwalletMain->GetOldestKeyPoolTime()));
+ obj.push_back(Pair("keypoololdest", pwalletMain->GetOldestKeyPoolTime()));
obj.push_back(Pair("keypoolsize", (int)pwalletMain->GetKeyPoolSize()));
}
if (pwalletMain && pwalletMain->IsCrypted())
- obj.push_back(Pair("unlocked_until", (int64_t)nWalletUnlockTime));
+ obj.push_back(Pair("unlocked_until", nWalletUnlockTime));
obj.push_back(Pair("paytxfee", ValueFromAmount(nTransactionFee)));
#endif
obj.push_back(Pair("relayfee", ValueFromAmount(CTransaction::nMinRelayTxFee)));
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 1dc70840ca..024f6a09de 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -116,11 +116,11 @@ Value getpeerinfo(const Array& params, bool fHelp)
if (!(stats.addrLocal.empty()))
obj.push_back(Pair("addrlocal", stats.addrLocal));
obj.push_back(Pair("services", strprintf("%08x", stats.nServices)));
- 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("lastsend", stats.nLastSend));
+ obj.push_back(Pair("lastrecv", stats.nLastRecv));
+ obj.push_back(Pair("bytessent", stats.nSendBytes));
+ obj.push_back(Pair("bytesrecv", stats.nRecvBytes));
+ obj.push_back(Pair("conntime", stats.nTimeConnected));
obj.push_back(Pair("pingtime", stats.dPingTime));
if (stats.dPingWait > 0.0)
obj.push_back(Pair("pingwait", stats.dPingWait));
@@ -328,9 +328,9 @@ Value getnettotals(const Array& params, bool fHelp)
);
Object obj;
- 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())));
+ obj.push_back(Pair("totalbytesrecv", CNode::GetTotalBytesRecv()));
+ obj.push_back(Pair("totalbytessent", CNode::GetTotalBytesSent()));
+ obj.push_back(Pair("timemillis", GetTimeMillis()));
return obj;
}
@@ -365,7 +365,7 @@ Value getnetworkinfo(const Array& params, bool fHelp)
Object obj;
obj.push_back(Pair("version", (int)CLIENT_VERSION));
obj.push_back(Pair("protocolversion",(int)PROTOCOL_VERSION));
- obj.push_back(Pair("timeoffset", (boost::int64_t)GetTimeOffset()));
+ obj.push_back(Pair("timeoffset", GetTimeOffset()));
obj.push_back(Pair("connections", (int)vNodes.size()));
obj.push_back(Pair("proxy", (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string())));
obj.push_back(Pair("relayfee", ValueFromAmount(CTransaction::nMinRelayTxFee)));
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index c61035ab35..a8f267d7fc 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -57,7 +57,7 @@ void WalletTxToJSON(const CWalletTx& wtx, Object& entry)
BOOST_FOREACH(const uint256& conflict, wtx.GetConflicts())
conflicts.push_back(conflict.GetHex());
entry.push_back(Pair("walletconflicts", conflicts));
- entry.push_back(Pair("time", (int64_t)wtx.GetTxTime()));
+ entry.push_back(Pair("time", 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));
@@ -1167,7 +1167,7 @@ void AcentryToJSON(const CAccountingEntry& acentry, const string& strAccount, Ar
Object entry;
entry.push_back(Pair("account", acentry.strAccount));
entry.push_back(Pair("category", "move"));
- entry.push_back(Pair("time", (int64_t)acentry.nTime));
+ entry.push_back(Pair("time", acentry.nTime));
entry.push_back(Pair("amount", ValueFromAmount(acentry.nCreditDebit)));
entry.push_back(Pair("otheraccount", acentry.strOtherAccount));
entry.push_back(Pair("comment", acentry.strComment));
@@ -1912,9 +1912,9 @@ Value getwalletinfo(const Array& params, bool fHelp)
obj.push_back(Pair("walletversion", pwalletMain->GetVersion()));
obj.push_back(Pair("balance", ValueFromAmount(pwalletMain->GetBalance())));
obj.push_back(Pair("txcount", (int)pwalletMain->mapWallet.size()));
- obj.push_back(Pair("keypoololdest", (int64_t)pwalletMain->GetOldestKeyPoolTime()));
+ obj.push_back(Pair("keypoololdest", pwalletMain->GetOldestKeyPoolTime()));
obj.push_back(Pair("keypoolsize", (int)pwalletMain->GetKeyPoolSize()));
if (pwalletMain->IsCrypted())
- obj.push_back(Pair("unlocked_until", (int64_t)nWalletUnlockTime));
+ obj.push_back(Pair("unlocked_until", nWalletUnlockTime));
return obj;
}