-\feffCopyright © 2009-2015 The Bitcoin developers
+\feffCopyright © 2009-2016 The Bitcoin developers
Copyright © 2011-2012 The PPCoin Developers
Copyright © 2014 The Peerunity Developers
Copyright © 2014 The EmerCoin Developers
-Copyright © 2012-2015 The NovaCoin developers
+Copyright © 2012-2016 The NovaCoin developers
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
"block",
};
-CMessageHeader::CMessageHeader()
+CMessageHeader::CMessageHeader() : nMessageSize(std::numeric_limits<uint32_t>::max()), nChecksum(0)
{
memcpy(pchMessageStart, ::pchMessageStart, sizeof(pchMessageStart));
memset(pchCommand, 0, sizeof(pchCommand));
pchCommand[1] = 1;
- nMessageSize = std::numeric_limits<uint32_t>::max();
- nChecksum = 0;
}
-CMessageHeader::CMessageHeader(const char* pszCommand, unsigned int nMessageSizeIn)
+CMessageHeader::CMessageHeader(const char* pszCommand, unsigned int nMessageSizeIn) : nMessageSize(nMessageSizeIn), nChecksum(0)
{
memcpy(pchMessageStart, ::pchMessageStart, sizeof(pchMessageStart));
strncpy(pchCommand, pszCommand, COMMAND_SIZE);
- nMessageSize = nMessageSizeIn;
- nChecksum = 0;
}
std::string CMessageHeader::GetCommand() const
return true;
}
-
-
-CAddress::CAddress() : CService()
-{
- Init();
-}
-
-CAddress::CAddress(CService ipIn, uint64_t nServicesIn) : CService(ipIn)
-{
- Init();
- nServices = nServicesIn;
-}
-
-void CAddress::Init()
-{
- nServices = NODE_NETWORK;
- nTime = 100000000;
- nLastTry = 0;
-}
-
-CInv::CInv()
-{
- type = 0;
- hash = 0;
-}
-
-CInv::CInv(int typeIn, const uint256& hashIn)
-{
- type = typeIn;
- hash = hashIn;
-}
-
-CInv::CInv(const std::string& strType, const uint256& hashIn)
+CAddress::CAddress() : CService(), nServices(NODE_NETWORK), nTime(100000000), nLastTry(0) { }
+CAddress::CAddress(CService ipIn, uint64_t nServicesIn) : CService(ipIn), nServices(nServicesIn), nTime(100000000), nLastTry(0) { }
+CInv::CInv() : type(0), hash(0) { }
+CInv::CInv(int typeIn, const uint256& hashIn) : type(typeIn), hash(hashIn) { }
+CInv::CInv(const std::string& strType, const uint256& hashIn) : hash(hashIn)
{
unsigned int i;
for (i = 1; i < ARRAYLEN(ppszTypeName); i++)
}
if (i == ARRAYLEN(ppszTypeName))
throw std::out_of_range(strprintf("CInv::CInv(string, uint256) : unknown type '%s'", strType.c_str()));
- hash = hashIn;
}
bool operator<(const CInv& a, const CInv& b)
extern bool fTestNet;
static inline unsigned short GetDefaultPort(const bool testnet = fTestNet)
{
- return testnet ? 17777 : 7777;
+ return static_cast<unsigned short>(testnet ? 17777 : 7777);
}
CAddress();
explicit CAddress(CService ipIn, uint64_t nServicesIn=NODE_NETWORK);
- void Init();
-
IMPLEMENT_SERIALIZE
(
CAddress* pthis = const_cast<CAddress*>(this);
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="text">
- <string>Copyright © 2009-2015 The Bitcoin developers
+ <string>Copyright © 2009-2016 The Bitcoin developers
Copyright © 2011-2012 The PPCoin Developers
Copyright © 2014 The Peerunity Developers
Copyright © 2014 The EmerCoin Developers
-Copyright © 2012-2015 The NovaCoin developers</string>
+Copyright © 2012-2016 The NovaCoin developers</string>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</message>
<message>
<location filename="../forms/aboutdialog.ui" line="97"/>
- <source>Copyright © 2009-2015 The Bitcoin developers
+ <source>Copyright © 2009-2016 The Bitcoin developers
Copyright © 2011-2012 The PPCoin Developers
Copyright © 2014 The Peerunity Developers
Copyright © 2014 The EmerCoin Developers
-Copyright © 2012-2015 The NovaCoin developers</source>
- <translation>Copyright © 2009-2015 The Bitcoin developers
+Copyright © 2012-2016 The NovaCoin developers</source>
+ <translation>Copyright © 2009-2016 The Bitcoin developers
Copyright © 2011-2012 The PPCoin Developers
Copyright © 2014 The Peerunity Developers
Copyright © 2014 The EmerCoin Developers
-Copyright © 2012-2015 The NovaCoin developers</translation>
+Copyright © 2012-2016 The NovaCoin developers</translation>
</message>
<message>
<location filename="../forms/aboutdialog.ui" line="114"/>
</message>
<message>
<location filename="../forms/aboutdialog.ui" line="97"/>
- <source>Copyright © 2009-2015 The Bitcoin developers
+ <source>Copyright © 2009-2016 The Bitcoin developers
Copyright © 2011-2012 The PPCoin Developers
Copyright © 2014 The Peerunity Developers
Copyright © 2014 The EmerCoin Developers
-Copyright © 2012-2015 The NovaCoin developers</source>
- <translation>Все права защищены © 2009-2015 Разработчики Bitcoin
+Copyright © 2012-2016 The NovaCoin developers</source>
+ <translation>Все права защищены © 2009-2016 Разработчики Bitcoin
Все права защищены © 2011-2012 Разработчики PPCoin
Все права защищены © 2014 Разработчики Peerunity
Все права защищены © 2014 Разработчики EmerCoin
-Все права защищены © 2012-2015 Разработчики NovaCoin</translation>
+Все права защищены © 2012-2016 Разработчики NovaCoin</translation>
</message>
<message>
<location filename="../forms/aboutdialog.ui" line="114"/>
</message>
<message>
<location filename="../forms/aboutdialog.ui" line="97"/>
- <source>Copyright © 2009-2015 The Bitcoin developers
+ <source>Copyright © 2009-2016 The Bitcoin developers
Copyright © 2011-2012 The PPCoin Developers
Copyright © 2014 The Peerunity Developers
Copyright © 2014 The EmerCoin Developers
-Copyright © 2012-2015 The NovaCoin developers</source>
- <translation>© 2009-2015 Розробники Bitcoin
+Copyright © 2012-2016 The NovaCoin developers</source>
+ <translation>© 2009-2016 Розробники Bitcoin
© 2011-2012 Розробники PPCoin
© 2014 Розробники Peerunity
© 2014 Розробники EmerCoin
-© 2012-2015 Розробники NovaCoin</translation>
+© 2012-2016 Розробники NovaCoin</translation>
</message>
<message>
<location filename="../forms/aboutdialog.ui" line="114"/>
}
-bool Sign1(const CKeyID& address, const CKeyStore& keystore, uint256 hash, int nHashType, CScript& scriptSigRet)
+bool Sign1(const CKeyID& address, const CKeyStore& keystore, const uint256& hash, int nHashType, CScript& scriptSigRet)
{
CKey key;
if (!keystore.GetKey(address, key))
return true;
}
-bool SignN(const vector<valtype>& multisigdata, const CKeyStore& keystore, uint256 hash, int nHashType, CScript& scriptSigRet)
+bool SignN(const vector<valtype>& multisigdata, const CKeyStore& keystore, const uint256& hash, int nHashType, CScript& scriptSigRet)
{
int nSigned = 0;
int nRequired = multisigdata.front()[0];
// unless whichTypeRet is TX_SCRIPTHASH, in which case scriptSigRet is the redemption script.
// Returns false if scriptPubKey could not be completely satisfied.
//
-bool Solver(const CKeyStore& keystore, const CScript& scriptPubKey, uint256 hash, int nHashType,
+bool Solver(const CKeyStore& keystore, const CScript& scriptPubKey, const uint256& hash, int nHashType,
CScript& scriptSigRet, txnouttype& whichTypeRet)
{
scriptSigRet.clear();
return result;
}
-static CScript CombineMultisig(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn,
+static CScript CombineMultisig(const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn,
const vector<valtype>& vSolutions,
vector<valtype>& sigs1, vector<valtype>& sigs2)
{
return result;
}
-static CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn,
+static CScript CombineSignatures(const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn,
const txnouttype txType, const vector<valtype>& vSolutions,
vector<valtype>& sigs1, vector<valtype>& sigs2)
{
return CScript();
}
-CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn,
+CScript CombineSignatures(const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn,
const CScript& scriptSig1, const CScript& scriptSig2)
{
txnouttype txType;
// Given two sets of signatures for scriptPubKey, possibly with OP_0 placeholders,
// combine them intelligently and return the result.
-CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn, const CScript& scriptSig1, const CScript& scriptSig2);
+CScript CombineSignatures(const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, const CScript& scriptSig1, const CScript& scriptSig2);
#endif