Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d46aff5
Merge #10536: Remove unreachable or otherwise redundant code
sipa Jun 20, 2017
43c952d
Merge #10632: qa: Add stopatheight test
Jun 22, 2017
6b6ea24
Merge #10642: Remove obsolete _MSC_VER check
laanwj Jun 22, 2017
41302bb
Merge #10628: [depends] expat 2.2.1
laanwj Jun 22, 2017
a3abc46
Merge #10530: Fix invalid instantiation and possibly unsafe accesses …
laanwj Jun 22, 2017
1c4981d
Merge #9343: Don't create change at dust limit
laanwj Jun 22, 2017
31f4a60
Merge #9517: [refactor] Switched httpserver.cpp to use RAII wrapped l…
laanwj Jun 22, 2017
2116e93
Merge #10276: contrib/verifybinaries: allow filtering by platform
laanwj Jun 22, 2017
305fd06
Merge #10248: Rewrite addrdb with less duplication using CHashVerifier
laanwj Jun 22, 2017
5f2c9d7
Merge #10633: doc: Fix various typos
laanwj Jun 22, 2017
3f4d08d
Merge #10565: [coverage] Remove subtrees and benchmarks from coverage…
laanwj Jun 22, 2017
f4c0858
Merge #10577: Add an explanation of quickly hashing onto a non-power …
laanwj Jun 24, 2017
677c785
Merge #10191: [trivial] Rename unused RPC arguments 'dummy'
laanwj Jun 24, 2017
41b3869
Merge #10400: [RPC] Add an uptime command that displays the amount of…
laanwj Jun 27, 2017
f68c7bc
Merge #10626: doc: Remove outdated minrelaytxfee comment
laanwj Jun 24, 2017
64ef42c
Merge #10446: net: avoid extra dns query per seed
laanwj Jun 24, 2017
5eca744
Merge #10412: Improve wallet rescan API
laanwj Jun 24, 2017
8677d75
Merge #9176: Globals: Pass Consensus::Params through CBlockTreeDB::Lo…
laanwj Jun 25, 2017
785fa07
Merge #10295: [qt] Move some WalletModel functions into CWallet
laanwj May 23, 2017
8c998f2
fix tests 50 -> 500
PastaPastaPasta Jul 6, 2019
f2a4776
Merge #9544: [trivial] Add end of namespace comments. Improve consist…
laanwj Jun 26, 2017
4b2f270
Merge #10496: Add Binds, WhiteBinds, Whitelistedrange to CConnman::Op…
laanwj Jun 26, 2017
2708a7b
Merge #10612: The young person's guide to the test_framework
laanwj Jun 27, 2017
e19fc0b
Merge #10118: Util: Remove redundant calls to argsGlobal.IsArgSet()
laanwj Jun 27, 2017
4c61aed
Merge #10659: [qa] blockchain: Pass on closed connection during gener…
laanwj Jul 11, 2019
5ac5e66
remove unneeded space wallet.cpp
PastaPastaPasta Jul 12, 2019
f4736b3
update seeds emplace_back based on code review
PastaPastaPasta Jul 12, 2019
7e866ed
don't use replace-by-fee.py as example
PastaPastaPasta Jul 12, 2019
2f56063
dashify test/README.md
PastaPastaPasta Jul 12, 2019
bcef238
dashify test/functional/README.md
PastaPastaPasta Jul 12, 2019
2f8512b
Merge #11126: Acquire cs_main lock before cs_wallet during wallet ini…
laanwj Aug 28, 2017
b71a187
Backport yet another part of 11824
UdjinM6 Jul 12, 2019
4e46f25
add end commend for all llmq namespace
PastaPastaPasta Jul 15, 2019
8b224e0
revert the accidental revertion of c1bdf64
PastaPastaPasta Jul 15, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 22 additions & 29 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \
$(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \
$(top_srcdir)/contrib/macdeploy/detached-sig-create.sh

COVERAGE_INFO = baseline_filtered_combined.info baseline.info \
leveldb_baseline.info test_dash_filtered.info total_coverage.info \
COVERAGE_INFO = baseline.info \
test_dash_filtered.info total_coverage.info \
baseline_filtered.info functional_test.info functional_test_filtered.info \
leveldb_baseline_filtered.info test_dash_coverage.info test_dash.info
test_dash_coverage.info test_dash.info

dist-hook:
-$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
Expand Down Expand Up @@ -166,52 +166,45 @@ $(BITCOIN_CLI_BIN): FORCE
$(MAKE) -C src $(@F)

if USE_LCOV
LCOV_FILTER_PATTERN=-p "/usr/include/" -p "src/leveldb/" -p "src/bench/" -p "src/univalue" -p "src/crypto/ctaes" -p "src/secp256k1"

baseline.info:
$(LCOV) -c -i -d $(abs_builddir)/src -o $@

baseline_filtered.info: baseline.info
$(LCOV) -r $< "/usr/include/*" -o $@
$(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@
$(LCOV) -a $@ $(LCOV_OPTS) -o $@

leveldb_baseline.info: baseline_filtered.info
$(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@

leveldb_baseline_filtered.info: leveldb_baseline.info
$(LCOV) -r $< "/usr/include/*" -o $@

baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
$(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@

test_dash.info: baseline_filtered_combined.info
test_dash.info: baseline_filtered.info
$(MAKE) -C src/ check
$(LCOV) -c -d $(abs_builddir)/src -t test_dash -o $@
$(LCOV) -z -d $(abs_builddir)/src
$(LCOV) -z -d $(abs_builddir)/src/leveldb
$(LCOV) -c $(LCOV_OPTS) -d $(abs_builddir)/src -t test_dash -o $@
$(LCOV) -z $(LCOV_OPTS) -d $(abs_builddir)/src

test_dash_filtered.info: test_dash.info
$(LCOV) -r $< "/usr/include/*" -o $@
$(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@
$(LCOV) -a $@ $(LCOV_OPTS) -o $@

functional_test.info: test_dash_filtered.info
-@TIMEOUT=15 python test/functional/test_runner.py $(EXTENDED_FUNCTIONAL_TESTS)
$(LCOV) -c -d $(abs_builddir)/src --t functional-tests -o $@
$(LCOV) -z -d $(abs_builddir)/src
$(LCOV) -z -d $(abs_builddir)/src/leveldb
-@TIMEOUT=15 test/functional/test_runner.py $(EXTENDED_FUNCTIONAL_TESTS)
$(LCOV) -c $(LCOV_OPTS) -d $(abs_builddir)/src --t functional-tests -o $@
$(LCOV) -z $(LCOV_OPTS) -d $(abs_builddir)/src

functional_test_filtered.info: functional_test.info
$(LCOV) -r $< "/usr/include/*" -o $@
$(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@
$(LCOV) -a $@ $(LCOV_OPTS) -o $@

test_dash_coverage.info: baseline_filtered_combined.info test_dash_filtered.info
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_dash_filtered.info -o $@
test_dash_coverage.info: baseline_filtered.info test_dash_filtered.info
$(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a test_dash_filtered.info -o $@

total_coverage.info: baseline_filtered_combined.info test_dash_filtered.info functional_test_filtered.info
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_dash_filtered.info -a functional_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
total_coverage.info: test_dash_filtered.info functional_test_filtered.info
$(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a test_dash_filtered.info -a functional_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt

test_dash.coverage/.dirstamp: test_dash_coverage.info
$(GENHTML) -s $< -o $(@D)
$(GENHTML) -s $(LCOV_OPTS) $< -o $(@D)
@touch $@

total.coverage/.dirstamp: total_coverage.info
$(GENHTML) -s $< -o $(@D)
$(GENHTML) -s $(LCOV_OPTS) $< -o $(@D)
@touch $@

cov: test_dash.coverage/.dirstamp total.coverage/.dirstamp
Expand Down
12 changes: 12 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ AC_ARG_ENABLE([lcov],
[enable lcov testing (default is no)])],
[use_lcov=yes],
[use_lcov=no])

AC_ARG_ENABLE([lcov-branch-coverage],
[AS_HELP_STRING([--enable-lcov-branch-coverage],
[enable lcov testing branch coverage (default is no)])],
[use_lcov_branch=yes],
[use_lcov_branch=no])

AC_ARG_ENABLE([glibc-back-compat],
[AS_HELP_STRING([--enable-glibc-back-compat],
Expand Down Expand Up @@ -486,6 +492,12 @@ if test x$use_lcov = xyes; then
[AC_MSG_ERROR("lcov testing requested but --coverage linker flag does not work")])
AX_CHECK_COMPILE_FLAG([--coverage],[CXXFLAGS="$CXXFLAGS --coverage"],
[AC_MSG_ERROR("lcov testing requested but --coverage flag does not work")])
AC_DEFINE(USE_COVERAGE, 1, [Define this symbol if coverage is enabled])
CXXFLAGS="$CXXFLAGS -Og"
fi

if test x$use_lcov_branch != xno; then
AC_SUBST(LCOV_OPTS, "$LCOV_OPTS --rc lcov_branch_coverage=1")
fi

dnl Check for endianness
Expand Down
2 changes: 1 addition & 1 deletion contrib/devtools/check-doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
REGEX_ARG = re.compile(r'(?:map(?:Multi)?Args(?:\.count\(|\[)|Get(?:Bool)?Arg\()\"(\-[^\"]+?)\"')
REGEX_DOC = re.compile(r'HelpMessageOpt\(\"(\-[^\"=]+?)(?:=|\")')
# list unsupported, deprecated and duplicate args as they need no documentation
SET_DOC_OPTIONAL = set(['-rpcssl', '-benchmark', '-h', '-help', '-socks', '-tor', '-debugnet', '-whitelistalwaysrelay', '-blockminsize', '-sendfreetransactions'])
SET_DOC_OPTIONAL = set(['-rpcssl', '-benchmark', '-h', '-help', '-socks', '-tor', '-debugnet', '-whitelistalwaysrelay', '-blockminsize'])

def main():
used = check_output(CMD_GREP_ARGS, shell=True, universal_newlines=True)
Expand Down
25 changes: 25 additions & 0 deletions contrib/filter-lcov.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env python3

import argparse

parser = argparse.ArgumentParser(description='Remove the coverage data from a tracefile for all files matching the pattern.')
parser.add_argument('--pattern', '-p', action='append', help='the pattern of files to remove', required=True)
parser.add_argument('tracefile', help='the tracefile to remove the coverage data from')
parser.add_argument('outfile', help='filename for the output to be written to')

args = parser.parse_args()
tracefile = args.tracefile
pattern = args.pattern
outfile = args.outfile

in_remove = False
with open(tracefile, 'r') as f:
with open(outfile, 'w') as wf:
for line in f:
for p in pattern:
if line.startswith("SF:") and p in line:
in_remove = True
if not in_remove:
wf.write(line)
if line == 'end_of_record\n':
in_remove = False
8 changes: 8 additions & 0 deletions contrib/verifybinaries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ The script returns 0 if everything passes the checks. It returns 1 if either the
./verify.sh bitcoin-core-0.13.0-rc3
```

If you only want to download the binaries of certain platform, add the corresponding suffix, e.g.:

```sh
./verify.sh bitcoin-core-0.11.2-osx
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should dashify this file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should, but I think that's out of scope of this PR

./verify.sh 0.12.0-linux
./verify.sh bitcoin-core-0.13.0-rc3-win64
```

If you do not want to keep the downloaded binaries, specify anything as the second parameter.

```sh
Expand Down
43 changes: 38 additions & 5 deletions contrib/verifybinaries/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,36 @@ if [ -n "$1" ]; then
VERSION="$VERSIONPREFIX$1"
fi

#now let's see if the version string contains "rc", and strip it off if it does
# and simultaneously add RCSUBDIR to BASEDIR, where we will look for SIGNATUREFILENAME
if [[ $VERSION == *"$RCVERSIONSTRING"* ]]; then
BASEDIR="$BASEDIR${VERSION/%-$RCVERSIONSTRING*}/"
BASEDIR="$BASEDIR$RCSUBDIR.$RCVERSIONSTRING${VERSION: -1}/"
STRIPPEDLAST="${VERSION%-*}"

#now let's see if the version string contains "rc" or a platform name (e.g. "osx")
if [[ "$STRIPPEDLAST-" == "$VERSIONPREFIX" ]]; then
BASEDIR="$BASEDIR$VERSION/"
else
# let's examine the last part to see if it's rc and/or platform name
STRIPPEDNEXTTOLAST="${STRIPPEDLAST%-*}"
if [[ "$STRIPPEDNEXTTOLAST-" == "$VERSIONPREFIX" ]]; then

LASTSUFFIX="${VERSION##*-}"
VERSION="$STRIPPEDLAST"

if [[ $LASTSUFFIX == *"$RCVERSIONSTRING"* ]]; then
RCVERSION="$LASTSUFFIX"
else
PLATFORM="$LASTSUFFIX"
fi

else
RCVERSION="${STRIPPEDLAST##*-}"
PLATFORM="${VERSION##*-}"

VERSION="$STRIPPEDNEXTTOLAST"
fi

BASEDIR="$BASEDIR$VERSION/"
if [[ $RCVERSION == *"$RCVERSIONSTRING"* ]]; then
BASEDIR="$BASEDIR$RCSUBDIR.$RCVERSION/"
fi
fi

SIGNATUREFILE="$BASEDIR$SIGNATUREFILENAME"
Expand Down Expand Up @@ -92,12 +115,22 @@ if [ $RET -ne 0 ]; then
exit "$RET"
fi

if [ -n "$PLATFORM" ]; then
grep $PLATFORM $TMPFILE > "$TMPFILE-plat"
TMPFILESIZE=$(stat -c%s "$TMPFILE-plat")
if [ $TMPFILESIZE -eq 0 ]; then
echo "error: no files matched the platform specified" && exit 3
fi
mv "$TMPFILE-plat" $TMPFILE
fi

#here we extract the filenames from the signature file
FILES=$(awk '{print $2}' "$TMPFILE")

#and download these one by one
for file in $FILES
do
echo "Downloading $file"
wget --quiet -N "$BASEDIR$file"
done

Expand Down
4 changes: 2 additions & 2 deletions depends/packages/expat.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package=expat
$(package)_version=2.2.0
$(package)_version=2.2.1
$(package)_download_path=https://downloads.sourceforge.net/project/expat/expat/$($(package)_version)
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=d9e50ff2d19b3538bd2127902a89987474e1a4db8e43a66a4d1a712ab9a504ff
$(package)_sha256_hash=1868cadae4c82a018e361e2b2091de103cd820aaacb0d6cfa49bd2cd83978885

define $(package)_set_vars
$(package)_config_opts=--disable-static
Expand Down
19 changes: 17 additions & 2 deletions doc/developer-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Class
return true;
}
}
}
} // namespace foo
```

Doxygen comments
Expand Down Expand Up @@ -267,7 +267,7 @@ General C++

- Assertions should not have side-effects

- *Rationale*: Even though the source code is set to to refuse to compile
- *Rationale*: Even though the source code is set to refuse to compile
with assertions disabled, having side-effects in assertions is unexpected and
makes the code harder to understand

Expand Down Expand Up @@ -417,6 +417,21 @@ Source code organization

- *Rationale*: Avoids symbol conflicts

- Terminate namespaces with a comment (`// namespace mynamespace`). The comment
should be placed on the same line as the brace closing the namespace, e.g.

```c++
namespace mynamespace {
...
} // namespace mynamespace

namespace {
...
} // namespace
```

- *Rationale*: Avoids confusion about the namespace context

GUI
-----

Expand Down
3 changes: 2 additions & 1 deletion src/Makefile.qttest.include
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ qt_test_test_dash_qt_SOURCES = \
if ENABLE_WALLET
qt_test_test_dash_qt_SOURCES += \
qt/test/paymentservertests.cpp \
qt/test/wallettests.cpp
qt/test/wallettests.cpp \
wallet/test/wallet_test_fixture.cpp
endif

nodist_qt_test_test_dash_qt_SOURCES = $(TEST_QT_MOC_CPP)
Expand Down
Loading