Skip to content

Commit 723551b

Browse files
committed
---
yaml --- svn_rev: 4662 current_ref: refs/heads/master current_commit: fe52346 head_branch: refs/heads/master migrated_from: v3
1 parent 8bf499f commit 723551b

25 files changed

+412
-672
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: cde10602a6e4cfbf10126ea9bcefb6b79175818b
2+
refs/heads/master: fe5234645036178a540fdd4166b26493b0b40529

trunk/Makefile.am

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ test_bitcoin_filtered.info: test_bitcoin.info
118118
$(LCOV) -r $< "/usr/include/*" -o $@
119119

120120
block_test.info: test_bitcoin_filtered.info
121-
$(MKDIR_P) qa/tmp
122-
-@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0
121+
-@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -Xmx2G -jar $(JAVA_COMPARISON_TOOL) 1 18444
123122
$(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@
124123
$(LCOV) -z -d $(abs_builddir)/src
125124
$(LCOV) -z -d $(abs_builddir)/src/leveldb
@@ -147,8 +146,7 @@ endif
147146

148147
if USE_COMPARISON_TOOL
149148
check-local:
150-
$(MKDIR_P) qa/tmp
151-
@qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS)
149+
@qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -Xmx2G -jar $(JAVA_COMPARISON_TOOL) 1 18444
152150
endif
153151

154152
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/pull-tester.sh $(WINDOWS_PACKAGING) $(OSX_PACKAGING)

trunk/configure.ac

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,10 @@ AC_ARG_ENABLE(tests,
6969
[use_tests=yes])
7070

7171
AC_ARG_WITH([comparison-tool],
72-
AS_HELP_STRING([--with-comparison-tool],[path to java comparison tool (requires --enable-tests)]),
72+
AS_HELP_STRING([with-comparison-tool],[path to java comparison tool (requires --enable-tests)]),
7373
[use_comparison_tool=$withval],
7474
[use_comparison_tool=no])
7575

76-
AC_ARG_ENABLE([comparison-tool-reorg-tests],
77-
AS_HELP_STRING([--enable-comparison-tool-reorg-tests],[enable expensive reorg tests in the comparison tool (default no)]),
78-
[use_comparison_tool_reorg_tests=$enableval],
79-
[use_comparison_tool_reorg_tests=no])
80-
8176
AC_ARG_WITH([qrencode],
8277
[AS_HELP_STRING([--with-qrencode],
8378
[enable QR code support (default is yes if qt is enabled and libqrencode is found)])],
@@ -240,15 +235,6 @@ if test x$use_comparison_tool != xno; then
240235
AC_SUBST(JAVA_COMPARISON_TOOL, $use_comparison_tool)
241236
fi
242237

243-
if test x$use_comparison_tool_reorg_tests != xno; then
244-
if test x$use_comparison_tool == x; then
245-
AC_MSG_ERROR("comparison tool reorg tests but comparison tool was not specified")
246-
fi
247-
AC_SUBST(COMPARISON_TOOL_REORG_TESTS, 1)
248-
else
249-
AC_SUBST(COMPARISON_TOOL_REORG_TESTS, 0)
250-
fi
251-
252238
if test x$use_lcov == xyes; then
253239
if test x$LCOV == x; then
254240
AC_MSG_ERROR("lcov testing requested but lcov not found")
@@ -692,7 +678,6 @@ AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
692678
AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes])
693679
AM_CONDITIONAL([USE_LCOV],[test x$use_lcov == xyes])
694680
AM_CONDITIONAL([USE_COMPARISON_TOOL],[test x$use_comparison_tool != xno])
695-
AM_CONDITIONAL([USE_COMPARISON_TOOL_REORG_TESTS],[test x$use_comparison_tool_reorg_test != xno])
696681

697682
AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version])
698683
AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version])

trunk/qa/pull-tester/build-tests.sh.in

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ set -o xtrace
99

1010
MINGWPREFIX=$1
1111
JAVA_COMPARISON_TOOL=$2
12-
RUN_EXPENSIVE_TESTS=$3
13-
JOBS=${4-1}
14-
OUT_DIR=${5-}
12+
JOBS=${3-1}
13+
OUT_DIR=${4-}
1514

