strStatusBar.c_str());
}
-void CUnsignedAlert::print() const
-{
- printf("%s", ToString().c_str());
-}
-
void CAlert::SetNull()
{
CUnsignedAlert::SetNull();
void SetNull();
std::string ToString() const;
- void print() const;
};
/** An alert is a combination of a serialized CUnsignedAlert and a signature. */
nVersion,
hashCheckpoint.ToString().c_str());
}
-
- void print() const
- {
- printf("%s", ToString().c_str());
- }
};
class CSyncCheckpoint : public CUnsignedSyncCheckpoint
CDataStream ssValue((char*)datValue.get_data(), (char*)datValue.get_data() + datValue.get_size(), SER_DISK, CLIENT_VERSION);
ssValue >> value;
}
- catch (std::exception &e) {
- (void)e;
+ catch (const std::exception&) {
return false;
}
strLoadError = _("Error loading block database");
break;
}
- } catch(std::exception &e) {
- (void)e;
+ } catch(const std::exception&) {
strLoadError = _("Error opening block database");
break;
}
return nSigOps;
}
-
int CMerkleTx::SetMerkleBranch(const CBlock* pblock)
{
if (fClient)
else
{
CBlock blockTmp;
- if (pblock == NULL)
- {
- // Load the block this tx is in
- CTxIndex txindex;
- if (!CTxDB("r").ReadTxIndex(GetHash(), txindex))
- return 0;
- if (!blockTmp.ReadFromDisk(txindex.pos.nFile, txindex.pos.nBlockPos))
- return 0;
- pblock = &blockTmp;
- }
// Update the tx's hashBlock
hashBlock = pblock->GetHash();
map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hashBlock);
if (mi == mapBlockIndex.end())
return 0;
- CBlockIndex* pindex = (*mi).second;
+ const CBlockIndex* pindex = (*mi).second;
if (!pindex || !pindex->IsInMainChain())
return 0;
return pindexBest->nHeight - pindex->nHeight + 1;
}
-
-
-
-
-
-
bool CTransaction::CheckTransaction() const
{
// Basic checks that don't depend on any context
try {
filein >> *this;
}
- catch (std::exception &e) {
- (void)e;
+ catch (const std::exception&) {
return error("%s() : deserialize or I/O error", BOOST_CURRENT_FUNCTION);
}
)
- int SetMerkleBranch(const CBlock* pblock=NULL);
+ int SetMerkleBranch(const CBlock* pblock);
int GetDepthInMainChain(CBlockIndex* &pindexRet) const;
int GetDepthInMainChain() const { CBlockIndex *pindexRet; return GetDepthInMainChain(pindexRet); }
bool IsInMainChain() const { return GetDepthInMainChain() > 0; }
try {
filein >> *this;
}
- catch (std::exception &e) {
- (void)e;
+ catch (const std::exception&) {
return error("%s() : deserialize or I/O error", BOOST_CURRENT_FUNCTION);
}
ptx = ptxIn;
dPriority = dFeePerKb = 0;
}
-
- void print() const
- {
- printf("COrphan(hash=%s, dPriority=%.1f, dFeePerKb=%.1f)\n",
- ptx->GetHash().ToString().substr(0,10).c_str(), dPriority, dFeePerKb);
- BOOST_FOREACH(uint256 hash, setDependsOn)
- printf(" setDependsOn %s\n", hash.ToString().substr(0,10).c_str());
- }
};
return nRet;
}
-void CNetAddr::print() const
-{
- printf("CNetAddr(%s)\n", ToString().c_str());
-}
-
// private extensions to enum Network, only returned by GetExtNetwork,
// and only used in GetReachabilityFrom
static const int NET_UNKNOWN = NET_MAX + 0;
return ToStringIPPort();
}
-void CService::print() const
-{
- printf("CService(%s)\n", ToString().c_str());
-}
-
void CService::SetPort(unsigned short portIn)
{
port = portIn;
bool GetInAddr(struct in_addr* pipv4Addr) const;
std::vector<unsigned char> GetGroup() const;
int GetReachabilityFrom(const CNetAddr *paddrPartner = NULL) const;
- void print() const;
#ifdef USE_IPV6
CNetAddr(const struct in6_addr& pipv6Addr);
std::string ToString() const;
std::string ToStringPort() const;
std::string ToStringIPPort() const;
- void print() const;
#ifdef USE_IPV6
CService(const struct in6_addr& ipv6Addr, uint16_t port);
std::string CInv::ToString() const
{
return strprintf("%s %s", GetCommand(), hash.ToString().substr(0,20).c_str());
-}
-
-void CInv::print() const
-{
- printf("CInv(%s)\n", ToString().c_str());
-}
-
+}
\ No newline at end of file
READWRITE(*pip);
)
- void print() const;
-
// TODO: make private (improves encapsulation)
public:
uint64_t nServices;
bool IsKnownType() const;
const char* GetCommand() const;
std::string ToString() const;
- void print() const;
// TODO: make private (improves encapsulation)
public:
{
ss >> tx;
}
- catch(std::exception &e)
+ catch(const std::exception&)
{
- (void)e;
return;
}
{
ss >> tx;
}
- catch(std::exception &e)
+ catch(const std::exception&)
{
- (void)e;
return;
}
CTransaction mergedTx(tx);
{
ssData >> tx;
}
- catch(std::exception &e)
+ catch(const std::exception&)
{
- (void)e;
return;
}
uint256 txHash = tx.GetHash();
SER_DISK, CLIENT_VERSION);
ssValue >> value;
}
- catch (std::exception &e) {
- (void)e;
+ catch (const std::exception&) {
return false;
}
return true;
{
return strprintf("COutput(%s, %d, %d, %d) [%s]", tx->GetHash().ToString().substr(0,10).c_str(), i, fSpendable, nDepth, FormatMoney(tx->vout[i].nValue).c_str());
}
-
- void print() const
- {
- printf("%s\n", ToString().c_str());
- }
};
}
pcursor->close();
}
- catch (boost::thread_interrupted) {
+ catch (const boost::thread_interrupted&) {
throw;
}
catch (...) {