mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-16 18:39:18 +00:00
Merge branch '0.5.x' into 0.6.0.x
Conflicts: src/main.cpp src/serialize.h
This commit is contained in:
commit
a1a5a89063
@ -90,7 +90,7 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) {
|
||||
QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wno-strict-aliasing -Wno-invalid-offsetof -Wno-unused-variable -Wno-unused-parameter -Wno-sign-compare -Wno-char-subscripts -Wno-unused-value -Wno-sequence-point -Wno-parentheses -Wno-unknown-pragmas -Wno-switch
|
||||
|
||||
# Input
|
||||
DEPENDPATH += src/qt src src json/include
|
||||
DEPENDPATH += src src/json src/qt
|
||||
HEADERS += src/qt/bitcoingui.h \
|
||||
src/qt/transactiontablemodel.h \
|
||||
src/qt/addresstablemodel.h \
|
||||
@ -261,7 +261,7 @@ PRE_TARGETDEPS += compiler_TSQM_make_all
|
||||
|
||||
# "Other files" to show in Qt Creator
|
||||
OTHER_FILES += \
|
||||
doc/*.rst doc/*.txt doc/README README.md
|
||||
doc/*.rst doc/*.txt doc/README README.md res/bitcoin-qt.rc
|
||||
|
||||
# platform specific defaults, if not overridden on command line
|
||||
isEmpty(BOOST_LIB_SUFFIX) {
|
||||
|
||||
20
src/main.cpp
20
src/main.cpp
@ -1659,6 +1659,26 @@ bool CBlock::CheckBlock() const
|
||||
if (!tx.CheckTransaction())
|
||||
return DoS(tx.nDoS, error("CheckBlock() : CheckTransaction failed"));
|
||||
|
||||
// Check for duplicate txids. This is caught by ConnectInputs(),
|
||||
// but catching it earlier avoids a potential DoS attack:
|
||||
set<uint256> uniqueTx;
|
||||
BOOST_FOREACH(const CTransaction& tx, vtx)
|
||||
{
|
||||
uniqueTx.insert(tx.GetHash());
|
||||
}
|
||||
if (uniqueTx.size() != vtx.size())
|
||||
return DoS(100, error("CheckBlock() : duplicate transaction"));
|
||||
|
||||
// Check for duplicate txids. This is caught by ConnectInputs(),
|
||||
// but catching it earlier avoids a potential DoS attack:
|
||||
set<uint256> uniqueTx;
|
||||
BOOST_FOREACH(const CTransaction& tx, vtx)
|
||||
{
|
||||
uniqueTx.insert(tx.GetHash());
|
||||
}
|
||||
if (uniqueTx.size() != vtx.size())
|
||||
return error("CheckBlock() : duplicate transaction");
|
||||
|
||||
int nSigOps = 0;
|
||||
BOOST_FOREACH(const CTransaction& tx, vtx)
|
||||
{
|
||||
|
||||
@ -1234,8 +1234,6 @@ public:
|
||||
int nType;
|
||||
int nVersion;
|
||||
|
||||
typedef FILE element_type;
|
||||
|
||||
CAutoFile(FILE* filenew=NULL, int nTypeIn=SER_DISK, int nVersionIn=PROTOCOL_VERSION)
|
||||
{
|
||||
file = filenew;
|
||||
|
||||
@ -237,7 +237,7 @@ inline int OutputDebugStringF(const char* pszFormat, ...)
|
||||
*pend = '\0';
|
||||
char* p1 = pszBuffer;
|
||||
char* p2;
|
||||
while (p2 = strchr(p1, '\n'))
|
||||
while ((p2 = strchr(p1, '\n')))
|
||||
{
|
||||
p2++;
|
||||
char c = *p2;
|
||||
|
||||
@ -203,7 +203,6 @@ public:
|
||||
}
|
||||
|
||||
int LoadWallet(bool& fFirstRunRet);
|
||||
// bool BackupWallet(const std::string& strDest);
|
||||
|
||||
bool SetAddressBookName(const CBitcoinAddress& address, const std::string& strName);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user