1615
if [ $# -lt 2 ]; then
1716
echo "Usage: $0 [mingw-prefix] [java-comparison-tool] <make jobs> <save output dir>"
@@ -23,30 +22,20 @@ DISTDIR=@PACKAGE@-@VERSION@
2322
# Cross-compile for windows first (breaking the mingw/windows build is most common)
2423
cd @abs_top_srcdir@
2524
make distdir
26-
mkdir -p win32-build
27-
rsync -av $DISTDIR/ win32-build/
28-
rm -r $DISTDIR
25+
mv $DISTDIR win32-build
2926
cd win32-build
30-
31-
if [ $RUN_EXPENSIVE_TESTS = 1 ]; then
32-
./configure --disable-silent-rules --disable-ccache --prefix=$MINGWPREFIX --host=i586-mingw32msvc --with-qt-bindir=$MINGWPREFIX/host/bin --with-qt-plugindir=$MINGWPREFIX/plugins --with-qt-incdir=$MINGWPREFIX/include --with-boost=$MINGWPREFIX --with-protoc-bindir=$MINGWPREFIX/host/bin CPPFLAGS=-I$MINGWPREFIX/include LDFLAGS=-L$MINGWPREFIX/lib --with-comparison-tool="$JAVA_COMPARISON_TOOL" --enable-comparison-tool-reorg-tests
33-
else
34-
./configure --disable-silent-rules --disable-ccache --prefix=$MINGWPREFIX --host=i586-mingw32msvc --with-qt-bindir=$MINGWPREFIX/host/bin --with-qt-plugindir=$MINGWPREFIX/plugins --with-qt-incdir=$MINGWPREFIX/include --with-boost=$MINGWPREFIX --with-protoc-bindir=$MINGWPREFIX/host/bin CPPFLAGS=-I$MINGWPREFIX/include LDFLAGS=-L$MINGWPREFIX/lib
35-
fi
27+
./configure --disable-silent-rules --disable-ccache --prefix=$MINGWPREFIX --host=i586-mingw32msvc --with-qt-bindir=$MINGWPREFIX/host/bin --with-qt-plugindir=$MINGWPREFIX/plugins --with-qt-incdir=$MINGWPREFIX/include --with-boost=$MINGWPREFIX --with-protoc-bindir=$MINGWPREFIX/host/bin CPPFLAGS=-I$MINGWPREFIX/include LDFLAGS=-L$MINGWPREFIX/lib
3628
make -j$JOBS
3729

3830
# And compile for Linux:
3931
cd @abs_top_srcdir@
4032
make distdir
41-
mkdir -p linux-build
42-
rsync -av $DISTDIR/ linux-build/
43-
rm -r $DISTDIR
33+
mv $DISTDIR linux-build
4434
cd linux-build
45-
if [ $RUN_EXPENSIVE_TESTS = 1 ]; then
46-
./configure --disable-silent-rules --disable-ccache --with-comparison-tool="$JAVA_COMPARISON_TOOL" --enable-comparison-tool-reorg-tests
47-
else
48-
./configure --disable-silent-rules --disable-ccache --with-comparison-tool="$JAVA_COMPARISON_TOOL"
49-
fi
35+
# TODO: re-enable blockchain tester tool, as of 11 Oct 2013 is it not working properly
36+
# on the pull-tester machine.
37+
#./configure --disable-silent-rules --disable-ccache --with-comparison-tool="$JAVA_COMPARISON_TOOL"
38+
./configure --disable-silent-rules --disable-ccache
5039
make -j$JOBS
5140

5241
# link interesting binaries to parent out/ directory, if it exists. Do this before
@@ -68,12 +57,6 @@ fi
6857
cd @abs_top_srcdir@/linux-build
6958
make check
7059

71-
if [ $RUN_EXPENSIVE_TESTS = 1 ]; then
72-
# Run unit tests and blockchain-tester on Windows:
73-
cd @abs_top_srcdir@/win32-build
74-
make check
75-
fi
76-
7760
# Clean up builds (pull-tester machine doesn't have infinite disk space)
7861
cd @abs_top_srcdir@/linux-build
7962
make clean

trunk/qa/pull-tester/pull-tester.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,7 @@ def commentOn(commentUrl, success, inMerge, needTests, linkUrl):
6767
auth=(os.environ['GITHUB_USER'], os.environ["GITHUB_AUTH_TOKEN"]))
6868

6969
if success == True:
70-
if needTests:
71-
message = "Automatic sanity-testing: PLEASE ADD TEST-CASES, though technically passed. See " + linkUrl + " for binaries and test log."
72-
else:
73-
message = "Automatic sanity-testing: PASSED, see " + linkUrl + " for binaries and test log."
74-
75-
post_data = { "body" : message + common_message}
70+
post_data = { "body" : "Automatic sanity-testing: PASSED, see " + linkUrl + " for binaries and test log." + common_message}
7671
elif inMerge:
7772
post_data = { "body" : "Automatic sanity-testing: FAILED MERGE, see " + linkUrl + " for test log." + """
7873
@@ -118,7 +113,7 @@ def testpull(number, comment_url, clone_url, commit):
118113
run("chown -R ${BUILD_USER}:${BUILD_GROUP} ${CHROOT_COPY}/${OUT_DIR}", fail_hard=False)
119114

120115
script = os.environ["BUILD_PATH"]+"/qa/pull-tester/pull-tester.sh"
121-
script += " ${BUILD_PATH} ${MINGW_DEPS_DIR} ${SCRIPTS_DIR}/BitcoindComparisonTool_jar/BitcoindComparisonTool.jar 0 6 ${OUT_DIR}"
116+
script += " ${BUILD_PATH} ${MINGW_DEPS_DIR} ${SCRIPTS_DIR}/BitcoindComparisonTool.jar 6 ${OUT_DIR}"
122117
returncode = run("chroot ${CHROOT_COPY} sudo -u ${BUILD_USER} -H timeout ${TEST_TIMEOUT} "+script,
123118
fail_hard=False, stdout=out, stderr=out)
124119

trunk/qa/pull-tester/run-bitcoind-for-test.sh.in

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@ mkdir -p "$DATADIR"/regtest
55
touch "$DATADIR/regtest/debug.log"
66
tail -q -n 1 -F "$DATADIR/regtest/debug.log" | grep -m 1 -q "Done loading" &
77
WAITER=$!
8-
PORT=`expr $BASHPID + 10000`
9-
"@abs_top_builddir@/src/bitcoind@EXEEXT@" -connect=0.0.0.0 -datadir="$DATADIR" -rpcuser=user -rpcpassword=pass -listen -keypool=3 -debug -debug=net -logtimestamps -port=$PORT -regtest -rpcport=`expr $PORT + 1` &
8+
"@abs_top_builddir@/src/bitcoind@EXEEXT@" -connect=0.0.0.0 -datadir="$DATADIR" -rpcuser=user -rpcpassword=pass -listen -keypool=3 -debug -logtimestamps -port=18444 -regtest &
109
BITCOIND=$!
1110

1211
#Install a watchdog.
1312
(sleep 10 && kill -0 $WAITER 2>/dev/null && kill -9 $BITCOIND $$)&
1413
wait $WAITER
1514

1615
if [ -n "$TIMEOUT" ]; then
17-
timeout "$TIMEOUT"s "$@" $PORT
16+
timeout "$TIMEOUT"s "$@"
1817
RETURN=$?
1918
else
20-
"$@" $PORT
19+
"$@"
2120
RETURN=$?
2221
fi
2322

trunk/src/core.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,6 @@ class CCoins
421421

422422
// equality test
423423
friend bool operator==(const CCoins &a, const CCoins &b) {
424-
// Empty CCoins objects are always equal.
425-
if (a.IsPruned() && b.IsPruned())
426-
return true;
427424
return a.fCoinBase == b.fCoinBase &&
428425
a.nHeight == b.nHeight &&
429426
a.nVersion == b.nVersion &&

trunk/src/main.cpp

Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,6 @@ void UnregisterAllWallets()
9797
setpwalletRegistered.clear();
9898
}
9999

100-
// get the wallet transaction with the given hash (if it exists)
101-
bool static GetTransaction(const uint256& hashTx, CWalletTx& wtx)
102-
{
103-
LOCK(cs_setpwalletRegistered);
104-
BOOST_FOREACH(CWallet* pwallet, setpwalletRegistered)
105-
if (pwallet->GetTransaction(hashTx,wtx))
106-
return true;
107-
return false;
108-
}
109-
110100
// erases transaction with the given hash from all wallets
111101
void static EraseFromWallets(uint256 hash)
112102
{
@@ -1750,12 +1740,12 @@ bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex
17501740
const CTransaction &tx = block.vtx[i];
17511741
uint256 hash = tx.GetHash();
17521742

1753-
// Check that all outputs are available and match the outputs in the block itself
1754-
// exactly. Note that transactions with only provably unspendable outputs won't
1755-
// have outputs available even in the block itself, so we handle that case
1756-
// specially with outsEmpty.
1757-
CCoins outsEmpty;
1758-
CCoins &outs = view.HaveCoins(hash) ? view.GetCoins(hash) : outsEmpty;
1743+
// check that all outputs are available
1744+
if (!view.HaveCoins(hash)) {
1745+
fClean = fClean && error("DisconnectBlock() : outputs still spent? database corrupted");
1746+
view.SetCoins(hash, CCoins());
1747+
}
1748+
CCoins &outs = view.GetCoins(hash);
17591749
outs.ClearUnspendable();
17601750

17611751
CCoins outsBlock = CCoins(tx, pindex->nHeight);
@@ -2355,7 +2345,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
23552345
uniqueTx.insert(block.GetTxHash(i));
23562346
}
23572347
if (uniqueTx.size() != block.vtx.size())
2358-
return state.DoS(100, error("CheckBlock() : duplicate transaction"), true);
2348+
return state.DoS(100, error("CheckBlock() : duplicate transaction"));
23592349

23602350
unsigned int nSigOps = 0;
23612351
BOOST_FOREACH(const CTransaction& tx, block.vtx)
@@ -3783,7 +3773,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
37833773
LOCK(cs_main);
37843774

37853775
CValidationState state;
3786-
if (ProcessBlock(state, pfrom, &block) || state.CorruptionPossible())
3776+
if (ProcessBlock(state, pfrom, &block))
37873777
mapAlreadyAskedFor.erase(inv);
37883778
int nDoS = 0;
37893779
if (state.IsInvalid(nDoS))
@@ -3814,10 +3804,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
38143804
if ((pfrom->pfilter && pfrom->pfilter->IsRelevantAndUpdate(mempool.lookup(hash), hash)) ||
38153805
(!pfrom->pfilter))
38163806
vInv.push_back(inv);
3817-
if (vInv.size() == MAX_INV_SZ) {
3818-
pfrom->PushMessage("inv", vInv);
3819-
vInv.clear();
3820-
}
3807+
if (vInv.size() == MAX_INV_SZ)
3808+
break;
38213809
}
38223810
if (vInv.size() > 0)
38233811
pfrom->PushMessage("inv", vInv);
@@ -4243,15 +4231,6 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
42434231
hashRand = Hash(BEGIN(hashRand), END(hashRand));
42444232
bool fTrickleWait = ((hashRand & 3) != 0);
42454233

4246-
// always trickle our own transactions
4247-
if (!fTrickleWait)
4248-
{
4249-
CWalletTx wtx;
4250-
if (GetTransaction(inv.hash, wtx))
4251-
if (wtx.fFromMe)
4252-
fTrickleWait = true;
4253-
}
4254-
42554234
if (fTrickleWait)
42564235
{
42574236
vInvWait.push_back(inv);

trunk/src/main.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -946,15 +946,13 @@ class CValidationState {
946946
MODE_ERROR, // run-time error
947947
} mode;
948948
int nDoS;
949-
bool corruptionPossible;
950949
public:
951950
CValidationState() : mode(MODE_VALID), nDoS(0) {}
952-
bool DoS(int level, bool ret = false, bool corruptionIn = false) {
951+
bool DoS(int level, bool ret = false) {
953952
if (mode == MODE_ERROR)
954953
return ret;
955954
nDoS += level;
956955
mode = MODE_INVALID;
957-
corruptionPossible = corruptionIn;
958956
return ret;
959957
}
960958
bool Invalid(bool ret = false) {
@@ -984,9 +982,6 @@ class CValidationState {
984982
}
985983
return false;
986984
}
987-
bool CorruptionPossible() {
988-
return corruptionPossible;
989-
}
990985
};
991986

992987
/** An in-memory indexed chain of blocks. */

trunk/src/qt/bitcoingui.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77

88
#include "bitcoingui.h"
99

10+
#include "transactiontablemodel.h"
1011
#include "optionsdialog.h"
1112
#include "aboutdialog.h"
1213
#include "clientmodel.h"
1314
#include "walletmodel.h"
1415
#include "walletframe.h"
1516
#include "optionsmodel.h"
17+
#include "transactiondescdialog.h"
1618
#include "bitcoinunits.h"
1719
#include "guiconstants.h"
1820
#include "notificator.h"
@@ -256,9 +258,9 @@ void BitcoinGUI::createActions(bool fIsTestnet)
256258
openRPCConsoleAction->setStatusTip(tr("Open debugging and diagnostic console"));
257259

258260
usedSendingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("&Used sending addresses..."), this);
259-
usedSendingAddressesAction->setStatusTip(tr("Show the list of used sending addresses and labels"));
261+
usedSendingAddressesAction->setStatusTip(tr("Edit the list of used sending addresses and labels"));
260262
usedReceivingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("Used &receiving addresses..."), this);
261-
usedReceivingAddressesAction->setStatusTip(tr("Show the list of used receiving addresses and labels"));
263+
usedReceivingAddressesAction->setStatusTip(tr("Edit the list of used receiving addresses and labels"));
262264

263265
connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
264266
connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked()));

0 commit comments

Comments
 (0)