Merge pull request #66 from z-classic/v1.0.8-dev
v1.0.8-1 - SECURITY FIX
This commit is contained in:
commit
58db0334b7
|
@ -7,7 +7,6 @@ src/zcash-cli
|
|||
src/zcash-gtest
|
||||
src/zcash-tx
|
||||
src/test/test_bitcoin
|
||||
src/qt/test/test_bitcoin-qt
|
||||
|
||||
# Zcash utilities
|
||||
src/zcash/GenerateParams
|
||||
|
@ -41,16 +40,11 @@ src/config/bitcoin-config.h
|
|||
src/config/bitcoin-config.h.in
|
||||
src/config/stamp-h1
|
||||
share/setup.nsi
|
||||
share/qt/Info.plist
|
||||
|
||||
cache/
|
||||
venv-mnf/
|
||||
src/univalue/gen
|
||||
|
||||
src/qt/*.moc
|
||||
src/qt/moc_*.cpp
|
||||
src/qt/forms/ui_*.h
|
||||
|
||||
src/qt/test/moc*.cpp
|
||||
|
||||
.deps
|
||||
.dirstamp
|
||||
.libs
|
||||
|
@ -79,23 +73,16 @@ src/qt/test/moc*.cpp
|
|||
*.lo
|
||||
*.la
|
||||
|
||||
# Compilation and Qt preprocessor part
|
||||
*.qm
|
||||
# Compilation
|
||||
Makefile
|
||||
bitcoin-qt
|
||||
Bitcoin-Qt.app
|
||||
|
||||
# Unit-tests
|
||||
Makefile.test
|
||||
bitcoin-qt_test
|
||||
src/test/buildenv.py
|
||||
|
||||
# Resources cpp
|
||||
qrc_*.cpp
|
||||
|
||||
# Qt creator
|
||||
*.pro.user
|
||||
|
||||
# Mac specific
|
||||
.DS_Store
|
||||
build
|
||||
|
|
|
@ -31,11 +31,11 @@ matrix:
|
|||
- compiler: ": ARM"
|
||||
env: HOST=arm-linux-gnueabihf PACKAGES="g++-arm-linux-gnueabihf" DEP_OPTS="NO_QT=1" GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
|
||||
- compiler: ": Win32"
|
||||
env: HOST=i686-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-dev wine bc" RUN_TESTS=true GOAL="deploy" BITCOIN_CONFIG="--enable-gui --enable-reduce-exports" MAKEJOBS="-j2"
|
||||
env: HOST=i686-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-dev wine bc" RUN_TESTS=true GOAL="deploy" BITCOIN_CONFIG="--enable-reduce-exports" MAKEJOBS="-j2"
|
||||
- compiler: ": 32-bit + dash"
|
||||
env: HOST=i686-pc-linux-gnu PACKAGES="g++-multilib bc python-zmq" PPA="ppa:chris-lea/zeromq" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++" USE_SHELL="/bin/dash"
|
||||
- compiler: ": Win64"
|
||||
env: HOST=x86_64-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-dev wine bc" RUN_TESTS=true GOAL="deploy" BITCOIN_CONFIG="--enable-gui --enable-reduce-exports" MAKEJOBS="-j2"
|
||||
env: HOST=x86_64-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-dev wine bc" RUN_TESTS=true GOAL="deploy" BITCOIN_CONFIG="--enable-reduce-exports" MAKEJOBS="-j2"
|
||||
- compiler: ": bitcoind"
|
||||
env: HOST=x86_64-unknown-linux-gnu PACKAGES="bc python-zmq" PPA="ppa:chris-lea/zeromq" DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports CPPFLAGS=-DDEBUG_LOCKORDER"
|
||||
- compiler: ": No wallet"
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[bitcoin.qt-translation-011x]
|
||||
file_filter = src/qt/locale/bitcoin_<lang>.ts
|
||||
source_file = src/qt/locale/bitcoin_en.ts
|
||||
source_lang = en
|
16
COPYING
16
COPYING
|
@ -1,5 +1,5 @@
|
|||
Copyright (c) 2016 The Zcash developers
|
||||
Copyright (c) 2009-2015 The Bitcoin Core developers
|
||||
Copyright (c) 2016-2017 The Zcash developers
|
||||
Copyright (c) 2009-2017 The Bitcoin Core 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
|
||||
|
@ -21,16 +21,14 @@ THE SOFTWARE.
|
|||
|
||||
|
||||
The MIT software license (http://www.opensource.org/licenses/mit-license.php)
|
||||
above applies to the code directly included in this source distribution, with
|
||||
the exception of certain files under the 'src/qt/' and 'scripts/img/' directories
|
||||
which are distributed under the LGPL or GPL licenses. Dependencies downloaded
|
||||
as part of the build process may be covered by other open source licenses.
|
||||
For further details see 'contrib/DEBIAN/copyright'.
|
||||
above applies to the code directly included in this source distribution.
|
||||
Dependencies downloaded as part of the build process may be covered by other
|
||||
open-source licenses. For further details see 'contrib/debian/copyright'.
|
||||
|
||||
|
||||
This product includes software developed by the OpenSSL Project for use in the
|
||||
[OpenSSL Toolkit](https://www.openssl.org/). This product includes cryptographic
|
||||
software written by Eric Young ([eay@cryptsoft.com](mailto:eay@cryptsoft.com)),
|
||||
OpenSSL Toolkit (https://www.openssl.org/). This product includes cryptographic
|
||||
software written by Eric Young (eay@cryptsoft.com),
|
||||
and UPnP software written by Thomas Bernard.
|
||||
|
||||
|
||||
|
|
161
Makefile.am
161
Makefile.am
|
@ -1,5 +1,8 @@
|
|||
ACLOCAL_AMFLAGS = -I build-aux/m4
|
||||
SUBDIRS = src
|
||||
if ENABLE_MAN
|
||||
SUBDIRS += doc/man
|
||||
endif
|
||||
.PHONY: deploy FORCE
|
||||
|
||||
GZIP_ENV="-9n"
|
||||
|
@ -10,19 +13,18 @@ pkgconfig_DATA = libzcashconsensus.pc
|
|||
endif
|
||||
|
||||
BITCOIND_BIN=$(top_builddir)/src/zcashd$(EXEEXT)
|
||||
BITCOIN_QT_BIN=$(top_builddir)/src/qt/bitcoin-qt$(EXEEXT)
|
||||
BITCOIN_CLI_BIN=$(top_builddir)/src/zcash-cli$(EXEEXT)
|
||||
BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
|
||||
|
||||
OSX_APP=Bitcoin-Qt.app
|
||||
OSX_DMG=Bitcoin-Core.dmg
|
||||
OSX_BACKGROUND_IMAGE=background.tiff
|
||||
OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
|
||||
OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
|
||||
OSX_BASE_LPROJ_DIR=$(top_srcdir)/contrib/macdeploy/Base.lproj/InfoPlist.strings
|
||||
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
|
||||
OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed
|
||||
OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW
|
||||
##OSX_APP=Bitcoin-Qt.app
|
||||
##OSX_DMG=Bitcoin-Core.dmg
|
||||
##OSX_BACKGROUND_IMAGE=background.tiff
|
||||
##OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
|
||||
##OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
|
||||
##OSX_BASE_LPROJ_DIR=$(top_srcdir)/contrib/macdeploy/Base.lproj/InfoPlist.strings
|
||||
##OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
|
||||
##OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed
|
||||
##OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW
|
||||
|
||||
DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
|
||||
|
||||
|
@ -33,11 +35,11 @@ WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
|
|||
$(top_srcdir)/share/pixmaps/nsis-header.bmp \
|
||||
$(top_srcdir)/share/pixmaps/nsis-wizard.bmp
|
||||
|
||||
OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) $(OSX_BASE_LPROJ_DIR) \
|
||||
$(top_srcdir)/contrib/macdeploy/$(OSX_BACKGROUND_IMAGE) \
|
||||
$(top_srcdir)/contrib/macdeploy/DS_Store \
|
||||
$(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \
|
||||
$(top_srcdir)/contrib/macdeploy/detached-sig-create.sh
|
||||
##OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) $(OSX_BASE_LPROJ_DIR) \
|
||||
## $(top_srcdir)/contrib/macdeploy/$(OSX_BACKGROUND_IMAGE) \
|
||||
## $(top_srcdir)/contrib/macdeploy/DS_Store \
|
||||
## $(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \
|
||||
## $(top_srcdir)/contrib/macdeploy/detached-sig-create.sh
|
||||
|
||||
COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
|
||||
leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
|
||||
|
@ -61,7 +63,6 @@ distcleancheck:
|
|||
$(BITCOIN_WIN_INSTALLER): all-recursive
|
||||
$(MKDIR_P) $(top_builddir)/release
|
||||
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
|
||||
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release
|
||||
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release
|
||||
@test -f $(MAKENSIS) && $(MAKENSIS) -V2 $(top_builddir)/share/setup.nsi || \
|
||||
echo error: could not build $@
|
||||
|
@ -70,75 +71,73 @@ $(BITCOIN_WIN_INSTALLER): all-recursive
|
|||
$(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
|
||||
$(MAKE) -C src $(patsubst src/%,%,$@)
|
||||
|
||||
$(OSX_APP)/Contents/PkgInfo:
|
||||
$(MKDIR_P) $(@D)
|
||||
@echo "APPL????" > $@
|
||||
##$(OSX_APP)/Contents/PkgInfo:
|
||||
## $(MKDIR_P) $(@D)
|
||||
## @echo "APPL????" > $@
|
||||
##
|
||||
##$(OSX_APP)/Contents/Resources/empty.lproj:
|
||||
## $(MKDIR_P) $(@D)
|
||||
## @touch $@
|
||||
##
|
||||
##$(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
|
||||
## $(MKDIR_P) $(@D)
|
||||
## $(INSTALL_DATA) $< $@
|
||||
##
|
||||
##$(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
|
||||
## $(MKDIR_P) $(@D)
|
||||
## $(INSTALL_DATA) $< $@
|
||||
##
|
||||
##$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN)
|
||||
## $(MKDIR_P) $(@D)
|
||||
## STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@
|
||||
##
|
||||
##$(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings: $(OSX_BASE_LPROJ_DIR)
|
||||
## $(MKDIR_P) $(@D)
|
||||
## $(INSTALL_DATA) $< $@
|
||||
##
|
||||
##OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
|
||||
## $(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
|
||||
## $(OSX_APP)/Contents/MacOS/Bitcoin-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings
|
||||
##
|
||||
##if BUILD_DARWIN
|
||||
##$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
|
||||
## $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2
|
||||
##
|
||||
##deploydir: $(OSX_DMG)
|
||||
##else
|
||||
##APP_DIST_DIR=$(top_builddir)/dist
|
||||
##APP_DIST_EXTRAS=$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE) $(APP_DIST_DIR)/.DS_Store $(APP_DIST_DIR)/Applications
|
||||
##
|
||||
##$(APP_DIST_DIR)/Applications:
|
||||
## @rm -f $@
|
||||
## @cd $(@D); $(LN_S) /Applications $(@F)
|
||||
##
|
||||
##$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
|
||||
##
|
||||
##$(OSX_DMG): $(APP_DIST_EXTRAS)
|
||||
## $(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Bitcoin-Core" -no-pad -r -apple -o $@ dist
|
||||
##
|
||||
##$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_IMAGE)
|
||||
## $(MKDIR_P) $(@D)
|
||||
## $(INSTALL) $< $@
|
||||
##$(APP_DIST_DIR)/.DS_Store: contrib/macdeploy/DS_Store
|
||||
## $(INSTALL) $< $@
|
||||
##
|
||||
##$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
|
||||
## INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -translations-dir=$(QT_TRANSLATION_DIR) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2
|
||||
##
|
||||
##deploydir: $(APP_DIST_EXTRAS)
|
||||
##endif
|
||||
##
|
||||
##if TARGET_DARWIN
|
||||
##appbundle: $(OSX_APP_BUILT)
|
||||
##deploy: $(OSX_DMG)
|
||||
##endif
|
||||
|
||||
$(OSX_APP)/Contents/Resources/empty.lproj:
|
||||
$(MKDIR_P) $(@D)
|
||||
@touch $@
|
||||
|
||||
$(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
|
||||
$(MKDIR_P) $(@D)
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
$(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
|
||||
$(MKDIR_P) $(@D)
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN)
|
||||
$(MKDIR_P) $(@D)
|
||||
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@
|
||||
|
||||
$(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings: $(OSX_BASE_LPROJ_DIR)
|
||||
$(MKDIR_P) $(@D)
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
|
||||
$(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
|
||||
$(OSX_APP)/Contents/MacOS/Bitcoin-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings
|
||||
|
||||
if BUILD_DARWIN
|
||||
$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
|
||||
$(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2
|
||||
|
||||
deploydir: $(OSX_DMG)
|
||||
else
|
||||
APP_DIST_DIR=$(top_builddir)/dist
|
||||
APP_DIST_EXTRAS=$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE) $(APP_DIST_DIR)/.DS_Store $(APP_DIST_DIR)/Applications
|
||||
|
||||
$(APP_DIST_DIR)/Applications:
|
||||
@rm -f $@
|
||||
@cd $(@D); $(LN_S) /Applications $(@F)
|
||||
|
||||
$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
|
||||
|
||||
$(OSX_DMG): $(APP_DIST_EXTRAS)
|
||||
$(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Bitcoin-Core" -no-pad -r -apple -o $@ dist
|
||||
|
||||
$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_IMAGE)
|
||||
$(MKDIR_P) $(@D)
|
||||
$(INSTALL) $< $@
|
||||
$(APP_DIST_DIR)/.DS_Store: contrib/macdeploy/DS_Store
|
||||
$(INSTALL) $< $@
|
||||
|
||||
$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
|
||||
INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -translations-dir=$(QT_TRANSLATION_DIR) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2
|
||||
|
||||
deploydir: $(APP_DIST_EXTRAS)
|
||||
endif
|
||||
|
||||
if TARGET_DARWIN
|
||||
appbundle: $(OSX_APP_BUILT)
|
||||
deploy: $(OSX_DMG)
|
||||
endif
|
||||
if TARGET_WINDOWS
|
||||
deploy: $(BITCOIN_WIN_INSTALLER)
|
||||
endif
|
||||
|
||||
$(BITCOIN_QT_BIN): FORCE
|
||||
$(MAKE) -C src qt/$(@F)
|
||||
|
||||
$(BITCOIND_BIN): FORCE
|
||||
$(MAKE) -C src $(@F)
|
||||
|
||||
|
@ -280,5 +279,7 @@ CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
|
|||
|
||||
.INTERMEDIATE: $(COVERAGE_INFO)
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-man
|
||||
|
||||
clean-local:
|
||||
rm -rf test_bitcoin.coverage/ zcash-gtest.coverage/ total.coverage/ $(OSX_APP)
|
||||
|
|
|
@ -1,433 +0,0 @@
|
|||
dnl Helper for cases where a qt dependency is not met.
|
||||
dnl Output: If qt version is auto, set bitcoin_enable_qt to false. Else, exit.
|
||||
AC_DEFUN([BITCOIN_QT_FAIL],[
|
||||
if test "x$bitcoin_qt_want_version" = "xauto" && test x$bitcoin_qt_force != xyes; then
|
||||
if test x$bitcoin_enable_qt != xno; then
|
||||
AC_MSG_WARN([$1; bitcoin-qt frontend will not be built])
|
||||
fi
|
||||
bitcoin_enable_qt=no
|
||||
bitcoin_enable_qt_test=no
|
||||
else
|
||||
AC_MSG_ERROR([$1])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BITCOIN_QT_CHECK],[
|
||||
if test "x$bitcoin_enable_qt" != "xno" && test x$bitcoin_qt_want_version != xno; then
|
||||
true
|
||||
$1
|
||||
else
|
||||
true
|
||||
$2
|
||||
fi
|
||||
])
|
||||
|
||||
dnl BITCOIN_QT_PATH_PROGS([FOO], [foo foo2], [/path/to/search/first], [continue if missing])
|
||||
dnl Helper for finding the path of programs needed for Qt.
|
||||
dnl Inputs: $1: Variable to be set
|
||||
dnl Inputs: $2: List of programs to search for
|
||||
dnl Inputs: $3: Look for $2 here before $PATH
|
||||
dnl Inputs: $4: If "yes", don't fail if $2 is not found.
|
||||
dnl Output: $1 is set to the path of $2 if found. $2 are searched in order.
|
||||
AC_DEFUN([BITCOIN_QT_PATH_PROGS],[
|
||||
BITCOIN_QT_CHECK([
|
||||
if test "x$3" != "x"; then
|
||||
AC_PATH_PROGS($1,$2,,$3)
|
||||
else
|
||||
AC_PATH_PROGS($1,$2)
|
||||
fi
|
||||
if test "x$$1" = "x" && test "x$4" != "xyes"; then
|
||||
BITCOIN_QT_FAIL([$1 not found])
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
dnl Initialize qt input.
|
||||
dnl This must be called before any other BITCOIN_QT* macros to ensure that
|
||||
dnl input variables are set correctly.
|
||||
dnl CAUTION: Do not use this inside of a conditional.
|
||||
AC_DEFUN([BITCOIN_QT_INIT],[
|
||||
dnl enable qt support
|
||||
AC_ARG_WITH([gui],
|
||||
[AS_HELP_STRING([--with-gui@<:@=no|qt4|qt5|auto@:>@],
|
||||
[build bitcoin-qt GUI (default=auto, qt4 tried first)])],
|
||||
[
|
||||
bitcoin_qt_want_version=$withval
|
||||
if test x$bitcoin_qt_want_version = xyes; then
|
||||
bitcoin_qt_force=yes
|
||||
bitcoin_qt_want_version=auto
|
||||
fi
|
||||
],
|
||||
[bitcoin_qt_want_version=auto])
|
||||
|
||||
AC_ARG_WITH([qt-incdir],[AS_HELP_STRING([--with-qt-incdir=INC_DIR],[specify qt include path (overridden by pkgconfig)])], [qt_include_path=$withval], [])
|
||||
AC_ARG_WITH([qt-libdir],[AS_HELP_STRING([--with-qt-libdir=LIB_DIR],[specify qt lib path (overridden by pkgconfig)])], [qt_lib_path=$withval], [])
|
||||
AC_ARG_WITH([qt-plugindir],[AS_HELP_STRING([--with-qt-plugindir=PLUGIN_DIR],[specify qt plugin path (overridden by pkgconfig)])], [qt_plugin_path=$withval], [])
|
||||
AC_ARG_WITH([qt-translationdir],[AS_HELP_STRING([--with-qt-translationdir=PLUGIN_DIR],[specify qt translation path (overridden by pkgconfig)])], [qt_translation_path=$withval], [])
|
||||
AC_ARG_WITH([qt-bindir],[AS_HELP_STRING([--with-qt-bindir=BIN_DIR],[specify qt bin path])], [qt_bin_path=$withval], [])
|
||||
|
||||
AC_ARG_WITH([qtdbus],
|
||||
[AS_HELP_STRING([--with-qtdbus],
|
||||
[enable DBus support (default is yes if qt is enabled and QtDBus is found)])],
|
||||
[use_dbus=$withval],
|
||||
[use_dbus=auto])
|
||||
|
||||
AC_SUBST(QT_TRANSLATION_DIR,$qt_translation_path)
|
||||
])
|
||||
|
||||
dnl Find the appropriate version of Qt libraries and includes.
|
||||
dnl Inputs: $1: Whether or not pkg-config should be used. yes|no. Default: yes.
|
||||
dnl Inputs: $2: If $1 is "yes" and --with-gui=auto, which qt version should be
|
||||
dnl tried first.
|
||||
dnl Outputs: See _BITCOIN_QT_FIND_LIBS_*
|
||||
dnl Outputs: Sets variables for all qt-related tools.
|
||||
dnl Outputs: bitcoin_enable_qt, bitcoin_enable_qt_dbus, bitcoin_enable_qt_test
|
||||
AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
||||
use_pkgconfig=$1
|
||||
|
||||
if test x$use_pkgconfig = x; then
|
||||
use_pkgconfig=yes
|
||||
fi
|
||||
|
||||
if test x$use_pkgconfig = xyes; then
|
||||
BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG([$2])])
|
||||
else
|
||||
BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG])
|
||||
fi
|
||||
|
||||
dnl This is ugly and complicated. Yuck. Works as follows:
|
||||
dnl We can't discern whether Qt4 builds are static or not. For Qt5, we can
|
||||
dnl check a header to find out. When Qt is built statically, some plugins must
|
||||
dnl be linked into the final binary as well. These plugins have changed between
|
||||
dnl Qt4 and Qt5. With Qt5, languages moved into core and the WindowsIntegration
|
||||
dnl plugin was added. Since we can't tell if Qt4 is static or not, it is
|
||||
dnl assumed for windows builds.
|
||||
dnl _BITCOIN_QT_CHECK_STATIC_PLUGINS does a quick link-check and appends the
|
||||
dnl results to QT_LIBS.
|
||||
BITCOIN_QT_CHECK([
|
||||
TEMP_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
|
||||
if test x$bitcoin_qt_got_major_vers = x5; then
|
||||
_BITCOIN_QT_IS_STATIC
|
||||
if test x$bitcoin_cv_static_qt = xyes; then
|
||||
AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
|
||||
if test x$qt_plugin_path != x; then
|
||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms"
|
||||
fi
|
||||
if test x$use_pkgconfig = xyes; then
|
||||
PKG_CHECK_MODULES([QTPLATFORM], [Qt5PlatformSupport], [QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"])
|
||||
fi
|
||||
AC_CACHE_CHECK(for Qt < 5.4, bitcoin_cv_need_acc_widget,[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[[#include <QtCore>]],[[
|
||||
#if QT_VERSION >= 0x050400
|
||||
choke;
|
||||
#endif
|
||||
]])],
|
||||
[bitcoin_cv_need_acc_widget=yes],
|
||||
[bitcoin_cv_need_acc_widget=no])
|
||||
])
|
||||
if test "x$bitcoin_cv_need_acc_widget" = "xyes"; then
|
||||
if test x$qt_plugin_path != x; then
|
||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
|
||||
fi
|
||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(AccessibleFactory)], [-lqtaccessiblewidgets])
|
||||
fi
|
||||
if test x$TARGET_OS = xwindows; then
|
||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)],[-lqwindows])
|
||||
AC_DEFINE(QT_QPA_PLATFORM_WINDOWS, 1, [Define this symbol if the qt platform is windows])
|
||||
elif test x$TARGET_OS = xlinux; then
|
||||
PKG_CHECK_MODULES([X11XCB], [x11-xcb], [QT_LIBS="$X11XCB_LIBS $QT_LIBS"])
|
||||
if ${PKG_CONFIG} --exists "Qt5Core >= 5.5" 2>/dev/null; then
|
||||
PKG_CHECK_MODULES([QTXCBQPA], [Qt5XcbQpa], [QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"])
|
||||
fi
|
||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)],[-lqxcb -lxcb-static])
|
||||
AC_DEFINE(QT_QPA_PLATFORM_XCB, 1, [Define this symbol if the qt platform is xcb])
|
||||
elif test x$TARGET_OS = xdarwin; then
|
||||
if test x$use_pkgconfig = xyes; then
|
||||
PKG_CHECK_MODULES([QTPRINT], [Qt5PrintSupport], [QT_LIBS="$QTPRINT_LIBS $QT_LIBS"])
|
||||
fi
|
||||
AX_CHECK_LINK_FLAG([[-framework IOKit]],[QT_LIBS="$QT_LIBS -framework IOKit"],[AC_MSG_ERROR(could not iokit framework)])
|
||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)],[-lqcocoa])
|
||||
AC_DEFINE(QT_QPA_PLATFORM_COCOA, 1, [Define this symbol if the qt platform is cocoa])
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test x$TARGET_OS = xwindows; then
|
||||
AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
|
||||
if test x$qt_plugin_path != x; then
|
||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
|
||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/codecs"
|
||||
fi
|
||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([
|
||||
Q_IMPORT_PLUGIN(qcncodecs)
|
||||
Q_IMPORT_PLUGIN(qjpcodecs)
|
||||
Q_IMPORT_PLUGIN(qtwcodecs)
|
||||
Q_IMPORT_PLUGIN(qkrcodecs)
|
||||
Q_IMPORT_PLUGIN(AccessibleFactory)],
|
||||
[-lqcncodecs -lqjpcodecs -lqtwcodecs -lqkrcodecs -lqtaccessiblewidgets])
|
||||
fi
|
||||
fi
|
||||
CPPFLAGS=$TEMP_CPPFLAGS
|
||||
])
|
||||
|
||||
if test x$use_pkgconfig$qt_bin_path = xyes; then
|
||||
if test x$bitcoin_qt_got_major_vers = x5; then
|
||||
qt_bin_path="`$PKG_CONFIG --variable=host_bins Qt5Core 2>/dev/null`"
|
||||
fi
|
||||
fi
|
||||
|
||||
BITCOIN_QT_PATH_PROGS([MOC], [moc-qt${bitcoin_qt_got_major_vers} moc${bitcoin_qt_got_major_vers} moc], $qt_bin_path)
|
||||
BITCOIN_QT_PATH_PROGS([UIC], [uic-qt${bitcoin_qt_got_major_vers} uic${bitcoin_qt_got_major_vers} uic], $qt_bin_path)
|
||||
BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt${bitcoin_qt_got_major_vers} rcc${bitcoin_qt_got_major_vers} rcc], $qt_bin_path)
|
||||
BITCOIN_QT_PATH_PROGS([LRELEASE], [lrelease-qt${bitcoin_qt_got_major_vers} lrelease${bitcoin_qt_got_major_vers} lrelease], $qt_bin_path)
|
||||
BITCOIN_QT_PATH_PROGS([LUPDATE], [lupdate-qt${bitcoin_qt_got_major_vers} lupdate${bitcoin_qt_got_major_vers} lupdate],$qt_bin_path, yes)
|
||||
|
||||
MOC_DEFS='-DHAVE_CONFIG_H -I$(srcdir)'
|
||||
case $host in
|
||||
*darwin*)
|
||||
BITCOIN_QT_CHECK([
|
||||
MOC_DEFS="${MOC_DEFS} -DQ_OS_MAC"
|
||||
base_frameworks="-framework Foundation -framework ApplicationServices -framework AppKit"
|
||||
AX_CHECK_LINK_FLAG([[$base_frameworks]],[QT_LIBS="$QT_LIBS $base_frameworks"],[AC_MSG_ERROR(could not find base frameworks)])
|
||||
])
|
||||
;;
|
||||
*mingw*)
|
||||
BITCOIN_QT_CHECK([
|
||||
AX_CHECK_LINK_FLAG([[-mwindows]],[QT_LDFLAGS="$QT_LDFLAGS -mwindows"],[AC_MSG_WARN(-mwindows linker support not detected)])
|
||||
])
|
||||
esac
|
||||
|
||||
|
||||
dnl enable qt support
|
||||
AC_MSG_CHECKING(whether to build Bitcoin Core GUI)
|
||||
BITCOIN_QT_CHECK([
|
||||
bitcoin_enable_qt=yes
|
||||
bitcoin_enable_qt_test=yes
|
||||
if test x$have_qt_test = xno; then
|
||||
bitcoin_enable_qt_test=no
|
||||
fi
|
||||
bitcoin_enable_qt_dbus=no
|
||||
if test x$use_dbus != xno && test x$have_qt_dbus = xyes; then
|
||||
bitcoin_enable_qt_dbus=yes
|
||||
fi
|
||||
if test x$use_dbus = xyes && test x$have_qt_dbus = xno; then
|
||||
AC_MSG_ERROR("libQtDBus not found. Install libQtDBus or remove --with-qtdbus.")
|
||||
fi
|
||||
if test x$LUPDATE = x; then
|
||||
AC_MSG_WARN("lupdate is required to update qt translations")
|
||||
fi
|
||||
],[
|
||||
bitcoin_enable_qt=no
|
||||
])
|
||||
AC_MSG_RESULT([$bitcoin_enable_qt (Qt${bitcoin_qt_got_major_vers})])
|
||||
|
||||
AC_SUBST(QT_INCLUDES)
|
||||
AC_SUBST(QT_LIBS)
|
||||
AC_SUBST(QT_LDFLAGS)
|
||||
AC_SUBST(QT_DBUS_INCLUDES)
|
||||
AC_SUBST(QT_DBUS_LIBS)
|
||||
AC_SUBST(QT_TEST_INCLUDES)
|
||||
AC_SUBST(QT_TEST_LIBS)
|
||||
AC_SUBST(QT_SELECT, qt${bitcoin_qt_got_major_vers})
|
||||
AC_SUBST(MOC_DEFS)
|
||||
])
|
||||
|
||||
dnl All macros below are internal and should _not_ be used from the main
|
||||
dnl configure.ac.
|
||||
dnl ----
|
||||
|
||||
dnl Internal. Check if the included version of Qt is Qt5.
|
||||
dnl Requires: INCLUDES must be populated as necessary.
|
||||
dnl Output: bitcoin_cv_qt5=yes|no
|
||||
AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
|
||||
AC_CACHE_CHECK(for Qt 5, bitcoin_cv_qt5,[
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[[#include <QtCore>]],
|
||||
[[
|
||||
#if QT_VERSION < 0x050000
|
||||
choke me
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
]])],
|
||||
[bitcoin_cv_qt5=yes],
|
||||
[bitcoin_cv_qt5=no])
|
||||
])])
|
||||
|
||||
dnl Internal. Check if the linked version of Qt was built as static libs.
|
||||
dnl Requires: Qt5. This check cannot determine if Qt4 is static.
|
||||
dnl Requires: INCLUDES and LIBS must be populated as necessary.
|
||||
dnl Output: bitcoin_cv_static_qt=yes|no
|
||||
dnl Output: Defines QT_STATICPLUGIN if plugins are static.
|
||||
AC_DEFUN([_BITCOIN_QT_IS_STATIC],[
|
||||
AC_CACHE_CHECK(for static Qt, bitcoin_cv_static_qt,[
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[[#include <QtCore>]],
|
||||
[[
|
||||
#if defined(QT_STATIC)
|
||||
return 0;
|
||||
#else
|
||||
choke me
|
||||
#endif
|
||||
]])],
|
||||
[bitcoin_cv_static_qt=yes],
|
||||
[bitcoin_cv_static_qt=no])
|
||||
])
|
||||
if test xbitcoin_cv_static_qt = xyes; then
|
||||
AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol for static Qt plugins])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Internal. Check if the link-requirements for static plugins are met.
|
||||
dnl Requires: INCLUDES and LIBS must be populated as necessary.
|
||||
dnl Inputs: $1: A series of Q_IMPORT_PLUGIN().
|
||||
dnl Inputs: $2: The libraries that resolve $1.
|
||||
dnl Output: QT_LIBS is prepended or configure exits.
|
||||
AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_PLUGINS],[
|
||||
AC_MSG_CHECKING(for static Qt plugins: $2)
|
||||
CHECK_STATIC_PLUGINS_TEMP_LIBS="$LIBS"
|
||||
LIBS="$2 $QT_LIBS $LIBS"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
#define QT_STATICPLUGIN
|
||||
#include <QtPlugin>
|
||||
$1]],
|
||||
[[return 0;]])],
|
||||
[AC_MSG_RESULT(yes); QT_LIBS="$2 $QT_LIBS"],
|
||||
[AC_MSG_RESULT(no); BITCOIN_QT_FAIL(Could not resolve: $2)])
|
||||
LIBS="$CHECK_STATIC_PLUGINS_TEMP_LIBS"
|
||||
])
|
||||
|
||||
dnl Internal. Find Qt libraries using pkg-config.
|
||||
dnl Inputs: bitcoin_qt_want_version (from --with-gui=). The version to check
|
||||
dnl first.
|
||||
dnl Inputs: $1: If bitcoin_qt_want_version is "auto", check for this version
|
||||
dnl first.
|
||||
dnl Outputs: All necessary QT_* variables are set.
|
||||
dnl Outputs: bitcoin_qt_got_major_vers is set to "4" or "5".
|
||||
dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
|
||||
AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG],[
|
||||
m4_ifdef([PKG_CHECK_MODULES],[
|
||||
auto_priority_version=$1
|
||||
if test x$auto_priority_version = x; then
|
||||
auto_priority_version=qt5
|
||||
fi
|
||||
if test x$bitcoin_qt_want_version = xqt5 || ( test x$bitcoin_qt_want_version = xauto && test x$auto_priority_version = xqt5 ); then
|
||||
QT_LIB_PREFIX=Qt5
|
||||
bitcoin_qt_got_major_vers=5
|
||||
else
|
||||
QT_LIB_PREFIX=Qt
|
||||
bitcoin_qt_got_major_vers=4
|
||||
fi
|
||||
qt5_modules="Qt5Core Qt5Gui Qt5Network Qt5Widgets"
|
||||
qt4_modules="QtCore QtGui QtNetwork"
|
||||
BITCOIN_QT_CHECK([
|
||||
if test x$bitcoin_qt_want_version = xqt5 || ( test x$bitcoin_qt_want_version = xauto && test x$auto_priority_version = xqt5 ); then
|
||||
PKG_CHECK_MODULES([QT], [$qt5_modules], [QT_INCLUDES="$QT_CFLAGS"; have_qt=yes],[have_qt=no])
|
||||
elif test x$bitcoin_qt_want_version = xqt4 || ( test x$bitcoin_qt_want_version = xauto && test x$auto_priority_version = xqt4 ); then
|
||||
PKG_CHECK_MODULES([QT], [$qt4_modules], [QT_INCLUDES="$QT_CFLAGS"; have_qt=yes], [have_qt=no])
|
||||
fi
|
||||
|
||||
dnl qt version is set to 'auto' and the preferred version wasn't found. Now try the other.
|
||||
if test x$have_qt = xno && test x$bitcoin_qt_want_version = xauto; then
|
||||
if test x$auto_priority_version = x$qt5; then
|
||||
PKG_CHECK_MODULES([QT], [$qt4_modules], [QT_INCLUDES="$QT_CFLAGS"; have_qt=yes; QT_LIB_PREFIX=Qt; bitcoin_qt_got_major_vers=4], [have_qt=no])
|
||||
else
|
||||
PKG_CHECK_MODULES([QT], [$qt5_modules], [QT_INCLUDES="$QT_CFLAGS"; have_qt=yes; QT_LIB_PREFIX=Qt5; bitcoin_qt_got_major_vers=5], [have_qt=no])
|
||||
fi
|
||||
fi
|
||||
if test x$have_qt != xyes; then
|
||||
have_qt=no
|
||||
BITCOIN_QT_FAIL([Qt dependencies not found])
|
||||
fi
|
||||
])
|
||||
BITCOIN_QT_CHECK([
|
||||
PKG_CHECK_MODULES([QT_TEST], [${QT_LIB_PREFIX}Test], [QT_TEST_INCLUDES="$QT_TEST_CFLAGS"; have_qt_test=yes], [have_qt_test=no])
|
||||
if test x$use_dbus != xno; then
|
||||
PKG_CHECK_MODULES([QT_DBUS], [${QT_LIB_PREFIX}DBus], [QT_DBUS_INCLUDES="$QT_DBUS_CFLAGS"; have_qt_dbus=yes], [have_qt_dbus=no])
|
||||
fi
|
||||
])
|
||||
])
|
||||
true; dnl
|
||||
])
|
||||
|
||||
dnl Internal. Find Qt libraries without using pkg-config. Version is deduced
|
||||
dnl from the discovered headers.
|
||||
dnl Inputs: bitcoin_qt_want_version (from --with-gui=). The version to use.
|
||||
dnl If "auto", the version will be discovered by _BITCOIN_QT_CHECK_QT5.
|
||||
dnl Outputs: All necessary QT_* variables are set.
|
||||
dnl Outputs: bitcoin_qt_got_major_vers is set to "4" or "5".
|
||||
dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
|
||||
AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
|
||||
TEMP_CPPFLAGS="$CPPFLAGS"
|
||||
TEMP_LIBS="$LIBS"
|
||||
BITCOIN_QT_CHECK([
|
||||
if test x$qt_include_path != x; then
|
||||
QT_INCLUDES="-I$qt_include_path -I$qt_include_path/QtCore -I$qt_include_path/QtGui -I$qt_include_path/QtWidgets -I$qt_include_path/QtNetwork -I$qt_include_path/QtTest -I$qt_include_path/QtDBus"
|
||||
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
|
||||
fi
|
||||
])
|
||||
|
||||
BITCOIN_QT_CHECK([AC_CHECK_HEADER([QtPlugin],,BITCOIN_QT_FAIL(QtCore headers missing))])
|
||||
BITCOIN_QT_CHECK([AC_CHECK_HEADER([QApplication],, BITCOIN_QT_FAIL(QtGui headers missing))])
|
||||
BITCOIN_QT_CHECK([AC_CHECK_HEADER([QLocalSocket],, BITCOIN_QT_FAIL(QtNetwork headers missing))])
|
||||
|
||||
BITCOIN_QT_CHECK([
|
||||
if test x$bitcoin_qt_want_version = xauto; then
|
||||
_BITCOIN_QT_CHECK_QT5
|
||||
fi
|
||||
if test x$bitcoin_cv_qt5 = xyes || test x$bitcoin_qt_want_version = xqt5; then
|
||||
QT_LIB_PREFIX=Qt5
|
||||
bitcoin_qt_got_major_vers=5
|
||||
else
|
||||
QT_LIB_PREFIX=Qt
|
||||
bitcoin_qt_got_major_vers=4
|
||||
fi
|
||||
])
|
||||
|
||||
BITCOIN_QT_CHECK([
|
||||
LIBS=
|
||||
if test x$qt_lib_path != x; then
|
||||
LIBS="$LIBS -L$qt_lib_path"
|
||||
fi
|
||||
|
||||
if test x$TARGET_OS = xwindows; then
|
||||
AC_CHECK_LIB([imm32], [main],, BITCOIN_QT_FAIL(libimm32 not found))
|
||||
fi
|
||||
])
|
||||
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([z] ,[main],,AC_MSG_WARN([zlib not found. Assuming qt has it built-in])))
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([png] ,[main],,AC_MSG_WARN([libpng not found. Assuming qt has it built-in])))
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([jpeg] ,[main],,AC_MSG_WARN([libjpeg not found. Assuming qt has it built-in])))
|
||||
BITCOIN_QT_CHECK(AC_SEARCH_LIBS([pcre16_exec], [qtpcre pcre16],,AC_MSG_WARN([libpcre16 not found. Assuming qt has it built-in])))
|
||||
BITCOIN_QT_CHECK(AC_SEARCH_LIBS([hb_ot_tags_from_script] ,[qtharfbuzzng harfbuzz],,AC_MSG_WARN([libharfbuzz not found. Assuming qt has it built-in or support is disabled])))
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Core] ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXCore not found)))
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Gui] ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXGui not found)))
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Network],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXNetwork not found)))
|
||||
if test x$bitcoin_qt_got_major_vers = x5; then
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Widgets],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXWidgets not found)))
|
||||
fi
|
||||
QT_LIBS="$LIBS"
|
||||
LIBS="$TEMP_LIBS"
|
||||
|
||||
BITCOIN_QT_CHECK([
|
||||
LIBS=
|
||||
if test x$qt_lib_path != x; then
|
||||
LIBS="-L$qt_lib_path"
|
||||
fi
|
||||
AC_CHECK_LIB([${QT_LIB_PREFIX}Test], [main],, have_qt_test=no)
|
||||
AC_CHECK_HEADER([QTest],, have_qt_test=no)
|
||||
QT_TEST_LIBS="$LIBS"
|
||||
if test x$use_dbus != xno; then
|
||||
LIBS=
|
||||
if test x$qt_lib_path != x; then
|
||||
LIBS="-L$qt_lib_path"
|
||||
fi
|
||||
AC_CHECK_LIB([${QT_LIB_PREFIX}DBus], [main],, have_qt_dbus=no)
|
||||
AC_CHECK_HEADER([QtDBus],, have_qt_dbus=no)
|
||||
QT_DBUS_LIBS="$LIBS"
|
||||
fi
|
||||
])
|
||||
CPPFLAGS="$TEMP_CPPFLAGS"
|
||||
LIBS="$TEMP_LIBS"
|
||||
])
|
||||
|
138
configure.ac
138
configure.ac
|
@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
|
|||
AC_PREREQ([2.60])
|
||||
define(_CLIENT_VERSION_MAJOR, 1)
|
||||
define(_CLIENT_VERSION_MINOR, 0)
|
||||
define(_CLIENT_VERSION_REVISION, 6)
|
||||
define(_CLIENT_VERSION_REVISION, 8)
|
||||
define(_CLIENT_VERSION_BUILD, 50)
|
||||
define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50)))
|
||||
define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1)))
|
||||
|
@ -88,6 +88,12 @@ AC_ARG_ENABLE([mining],
|
|||
[enable_mining=$enableval],
|
||||
[enable_mining=yes])
|
||||
|
||||
AC_ARG_ENABLE([rust],
|
||||
[AS_HELP_STRING([--enable-rust],
|
||||
[enable rust (default is yes)])],
|
||||
[enable_rust=$enableval],
|
||||
[enable_rust=yes])
|
||||
|
||||
AC_ARG_WITH([miniupnpc],
|
||||
[AS_HELP_STRING([--with-miniupnpc],
|
||||
[enable UPNP (default is yes if libminiupnpc is found)])],
|
||||
|
@ -105,11 +111,6 @@ AC_ARG_ENABLE(tests,
|
|||
[use_tests=$enableval],
|
||||
[use_tests=yes])
|
||||
|
||||
AC_ARG_ENABLE(gui-tests,
|
||||
AS_HELP_STRING([--disable-gui-tests],[do not compile GUI tests (default is to compile if GUI and tests enabled)]),
|
||||
[use_gui_tests=$enableval],
|
||||
[use_gui_tests=$use_tests])
|
||||
|
||||
AC_ARG_WITH([comparison-tool],
|
||||
AS_HELP_STRING([--with-comparison-tool],[path to java comparison tool (requires --enable-tests)]),
|
||||
[use_comparison_tool=$withval],
|
||||
|
@ -120,12 +121,6 @@ AC_ARG_ENABLE([comparison-tool-reorg-tests],
|
|||
[use_comparison_tool_reorg_tests=$enableval],
|
||||
[use_comparison_tool_reorg_tests=no])
|
||||
|
||||
AC_ARG_WITH([qrencode],
|
||||
[AS_HELP_STRING([--with-qrencode],
|
||||
[enable QR code support (default is yes if qt is enabled and libqrencode is found)])],
|
||||
[use_qr=$withval],
|
||||
[use_qr=auto])
|
||||
|
||||
AC_ARG_ENABLE([hardening],
|
||||
[AS_HELP_STRING([--enable-hardening],
|
||||
[attempt to harden the resulting executables (default is yes)])],
|
||||
|
@ -164,6 +159,12 @@ AC_ARG_ENABLE([zmq],
|
|||
|
||||
AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[specify protoc bin path])], [protoc_bin_path=$withval], [])
|
||||
|
||||
AC_ARG_ENABLE(man,
|
||||
[AS_HELP_STRING([--disable-man],
|
||||
[do not install man pages (default is to install)])],,
|
||||
enable_man=yes)
|
||||
AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
|
||||
|
||||
# Enable debug
|
||||
AC_ARG_ENABLE([debug],
|
||||
[AS_HELP_STRING([--enable-debug],
|
||||
|
@ -172,12 +173,13 @@ AC_ARG_ENABLE([debug],
|
|||
[enable_debug=no])
|
||||
|
||||
if test "x$enable_debug" = xyes; then
|
||||
CPPFLAGS="$CPPFLAGS -DDEBUG -DDEBUG_LOCKORDER"
|
||||
if test "x$GCC" = xyes; then
|
||||
CFLAGS="-g3 -O0 -DDEBUG"
|
||||
CFLAGS="$CFLAGS -g3 -O0"
|
||||
fi
|
||||
|
||||
if test "x$GXX" = xyes; then
|
||||
CXXFLAGS="-g3 -O0 -DDEBUG"
|
||||
CXXFLAGS="$CXXFLAGS -g3 -O0"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -187,7 +189,7 @@ fi
|
|||
if test "x$CXXFLAGS_overridden" = "xno"; then
|
||||
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wno-self-assign"
|
||||
fi
|
||||
CPPFLAGS="$CPPFLAGS -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS"
|
||||
CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS"
|
||||
|
||||
AC_ARG_WITH([utils],
|
||||
[AS_HELP_STRING([--with-utils],
|
||||
|
@ -294,11 +296,10 @@ case $host in
|
|||
dnl in expected paths because they may conflict with system files. Ask
|
||||
dnl Homebrew where each one is located, then adjust paths accordingly.
|
||||
dnl It's safe to add these paths even if the functionality is disabled by
|
||||
dnl the user (--without-wallet or --without-gui for example).
|
||||
dnl the user (--without-wallet for example).
|
||||
|
||||
openssl_prefix=`$BREW --prefix openssl 2>/dev/null`
|
||||
bdb_prefix=`$BREW --prefix berkeley-db4 2>/dev/null`
|
||||
qt5_prefix=`$BREW --prefix qt5 2>/dev/null`
|
||||
if test x$openssl_prefix != x; then
|
||||
PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
export PKG_CONFIG_PATH
|
||||
|
@ -307,10 +308,6 @@ case $host in
|
|||
CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
|
||||
LIBS="$LIBS -L$bdb_prefix/lib"
|
||||
fi
|
||||
if test x$qt5_prefix != x; then
|
||||
PKG_CONFIG_PATH="$qt5_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
export PKG_CONFIG_PATH
|
||||
fi
|
||||
fi
|
||||
else
|
||||
case $build_os in
|
||||
|
@ -545,12 +542,7 @@ if test x$use_upnp != xno; then
|
|||
)
|
||||
fi
|
||||
|
||||
BITCOIN_QT_INIT
|
||||
|
||||
dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
|
||||
BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt4])
|
||||
|
||||
if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests = xnononono; then
|
||||
if test x$build_bitcoin_utils$build_bitcoind$use_tests = xnonono; then
|
||||
use_boost=no
|
||||
else
|
||||
use_boost=yes
|
||||
|
@ -694,9 +686,11 @@ if test x$use_pkgconfig = xyes; then
|
|||
[
|
||||
PKG_CHECK_MODULES([SSL], [libssl],, [AC_MSG_ERROR(openssl not found.)])
|
||||
PKG_CHECK_MODULES([CRYPTO], [libcrypto],,[AC_MSG_ERROR(libcrypto not found.)])
|
||||
BITCOIN_QT_CHECK([PKG_CHECK_MODULES([PROTOBUF], [protobuf], [have_protobuf=yes], [BITCOIN_QT_FAIL(libprotobuf not found)])])
|
||||
if test x$use_qr != xno; then
|
||||
BITCOIN_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])])
|
||||
if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests != xnononono; then
|
||||
PKG_CHECK_MODULES([EVENT], [libevent],, [AC_MSG_ERROR(libevent not found.)])
|
||||
if test x$TARGET_OS != xwindows; then
|
||||
PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads],, [AC_MSG_ERROR(libevent_pthreads not found.)])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$use_zmq" = "xyes"; then
|
||||
|
@ -720,6 +714,14 @@ else
|
|||
AC_CHECK_HEADER([openssl/ssl.h],, AC_MSG_ERROR(libssl headers missing),)
|
||||
AC_CHECK_LIB([ssl], [main],SSL_LIBS=-lssl, AC_MSG_ERROR(libssl missing))
|
||||
|
||||
if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests != xnononono; then
|
||||
AC_CHECK_HEADER([event2/event.h],, AC_MSG_ERROR(libevent headers missing),)
|
||||
AC_CHECK_LIB([event],[main],EVENT_LIBS=-levent,AC_MSG_ERROR(libevent missing))
|
||||
if test x$TARGET_OS != xwindows; then
|
||||
AC_CHECK_LIB([event_pthreads],[main],EVENT_PTHREADS_LIBS=-levent_pthreads,AC_MSG_ERROR(libevent_pthreads missing))
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$use_zmq" = "xyes"; then
|
||||
AC_CHECK_HEADER([zmq.h],
|
||||
[AC_DEFINE([ENABLE_ZMQ],[1],[Define to 1 to enable ZMQ functions])],
|
||||
|
@ -742,12 +744,6 @@ else
|
|||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([protobuf] ,[main],[PROTOBUF_LIBS=-lprotobuf], BITCOIN_QT_FAIL(libprotobuf not found)))
|
||||
if test x$use_qr != xno; then
|
||||
BITCOIN_QT_CHECK([AC_CHECK_LIB([qrencode], [main],[QR_LIBS=-lqrencode], [have_qrencode=no])])
|
||||
BITCOIN_QT_CHECK([AC_CHECK_HEADER([qrencode.h],, have_qrencode=no)])
|
||||
fi
|
||||
fi
|
||||
|
||||
# These packages don't provide pkgconfig config files across all
|
||||
|
@ -774,7 +770,12 @@ CPPFLAGS="-I$LIBSNARK_INCDIR $CPPFLAGS"
|
|||
AC_CHECK_HEADER([libsnark/gadgetlib1/gadget.hpp],,AC_MSG_ERROR(libsnark headers missing))
|
||||
AC_CHECK_LIB([snark],[main],LIBSNARK_LIBS=-lsnark, [AC_MSG_ERROR(libsnark missing)], [-lgmpxx])
|
||||
|
||||
LIBZCASH_LIBS="-lsnark -lgmp -lgmpxx -lboost_system-mt -lcrypto -lsodium -fopenmp"
|
||||
RUST_LIBS=""
|
||||
if test x$enable_rust != xno; then
|
||||
RUST_LIBS="-lrustzcash"
|
||||
fi
|
||||
|
||||
LIBZCASH_LIBS="-lsnark -lgmp -lgmpxx -lboost_system-mt -lcrypto -lsodium -fopenmp $RUST_LIBS"
|
||||
|
||||
CXXFLAGS_TEMP="$CXXFLAGS"
|
||||
LIBS_TEMP="$LIBS"
|
||||
|
@ -784,8 +785,6 @@ AC_CHECK_HEADER([openssl/ec.h],, AC_MSG_ERROR(OpenSSL ec header missing),)
|
|||
CXXFLAGS="$CXXFLAGS_TEMP"
|
||||
LIBS="$LIBS_TEMP"
|
||||
|
||||
BITCOIN_QT_PATH_PROGS([PROTOC], [protoc],$protoc_bin_path)
|
||||
|
||||
AC_MSG_CHECKING([whether to build bitcoind])
|
||||
AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes])
|
||||
AC_MSG_RESULT($build_bitcoind)
|
||||
|
@ -844,6 +843,16 @@ else
|
|||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
dnl enable rust
|
||||
AC_MSG_CHECKING([if rust should be enabled])
|
||||
if test x$enable_rust != xno; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(ENABLE_RUST, 1, [Define to 1 to enable Rust language dependent functions])
|
||||
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
dnl enable upnp support
|
||||
AC_MSG_CHECKING([whether to build with support for UPnP])
|
||||
if test x$have_miniupnpc = xno; then
|
||||
|
@ -871,46 +880,6 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
dnl these are only used when qt is enabled
|
||||
BUILD_TEST_QT=""
|
||||
if test x$bitcoin_enable_qt != xno; then
|
||||
dnl enable dbus support
|
||||
AC_MSG_CHECKING([whether to build GUI with support for D-Bus])
|
||||
if test x$bitcoin_enable_qt_dbus != xno; then
|
||||
AC_DEFINE([USE_DBUS],[1],[Define if dbus support should be compiled in])
|
||||
fi
|
||||
AC_MSG_RESULT($bitcoin_enable_qt_dbus)
|
||||
|
||||
dnl enable qr support
|
||||
AC_MSG_CHECKING([whether to build GUI with support for QR codes])
|
||||
if test x$have_qrencode = xno; then
|
||||
if test x$use_qr = xyes; then
|
||||
AC_MSG_ERROR("QR support requested but cannot be built. use --without-qrencode")
|
||||
fi
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
if test x$use_qr != xno; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([USE_QRCODE],[1],[Define if QR support should be compiled in])
|
||||
use_qr=yes
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x$XGETTEXT = x; then
|
||||
AC_MSG_WARN("xgettext is required to update qt translations")
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether to build test_bitcoin-qt])
|
||||
if test x$use_gui_tests$bitcoin_enable_qt_test = xyesyes; then
|
||||
AC_MSG_RESULT([yes])
|
||||
BUILD_TEST_QT="yes"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([ENABLE_ZMQ], [test "x$use_zmq" = "xyes"])
|
||||
|
||||
AC_MSG_CHECKING([whether to build test_bitcoin])
|
||||
|
@ -929,8 +898,8 @@ else
|
|||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
if test x$build_bitcoin_utils$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_tests = xnonononono; then
|
||||
AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui or --enable-tests])
|
||||
if test x$build_bitcoin_utils$build_bitcoin_libs$build_bitcoind$use_tests = xnononono; then
|
||||
AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon or --enable-tests])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin])
|
||||
|
@ -938,10 +907,8 @@ AM_CONDITIONAL([BUILD_DARWIN], [test x$BUILD_OS = xdarwin])
|
|||
AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
|
||||
AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes])
|
||||
AM_CONDITIONAL([ENABLE_MINING],[test x$enable_mining = xyes])
|
||||
AM_CONDITIONAL([ENABLE_RUST],[test x$enable_rust = xyes])
|
||||
AM_CONDITIONAL([ENABLE_TESTS],[test x$BUILD_TEST = xyes])
|
||||
AM_CONDITIONAL([ENABLE_QT],[test x$bitcoin_enable_qt = xyes])
|
||||
AM_CONDITIONAL([ENABLE_QT_TESTS],[test x$BUILD_TEST_QT = xyes])
|
||||
AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes])
|
||||
AM_CONDITIONAL([USE_LCOV],[test x$use_lcov = xyes])
|
||||
AM_CONDITIONAL([USE_COMPARISON_TOOL],[test x$use_comparison_tool != xno])
|
||||
AM_CONDITIONAL([USE_COMPARISON_TOOL_REORG_TESTS],[test x$use_comparison_tool_reorg_test != xno])
|
||||
|
@ -964,7 +931,6 @@ AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR)
|
|||
AC_SUBST(RELDFLAGS)
|
||||
AC_SUBST(LIBTOOL_APP_LDFLAGS)
|
||||
AC_SUBST(USE_UPNP)
|
||||
AC_SUBST(USE_QRCODE)
|
||||
AC_SUBST(BOOST_LIBS)
|
||||
AC_SUBST(TESTDEFS)
|
||||
AC_SUBST(LEVELDB_TARGET_FLAGS)
|
||||
|
@ -974,7 +940,7 @@ AC_SUBST(GMP_LIBS)
|
|||
AC_SUBST(GMPXX_LIBS)
|
||||
AC_SUBST(LIBSNARK_LIBS)
|
||||
AC_SUBST(LIBZCASH_LIBS)
|
||||
AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py])
|
||||
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi src/test/buildenv.py])
|
||||
AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh])
|
||||
AC_CONFIG_FILES([qa/pull-tester/tests-config.sh],[chmod +x qa/pull-tester/tests-config.sh])
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
*** Warning: This document has not been updated for Zcash and may be inaccurate. ***
|
||||
|
||||
Wallet Tools
|
||||
---------------------
|
||||
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
FORMS += \
|
||||
../src/qt/forms/aboutdialog.ui \
|
||||
../src/qt/forms/addressbookpage.ui \
|
||||
../src/qt/forms/askpassphrasedialog.ui \
|
||||
../src/qt/forms/coincontroldialog.ui \
|
||||
../src/qt/forms/editaddressdialog.ui \
|
||||
../src/qt/forms/helpmessagedialog.ui \
|
||||
../src/qt/forms/intro.ui \
|
||||
../src/qt/forms/openuridialog.ui \
|
||||
../src/qt/forms/optionsdialog.ui \
|
||||
../src/qt/forms/overviewpage.ui \
|
||||
../src/qt/forms/receivecoinsdialog.ui \
|
||||
../src/qt/forms/receiverequestdialog.ui \
|
||||
../src/qt/forms/rpcconsole.ui \
|
||||
../src/qt/forms/sendcoinsdialog.ui \
|
||||
../src/qt/forms/sendcoinsentry.ui \
|
||||
../src/qt/forms/signverifymessagedialog.ui \
|
||||
../src/qt/forms/transactiondescdialog.ui \
|
||||
|
||||
RESOURCES += \
|
||||
../src/qt/bitcoin.qrc
|
|
@ -1,5 +1,6 @@
|
|||
# bash programmable completion for bitcoind(1) and bitcoin-qt(1)
|
||||
# Copyright (c) 2012-2016 The Bitcoin Core developers
|
||||
# bash programmable completion for zcashd(1)
|
||||
# Copyright (c) 2012-2017 The Bitcoin Core developers
|
||||
# Copyright (c) 2016-2017 The Zcash developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
@ -7,7 +8,7 @@ _zcashd() {
|
|||
local cur prev words=() cword
|
||||
local bitcoind
|
||||
|
||||
# save and use original argument to invoke bitcoind for -help
|
||||
# save and use original argument to invoke zcashd for -help
|
||||
# it might not be in $PATH
|
||||
bitcoind="$1"
|
||||
|
||||
|
@ -15,7 +16,7 @@ _zcashd() {
|
|||
_get_comp_words_by_ref -n = cur prev words cword
|
||||
|
||||
case "$cur" in
|
||||
-conf=*|-pid=*|-loadblock=*|-rootcertificates=*|-rpccookiefile=*|-wallet=*|-rpcsslcertificatechainfile=*|-rpcsslprivatekeyfile=*)
|
||||
-conf=*|-pid=*|-loadblock=*|-rpccookiefile=*|-wallet=*)
|
||||
cur="${cur#*=}"
|
||||
_filedir
|
||||
return 0
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
zcash (1.0.8) jessie; urgency=medium
|
||||
|
||||
* 1.0.8 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Mon, 27 Mar 2017 21:30:07 +0100
|
||||
|
||||
zcash (1.0.7+1) jessie; urgency=medium
|
||||
|
||||
* 1.0.7-1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Wed, 08 Mar 2017 13:51:11 -0800
|
||||
|
||||
zcash (1.0.7) jessie; urgency=medium
|
||||
|
||||
* 1.0.7 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Fri, 03 Mar 2017 20:55:04 -0800
|
||||
|
||||
zcash (1.0.6) jessie; urgency=medium
|
||||
|
||||
* 1.0.6 release.
|
||||
|
@ -8,7 +26,7 @@ zcash (1.0.5) jessie; urgency=medium
|
|||
|
||||
* 1.0.5 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Thu, 19 Jan 2016 19:23:40 -0700
|
||||
-- Zcash Company <team@z.cash> Thu, 19 Jan 2017 19:23:40 -0700
|
||||
|
||||
zcash (1.0.4) jessie; urgency=medium
|
||||
|
||||
|
|
|
@ -4,67 +4,13 @@ Upstream-Contact: Zcash Company <team@z.cash>
|
|||
Source: https://github.com/zcash/zcash
|
||||
|
||||
Files: *
|
||||
Copyright: 2016, The Zcash developers
|
||||
2009-2015, Bitcoin Core developers
|
||||
Copyright: 2016-2017, The Zcash developers
|
||||
2009-2017, Bitcoin Core developers
|
||||
License: Expat
|
||||
Comment: The Bitcoin Core developers encompasses the current developers listed on bitcoin.org,
|
||||
as well as the numerous contributors to the project.
|
||||
The Zcash developers are listed at https://z.cash/team.html.
|
||||
|
||||
Files: src/qt/res/icons/clock*.png, src/qt/res/icons/tx*.png,
|
||||
src/qt/res/src/*.svg
|
||||
Copyright: Wladimir van der Laan
|
||||
License: Expat
|
||||
|
||||
Files: src/qt/res/icons/address-book.png, src/qt/res/icons/export.png,
|
||||
src/qt/res/icons/history.png, src/qt/res/icons/key.png,
|
||||
src/qt/res/icons/lock_*.png, src/qt/res/icons/overview.png,
|
||||
src/qt/res/icons/receive.png, src/qt/res/icons/send.png,
|
||||
src/qt/res/icons/synced.png, src/qt/res/icons/filesave.png
|
||||
Copyright: David Vignoni (david@icon-king.com)
|
||||
ICON KING - www.icon-king.com
|
||||
License: LGPL
|
||||
Comment: NUVOLA ICON THEME for KDE 3.x
|
||||
Original icons: kaddressbook, klipper_dock, view-list-text,
|
||||
key-password, encrypted/decrypted, go-home, go-down,
|
||||
go-next, dialog-ok
|
||||
Site: http://www.icon-king.com/projects/nuvola/
|
||||
|
||||
Files: src/qt/res/icons/connect*.png
|
||||
Copyright: schollidesign
|
||||
License: GPL-3+
|
||||
Comment: Icon Pack: Human-O2
|
||||
Site: http://findicons.com/icon/93743/blocks_gnome_netstatus_0
|
||||
|
||||
Files: src/qt/res/icons/transaction*.png
|
||||
Copyright: md2k7
|
||||
License: Expat
|
||||
Comment: Site: https://bitcointalk.org/index.php?topic=15276.0
|
||||
|
||||
Files: src/qt/res/icons/configure.png, src/qt/res/icons/quit.png,
|
||||
src/qt/res/icons/editcopy.png, src/qt/res/icons/editpaste.png,
|
||||
src/qt/res/icons/add.png, src/qt/res/icons/edit.png,
|
||||
src/qt/res/icons/remove.png
|
||||
Copyright: http://www.everaldo.com
|
||||
License: LGPL
|
||||
Comment: Icon Pack: Crystal SVG
|
||||
|
||||
Files: src/qt/res/icons/bitcoin.png, src/qt/res/icons/toolbar.png
|
||||
Copyright: Bitboy (optimized for 16x16 by Wladimir van der Laan)
|
||||
License: PUB-DOM
|
||||
Comment: Site: https://bitcointalk.org/?topic=1756.0
|
||||
|
||||
Files: scripts/img/reload.xcf, src/qt/res/movies/*.png
|
||||
Copyright: Everaldo (Everaldo Coelho)
|
||||
License: GPL-3+
|
||||
Comment: Icon Pack: Kids
|
||||
Site: http://findicons.com/icon/17102/reload?id=17102
|
||||
|
||||
Files: src/qt/res/images/splash2.jpg
|
||||
License: PUB-DOM
|
||||
Copyright: Crobbo (forum)
|
||||
Comment: Site: https://bitcointalk.org/index.php?topic=32273.0
|
||||
|
||||
Files: depends/sources/libsodium-*.tar.gz
|
||||
Copyright: 2013-2016 Frank Denis
|
||||
License: ISC
|
||||
|
@ -1102,54 +1048,21 @@ License: ISC
|
|||
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
SOFTWARE.
|
||||
|
||||
License: GPL-2+
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
.
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
Comment:
|
||||
On Debian systems the GNU General Public License (GPL) version 2 is
|
||||
located in '/usr/share/common-licenses/GPL-2'.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
License: GPL-3+
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU General Public License, Version 3 or any
|
||||
later version published by the Free Software Foundation.
|
||||
Comment:
|
||||
On Debian systems the GNU General Public License (GPL) version 3 is
|
||||
located in '/usr/share/common-licenses/GPL-3'.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
License: LGPL
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
.
|
||||
On Debian systems the GNU Lesser General Public License (LGPL) is
|
||||
located in '/usr/share/common-licenses/LGPL'.
|
||||
.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
Comment:
|
||||
On Debian systems the GNU Lesser General Public License (LGPL) is
|
||||
located in '/usr/share/common-licenses/LGPL'.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
License: PUB-DOM
|
||||
This work is in the public domain.
|
||||
|
||||
License: LGPL-with-ZeroMQ-exception
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
|
||||
# How many seconds zcash will wait for a complete RPC HTTP request.
|
||||
# after the HTTP connection is established.
|
||||
#rpctimeout=30
|
||||
#rpcclienttimeout=30
|
||||
|
||||
# By default, only RPC connections from localhost are allowed.
|
||||
# Specify as many rpcallowip= settings as you like to allow connections from other hosts,
|
||||
|
@ -95,15 +95,6 @@
|
|||
# running on another host using this option:
|
||||
#rpcconnect=127.0.0.1
|
||||
|
||||
# Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate
|
||||
# with Zcash -server or zcashd
|
||||
#rpcssl=1
|
||||
|
||||
# OpenSSL settings used when rpcssl=1
|
||||
#rpcsslciphers=TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH
|
||||
#rpcsslcertificatechainfile=server.cert
|
||||
#rpcsslprivatekeyfile=server.pem
|
||||
|
||||
# Transaction Fee
|
||||
|
||||
# Send transactions as zero-fee transactions if possible (default: 0)
|
||||
|
|
|
@ -81,6 +81,12 @@ It will do the following automatically:
|
|||
|
||||
See doc/translation-process.md for more information.
|
||||
|
||||
gen-manpages.sh
|
||||
===============
|
||||
|
||||
A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option.
|
||||
This requires help2man which can be found at: https://www.gnu.org/software/help2man/
|
||||
|
||||
git-subtree-check.sh
|
||||
====================
|
||||
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/sh
|
||||
|
||||
TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
|
||||
SRCDIR=${SRCDIR:-$TOPDIR/src}
|
||||
MANDIR=${MANDIR:-$TOPDIR/doc/man}
|
||||
|
||||
ZCASHD=${ZCASHD:-$SRCDIR/zcashd}
|
||||
ZCASHCLI=${ZCASHCLI:-$SRCDIR/zcash-cli}
|
||||
ZCASHTX=${ZCASHTX:-$SRCDIR/zcash-tx}
|
||||
|
||||
[ ! -x $ZCASHD ] && echo "$ZCASHD not found or not executable." && exit 1
|
||||
|
||||
# The autodetected version git tag can screw up manpage output a little bit
|
||||
ZECVER=($($ZCASHCLI --version | head -n1 | awk -F'[ -]' '{ print $5, $6 }'))
|
||||
|
||||
# Create a footer file with copyright content.
|
||||
# This gets autodetected fine for zcashd if --version-string is not set,
|
||||
# but has different outcomes for zcash-cli.
|
||||
echo "[COPYRIGHT]" > footer.h2m
|
||||
$ZCASHD --version | sed -n '1!p' >> footer.h2m
|
||||
|
||||
for cmd in $ZCASHD $ZCASHCLI $ZCASHTX; do
|
||||
cmdname="${cmd##*/}"
|
||||
help2man -N --version-string=${ZECVER[0]} --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd}
|
||||
sed -i "s/\\\-${ZECVER[1]}//g" ${MANDIR}/${cmdname}.1
|
||||
done
|
||||
|
||||
rm -f footer.h2m
|
|
@ -53,21 +53,17 @@ READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')
|
|||
CPPFILT_CMD = os.getenv('CPPFILT', '/usr/bin/c++filt')
|
||||
# Allowed NEEDED libraries
|
||||
ALLOWED_LIBRARIES = {
|
||||
# bitcoind and bitcoin-qt
|
||||
# zcashd
|
||||
'libgcc_s.so.1', # GCC base support
|
||||
'libc.so.6', # C library
|
||||
'libstdc++.so.6', # C++ standard library
|
||||
'libpthread.so.0', # threading
|
||||
'libanl.so.1', # DNS resolve
|
||||
'libm.so.6', # math library
|
||||
'librt.so.1', # real-time (clock)
|
||||
'libgomp.so.1', # OpenMP support library
|
||||
'ld-linux-x86-64.so.2', # 64-bit dynamic linker
|
||||
'ld-linux.so.2', # 32-bit dynamic linker
|
||||
# bitcoin-qt only
|
||||
'libX11-xcb.so.1', # part of X11
|
||||
'libX11.so.6', # part of X11
|
||||
'libxcb.so.1', # part of X11
|
||||
'libfontconfig.so.1', # font support
|
||||
'libfreetype.so.6', # font parsing
|
||||
'libdl.so.2' # programming interface to dynamic linker
|
||||
}
|
||||
|
||||
|
|
|
@ -1,186 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
# Copyright (c) 2014 Wladimir J. van der Laan
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
'''
|
||||
Run this script from the root of the repository to update all translations from
|
||||
transifex.
|
||||
It will do the following automatically:
|
||||
|
||||
- fetch all translations using the tx tool
|
||||
- post-process them into valid and committable format
|
||||
- remove invalid control characters
|
||||
- remove location tags (makes diffs less noisy)
|
||||
|
||||
TODO:
|
||||
- auto-add new translations to the build system according to the translation process
|
||||
'''
|
||||
from __future__ import division, print_function
|
||||
import subprocess
|
||||
import re
|
||||
import sys
|
||||
import os
|
||||
import io
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
# Name of transifex tool
|
||||
TX = 'tx'
|
||||
# Name of source language file
|
||||
SOURCE_LANG = 'bitcoin_en.ts'
|
||||
# Directory with locale files
|
||||
LOCALE_DIR = 'src/qt/locale'
|
||||
|
||||
def check_at_repository_root():
|
||||
if not os.path.exists('.git'):
|
||||
print('No .git directory found')
|
||||
print('Execute this script at the root of the repository', file=sys.stderr)
|
||||
exit(1)
|
||||
|
||||
def fetch_all_translations():
|
||||
if subprocess.call([TX, 'pull', '-f']):
|
||||
print('Error while fetching translations', file=sys.stderr)
|
||||
exit(1)
|
||||
|
||||
def find_format_specifiers(s):
|
||||
'''Find all format specifiers in a string.'''
|
||||
pos = 0
|
||||
specifiers = []
|
||||
while True:
|
||||
percent = s.find('%', pos)
|
||||
if percent < 0:
|
||||
break
|
||||
specifiers.append(s[percent+1])
|
||||
pos = percent+2
|
||||
return specifiers
|
||||
|
||||
def split_format_specifiers(specifiers):
|
||||
'''Split format specifiers between numeric (Qt) and others (strprintf)'''
|
||||
numeric = []
|
||||
other = []
|
||||
for s in specifiers:
|
||||
if s in {'1','2','3','4','5','6','7','8','9'}:
|
||||
numeric.append(s)
|
||||
else:
|
||||
other.append(s)
|
||||
|
||||
# numeric (Qt) can be present in any order, others (strprintf) must be in specified order
|
||||
return set(numeric),other
|
||||
|
||||
def sanitize_string(s):
|
||||
'''Sanitize string for printing'''
|
||||
return s.replace('\n',' ')
|
||||
|
||||
def check_format_specifiers(source, translation, errors):
|
||||
source_f = split_format_specifiers(find_format_specifiers(source))
|
||||
# assert that no source messages contain both Qt and strprintf format specifiers
|
||||
# if this fails, go change the source as this is hacky and confusing!
|
||||
assert(not(source_f[0] and source_f[1]))
|
||||
try:
|
||||
translation_f = split_format_specifiers(find_format_specifiers(translation))
|
||||
except IndexError:
|
||||
errors.append("Parse error in translation '%s'" % sanitize_string(translation))
|
||||
return False
|
||||
else:
|
||||
if source_f != translation_f:
|
||||
errors.append("Mismatch between '%s' and '%s'" % (sanitize_string(source), sanitize_string(translation)))
|
||||
return False
|
||||
return True
|
||||
|
||||
def all_ts_files(suffix=''):
|
||||
for filename in os.listdir(LOCALE_DIR):
|
||||
# process only language files, and do not process source language
|
||||
if not filename.endswith('.ts'+suffix) or filename == SOURCE_LANG+suffix:
|
||||
continue
|
||||
if suffix: # remove provided suffix
|
||||
filename = filename[0:-len(suffix)]
|
||||
filepath = os.path.join(LOCALE_DIR, filename)
|
||||
yield(filename, filepath)
|
||||
|
||||
FIX_RE = re.compile(b'[\x00-\x09\x0b\x0c\x0e-\x1f]')
|
||||
def remove_invalid_characters(s):
|
||||
'''Remove invalid characters from translation string'''
|
||||
return FIX_RE.sub(b'', s)
|
||||
|
||||
# Override cdata escape function to make our output match Qt's (optional, just for cleaner diffs for
|
||||
# comparison, disable by default)
|
||||
_orig_escape_cdata = None
|
||||
def escape_cdata(text):
|
||||
text = _orig_escape_cdata(text)
|
||||
text = text.replace("'", ''')
|
||||
text = text.replace('"', '"')
|
||||
return text
|
||||
|
||||
def postprocess_translations(reduce_diff_hacks=False):
|
||||
print('Checking and postprocessing...')
|
||||
|
||||
if reduce_diff_hacks:
|
||||
global _orig_escape_cdata
|
||||
_orig_escape_cdata = ET._escape_cdata
|
||||
ET._escape_cdata = escape_cdata
|
||||
|
||||
for (filename,filepath) in all_ts_files():
|
||||
os.rename(filepath, filepath+'.orig')
|
||||
|
||||
have_errors = False
|
||||
for (filename,filepath) in all_ts_files('.orig'):
|
||||
# pre-fixups to cope with transifex output
|
||||
parser = ET.XMLParser(encoding='utf-8') # need to override encoding because 'utf8' is not understood only 'utf-8'
|
||||
with open(filepath + '.orig', 'rb') as f:
|
||||
data = f.read()
|
||||
# remove control characters; this must be done over the entire file otherwise the XML parser will fail
|
||||
data = remove_invalid_characters(data)
|
||||
tree = ET.parse(io.BytesIO(data), parser=parser)
|
||||
|
||||
# iterate over all messages in file
|
||||
root = tree.getroot()
|
||||
for context in root.findall('context'):
|
||||
for message in context.findall('message'):
|
||||
numerus = message.get('numerus') == 'yes'
|
||||
source = message.find('source').text
|
||||
translation_node = message.find('translation')
|
||||
# pick all numerusforms
|
||||
if numerus:
|
||||
translations = [i.text for i in translation_node.findall('numerusform')]
|
||||
else:
|
||||
translations = [translation_node.text]
|
||||
|
||||
for translation in translations:
|
||||
if translation is None:
|
||||
continue
|
||||
errors = []
|
||||
valid = check_format_specifiers(source, translation, errors)
|
||||
|
||||
for error in errors:
|
||||
print('%s: %s' % (filename, error))
|
||||
|
||||
if not valid: # set type to unfinished and clear string if invalid
|
||||
translation_node.clear()
|
||||
translation_node.set('type', 'unfinished')
|
||||
have_errors = True
|
||||
|
||||
# Remove location tags
|
||||
for location in message.findall('location'):
|
||||
message.remove(location)
|
||||
|
||||
# Remove entire message if it is an unfinished translation
|
||||
if translation_node.get('type') == 'unfinished':
|
||||
context.remove(message)
|
||||
|
||||
# write fixed-up tree
|
||||
# if diff reduction requested, replace some XML to 'sanitize' to qt formatting
|
||||
if reduce_diff_hacks:
|
||||
out = io.BytesIO()
|
||||
tree.write(out, encoding='utf-8')
|
||||
out = out.getvalue()
|
||||
out = out.replace(b' />', b'/>')
|
||||
with open(filepath, 'wb') as f:
|
||||
f.write(out)
|
||||
else:
|
||||
tree.write(filepath, encoding='utf-8')
|
||||
return have_errors
|
||||
|
||||
if __name__ == '__main__':
|
||||
check_at_repository_root()
|
||||
fetch_all_translations()
|
||||
postprocess_translations()
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
name: "zcash-1.0.6"
|
||||
name: "zcash-1.0.8"
|
||||
enable_cache: true
|
||||
distro: "debian"
|
||||
suites:
|
||||
|
@ -31,8 +31,8 @@ files: []
|
|||
script: |
|
||||
WRAP_DIR=$HOME/wrapped
|
||||
HOSTS="x86_64-unknown-linux-gnu"
|
||||
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests --with-gui=no --enable-hardening"
|
||||
MAKEOPTS="V=1 NO_QT=1"
|
||||
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --enable-hardening"
|
||||
MAKEOPTS="V=1"
|
||||
FAKETIME_HOST_PROGS=""
|
||||
FAKETIME_PROGS="date ar ranlib nm strip objcopy"
|
||||
HOST_CFLAGS="-fwrapv -fno-strict-aliasing -Werror -g"
|
||||
|
@ -134,4 +134,3 @@ script: |
|
|||
mv $SOURCEDIST $OUTDIR/src
|
||||
mv ${OUTDIR}/${DISTNAME}-x86_64-*-debug.tar.gz ${OUTDIR}/${DISTNAME}-linux64-debug.tar.gz
|
||||
mv ${OUTDIR}/${DISTNAME}-x86_64-*.tar.gz ${OUTDIR}/${DISTNAME}-linux64.tar.gz
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ files:
|
|||
script: |
|
||||
WRAP_DIR=$HOME/wrapped
|
||||
HOSTS="x86_64-apple-darwin11"
|
||||
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests GENISOIMAGE=$WRAP_DIR/genisoimage"
|
||||
CONFIGFLAGS="--enable-reduce-exports --disable-bench GENISOIMAGE=$WRAP_DIR/genisoimage"
|
||||
FAKETIME_HOST_PROGS=""
|
||||
FAKETIME_PROGS="ar ranlib date dmg genisoimage"
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ files: []
|
|||
script: |
|
||||
WRAP_DIR=$HOME/wrapped
|
||||
HOSTS="x86_64-w64-mingw32 i686-w64-mingw32"
|
||||
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests"
|
||||
CONFIGFLAGS="--enable-reduce-exports --disable-bench"
|
||||
FAKETIME_HOST_PROGS="g++ ar ranlib nm windres strip objcopy"
|
||||
FAKETIME_PROGS="date makensis zip"
|
||||
HOST_CFLAGS="-O2 -g"
|
||||
|
|
|
@ -32,7 +32,11 @@ required_files="${BITCOIND_CONFIGFILE}"
|
|||
start_stop_daemon_args="-u ${BITCOIND_USER} \
|
||||
-N ${BITCOIND_NICE} -w 2000"
|
||||
pidfile="${BITCOIND_PIDFILE}"
|
||||
retry=60
|
||||
|
||||
# The retry schedule to use when stopping the daemon. Could be either
|
||||
# a timeout in seconds or multiple signal/timeout pairs (like
|
||||
# "SIGKILL/180 SIGTERM/300")
|
||||
retry="${BITCOIND_SIGTERM_TIMEOUT}"
|
||||
|
||||
depend() {
|
||||
need localmount net
|
||||
|
|
|
@ -25,3 +25,9 @@
|
|||
# Additional options (avoid -conf and -datadir, use flags above)
|
||||
BITCOIND_OPTS="-disablewallet"
|
||||
|
||||
# The timeout in seconds OpenRC will wait for bitcoind to terminate
|
||||
# after a SIGTERM has been raised.
|
||||
# Note that this will be mapped as argument to start-stop-daemon's
|
||||
# '--retry' option, which means you can specify a retry schedule
|
||||
# here. For more information see man 8 start-stop-daemon.
|
||||
BITCOIND_SIGTERM_TIMEOUT=60
|
||||
|
|
|
@ -3,7 +3,7 @@ Construct a linear, no-fork, best version of the blockchain.
|
|||
|
||||
## Step 1: Download hash list
|
||||
|
||||
$ ./linearize-hashes.py linearize.cfg > hashlist.txt
|
||||
$ ./linearize-hashes.py linearize.cfg > hashlist.txt
|
||||
|
||||
Required configuration file settings for linearize-hashes:
|
||||
* RPC: rpcuser, rpcpassword
|
||||
|
@ -14,7 +14,7 @@ Optional config file setting for linearize-hashes:
|
|||
|
||||
## Step 2: Copy local block data
|
||||
|
||||
$ ./linearize-data.py linearize.cfg
|
||||
$ ./linearize-data.py linearize.cfg
|
||||
|
||||
Required configuration file settings:
|
||||
* "input": bitcoind blocks/ directory containing blkNNNNN.dat
|
||||
|
@ -26,7 +26,7 @@ output.
|
|||
|
||||
Optional config file setting for linearize-data:
|
||||
* "netmagic": network magic number
|
||||
* "max_out_sz": maximum output file size (default 1000*1000*1000)
|
||||
* "max_out_sz": maximum output file size (default `1000*1000*1000`)
|
||||
* "split_timestamp": Split files when a new month is first seen, in addition to
|
||||
reaching a maximum file size.
|
||||
* "file_timestamp": Set each file's last-modified time to that of the
|
||||
|
|
|
@ -12,6 +12,7 @@ import json
|
|||
import struct
|
||||
import re
|
||||
import os
|
||||
import os.path
|
||||
import base64
|
||||
import httplib
|
||||
import sys
|
||||
|
@ -115,19 +116,20 @@ class BlockDataCopier:
|
|||
self.setFileTime = True
|
||||
if settings['split_timestamp'] != 0:
|
||||
self.timestampSplit = True
|
||||
# Extents and cache for out-of-order blocks
|
||||
# Extents and cache for out-of-order blocks
|
||||
self.blockExtents = {}
|
||||
self.outOfOrderData = {}
|
||||
self.outOfOrderSize = 0 # running total size for items in outOfOrderData
|
||||
|
||||
def writeBlock(self, inhdr, blk_hdr, rawblock):
|
||||
if not self.fileOutput and ((self.outsz + self.inLen) > self.maxOutSz):
|
||||
blockSizeOnDisk = len(inhdr) + len(blk_hdr) + len(rawblock)
|
||||
if not self.fileOutput and ((self.outsz + blockSizeOnDisk) > self.maxOutSz):
|
||||
self.outF.close()
|
||||
if self.setFileTime:
|
||||
os.utime(outFname, (int(time.time()), highTS))
|
||||
self.outF = None
|
||||
self.outFname = None
|
||||
self.outFn = outFn + 1
|
||||
self.outFn = self.outFn + 1
|
||||
self.outsz = 0
|
||||
|
||||
(blkDate, blkTS) = get_blk_dt(blk_hdr)
|
||||
|
@ -147,7 +149,7 @@ class BlockDataCopier:
|
|||
if self.fileOutput:
|
||||
outFname = self.settings['output_file']
|
||||
else:
|
||||
outFname = "%s/blk%05d.dat" % (self.settings['output'], outFn)
|
||||
outFname = os.path.join(self.settings['output'], "blk%05d.dat" % self.outFn)
|
||||
print("Output file " + outFname)
|
||||
self.outF = open(outFname, "wb")
|
||||
|
||||
|
@ -165,7 +167,7 @@ class BlockDataCopier:
|
|||
(self.blkCountIn, self.blkCountOut, len(self.blkindex), 100.0 * self.blkCountOut / len(self.blkindex)))
|
||||
|
||||
def inFileName(self, fn):
|
||||
return "%s/blk%05d.dat" % (self.settings['input'], fn)
|
||||
return os.path.join(self.settings['input'], "blk%05d.dat" % fn)
|
||||
|
||||
def fetchBlock(self, extent):
|
||||
'''Fetch block contents from disk given extents'''
|
||||
|
|
|
@ -1,883 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
#
|
||||
# Copyright (C) 2011 Patrick "p2k" Schneider <me@p2k-network.org>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import subprocess, sys, re, os, shutil, stat, os.path, time
|
||||
from string import Template
|
||||
from argparse import ArgumentParser
|
||||
|
||||
# This is ported from the original macdeployqt with modifications
|
||||
|
||||
class FrameworkInfo(object):
|
||||
def __init__(self):
|
||||
self.frameworkDirectory = ""
|
||||
self.frameworkName = ""
|
||||
self.frameworkPath = ""
|
||||
self.binaryDirectory = ""
|
||||
self.binaryName = ""
|
||||
self.binaryPath = ""
|
||||
self.version = ""
|
||||
self.installName = ""
|
||||
self.deployedInstallName = ""
|
||||
self.sourceFilePath = ""
|
||||
self.destinationDirectory = ""
|
||||
self.sourceResourcesDirectory = ""
|
||||
self.sourceVersionContentsDirectory = ""
|
||||
self.sourceContentsDirectory = ""
|
||||
self.destinationResourcesDirectory = ""
|
||||
self.destinationVersionContentsDirectory = ""
|
||||
|
||||
def __eq__(self, other):
|
||||
if self.__class__ == other.__class__:
|
||||
return self.__dict__ == other.__dict__
|
||||
else:
|
||||
return False
|
||||
|
||||
def __str__(self):
|
||||
return """ Framework name: %s
|
||||
Framework directory: %s
|
||||
Framework path: %s
|
||||
Binary name: %s
|
||||
Binary directory: %s
|
||||
Binary path: %s
|
||||
Version: %s
|
||||
Install name: %s
|
||||
Deployed install name: %s
|
||||
Source file Path: %s
|
||||
Deployed Directory (relative to bundle): %s
|
||||
""" % (self.frameworkName,
|
||||
self.frameworkDirectory,
|
||||
self.frameworkPath,
|
||||
self.binaryName,
|
||||
self.binaryDirectory,
|
||||
self.binaryPath,
|
||||
self.version,
|
||||
self.installName,
|
||||
self.deployedInstallName,
|
||||
self.sourceFilePath,
|
||||
self.destinationDirectory)
|
||||
|
||||
def isDylib(self):
|
||||
return self.frameworkName.endswith(".dylib")
|
||||
|
||||
def isQtFramework(self):
|
||||
if self.isDylib():
|
||||
return self.frameworkName.startswith("libQt")
|
||||
else:
|
||||
return self.frameworkName.startswith("Qt")
|
||||
|
||||
reOLine = re.compile(r'^(.+) \(compatibility version [0-9.]+, current version [0-9.]+\)$')
|
||||
bundleFrameworkDirectory = "Contents/Frameworks"
|
||||
bundleBinaryDirectory = "Contents/MacOS"
|
||||
|
||||
@classmethod
|
||||
def fromOtoolLibraryLine(cls, line):
|
||||
# Note: line must be trimmed
|
||||
if line == "":
|
||||
return None
|
||||
|
||||
# Don't deploy system libraries (exception for libQtuitools and libQtlucene).
|
||||
if line.startswith("/System/Library/") or line.startswith("@executable_path") or (line.startswith("/usr/lib/") and "libQt" not in line):
|
||||
return None
|
||||
|
||||
m = cls.reOLine.match(line)
|
||||
if m is None:
|
||||
raise RuntimeError("otool line could not be parsed: " + line)
|
||||
|
||||
path = m.group(1)
|
||||
|
||||
info = cls()
|
||||
info.sourceFilePath = path
|
||||
info.installName = path
|
||||
|
||||
if path.endswith(".dylib"):
|
||||
dirname, filename = os.path.split(path)
|
||||
info.frameworkName = filename
|
||||
info.frameworkDirectory = dirname
|
||||
info.frameworkPath = path
|
||||
|
||||
info.binaryDirectory = dirname
|
||||
info.binaryName = filename
|
||||
info.binaryPath = path
|
||||
info.version = "-"
|
||||
|
||||
info.installName = path
|
||||
info.deployedInstallName = "@executable_path/../Frameworks/" + info.binaryName
|
||||
info.sourceFilePath = path
|
||||
info.destinationDirectory = cls.bundleFrameworkDirectory
|
||||
else:
|
||||
parts = path.split("/")
|
||||
i = 0
|
||||
# Search for the .framework directory
|
||||
for part in parts:
|
||||
if part.endswith(".framework"):
|
||||
break
|
||||
i += 1
|
||||
if i == len(parts):
|
||||
raise RuntimeError("Could not find .framework or .dylib in otool line: " + line)
|
||||
|
||||
info.frameworkName = parts[i]
|
||||
info.frameworkDirectory = "/".join(parts[:i])
|
||||
info.frameworkPath = os.path.join(info.frameworkDirectory, info.frameworkName)
|
||||
|
||||
info.binaryName = parts[i+3]
|
||||
info.binaryDirectory = "/".join(parts[i+1:i+3])
|
||||
info.binaryPath = os.path.join(info.binaryDirectory, info.binaryName)
|
||||
info.version = parts[i+2]
|
||||
|
||||
info.deployedInstallName = "@executable_path/../Frameworks/" + os.path.join(info.frameworkName, info.binaryPath)
|
||||
info.destinationDirectory = os.path.join(cls.bundleFrameworkDirectory, info.frameworkName, info.binaryDirectory)
|
||||
|
||||
info.sourceResourcesDirectory = os.path.join(info.frameworkPath, "Resources")
|
||||
info.sourceContentsDirectory = os.path.join(info.frameworkPath, "Contents")
|
||||
info.sourceVersionContentsDirectory = os.path.join(info.frameworkPath, "Versions", info.version, "Contents")
|
||||
info.destinationResourcesDirectory = os.path.join(cls.bundleFrameworkDirectory, info.frameworkName, "Resources")
|
||||
info.destinationContentsDirectory = os.path.join(cls.bundleFrameworkDirectory, info.frameworkName, "Contents")
|
||||
info.destinationVersionContentsDirectory = os.path.join(cls.bundleFrameworkDirectory, info.frameworkName, "Versions", info.version, "Contents")
|
||||
|
||||
return info
|
||||
|
||||
class ApplicationBundleInfo(object):
|
||||
def __init__(self, path):
|
||||
self.path = path
|
||||
appName = "Bitcoin-Qt"
|
||||
self.binaryPath = os.path.join(path, "Contents", "MacOS", appName)
|
||||
if not os.path.exists(self.binaryPath):
|
||||
raise RuntimeError("Could not find bundle binary for " + path)
|
||||
self.resourcesPath = os.path.join(path, "Contents", "Resources")
|
||||
self.pluginPath = os.path.join(path, "Contents", "PlugIns")
|
||||
|
||||
class DeploymentInfo(object):
|
||||
def __init__(self):
|
||||
self.qtPath = None
|
||||
self.pluginPath = None
|
||||
self.deployedFrameworks = []
|
||||
|
||||
def detectQtPath(self, frameworkDirectory):
|
||||
parentDir = os.path.dirname(frameworkDirectory)
|
||||
if os.path.exists(os.path.join(parentDir, "translations")):
|
||||
# Classic layout, e.g. "/usr/local/Trolltech/Qt-4.x.x"
|
||||
self.qtPath = parentDir
|
||||
elif os.path.exists(os.path.join(parentDir, "share", "qt4", "translations")):
|
||||
# MacPorts layout, e.g. "/opt/local/share/qt4"
|
||||
self.qtPath = os.path.join(parentDir, "share", "qt4")
|
||||
elif os.path.exists(os.path.join(os.path.dirname(parentDir), "share", "qt4", "translations")):
|
||||
# Newer Macports layout
|
||||
self.qtPath = os.path.join(os.path.dirname(parentDir), "share", "qt4")
|
||||
else:
|
||||
self.qtPath = os.getenv("QTDIR", None)
|
||||
|
||||
if self.qtPath is not None:
|
||||
pluginPath = os.path.join(self.qtPath, "plugins")
|
||||
if os.path.exists(pluginPath):
|
||||
self.pluginPath = pluginPath
|
||||
|
||||
def usesFramework(self, name):
|
||||
nameDot = "%s." % name
|
||||
libNameDot = "lib%s." % name
|
||||
for framework in self.deployedFrameworks:
|
||||
if framework.endswith(".framework"):
|
||||
if framework.startswith(nameDot):
|
||||
return True
|
||||
elif framework.endswith(".dylib"):
|
||||
if framework.startswith(libNameDot):
|
||||
return True
|
||||
return False
|
||||
|
||||
def getFrameworks(binaryPath, verbose):
|
||||
if verbose >= 3:
|
||||
print "Inspecting with otool: " + binaryPath
|
||||
otoolbin=os.getenv("OTOOL", "otool")
|
||||
otool = subprocess.Popen([otoolbin, "-L", binaryPath], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
o_stdout, o_stderr = otool.communicate()
|
||||
if otool.returncode != 0:
|
||||
if verbose >= 1:
|
||||
sys.stderr.write(o_stderr)
|
||||
sys.stderr.flush()
|
||||
raise RuntimeError("otool failed with return code %d" % otool.returncode)
|
||||
|
||||
otoolLines = o_stdout.split("\n")
|
||||
otoolLines.pop(0) # First line is the inspected binary
|
||||
if ".framework" in binaryPath or binaryPath.endswith(".dylib"):
|
||||
otoolLines.pop(0) # Frameworks and dylibs list themselves as a dependency.
|
||||
|
||||
libraries = []
|
||||
for line in otoolLines:
|
||||
line = line.replace("@loader_path", os.path.dirname(binaryPath))
|
||||
info = FrameworkInfo.fromOtoolLibraryLine(line.strip())
|
||||
if info is not None:
|
||||
if verbose >= 3:
|
||||
print "Found framework:"
|
||||
print info
|
||||
libraries.append(info)
|
||||
|
||||
return libraries
|
||||
|
||||
def runInstallNameTool(action, *args):
|
||||
installnametoolbin=os.getenv("INSTALLNAMETOOL", "install_name_tool")
|
||||
subprocess.check_call([installnametoolbin, "-"+action] + list(args))
|
||||
|
||||
def changeInstallName(oldName, newName, binaryPath, verbose):
|
||||
if verbose >= 3:
|
||||
print "Using install_name_tool:"
|
||||
print " in", binaryPath
|
||||
print " change reference", oldName
|
||||
print " to", newName
|
||||
runInstallNameTool("change", oldName, newName, binaryPath)
|
||||
|
||||
def changeIdentification(id, binaryPath, verbose):
|
||||
if verbose >= 3:
|
||||
print "Using install_name_tool:"
|
||||
print " change identification in", binaryPath
|
||||
print " to", id
|
||||
runInstallNameTool("id", id, binaryPath)
|
||||
|
||||
def runStrip(binaryPath, verbose):
|
||||
stripbin=os.getenv("STRIP", "strip")
|
||||
if verbose >= 3:
|
||||
print "Using strip:"
|
||||
print " stripped", binaryPath
|
||||
subprocess.check_call([stripbin, "-x", binaryPath])
|
||||
|
||||
def copyFramework(framework, path, verbose):
|
||||
if framework.sourceFilePath.startswith("Qt"):
|
||||
#standard place for Nokia Qt installer's frameworks
|
||||
fromPath = "/Library/Frameworks/" + framework.sourceFilePath
|
||||
else:
|
||||
fromPath = framework.sourceFilePath
|
||||
toDir = os.path.join(path, framework.destinationDirectory)
|
||||
toPath = os.path.join(toDir, framework.binaryName)
|
||||
|
||||
if not os.path.exists(fromPath):
|
||||
raise RuntimeError("No file at " + fromPath)
|
||||
|
||||
if os.path.exists(toPath):
|
||||
return None # Already there
|
||||
|
||||
if not os.path.exists(toDir):
|
||||
os.makedirs(toDir)
|
||||
|
||||
shutil.copy2(fromPath, toPath)
|
||||
if verbose >= 3:
|
||||
print "Copied:", fromPath
|
||||
print " to:", toPath
|
||||
|
||||
permissions = os.stat(toPath)
|
||||
if not permissions.st_mode & stat.S_IWRITE:
|
||||
os.chmod(toPath, permissions.st_mode | stat.S_IWRITE)
|
||||
|
||||
if not framework.isDylib(): # Copy resources for real frameworks
|
||||
|
||||
linkfrom = os.path.join(path, "Contents","Frameworks", framework.frameworkName, "Versions", "Current")
|
||||
linkto = framework.version
|
||||
if not os.path.exists(linkfrom):
|
||||
os.symlink(linkto, linkfrom)
|
||||
if verbose >= 2:
|
||||
print "Linked:", linkfrom, "->", linkto
|
||||
fromResourcesDir = framework.sourceResourcesDirectory
|
||||
if os.path.exists(fromResourcesDir):
|
||||
toResourcesDir = os.path.join(path, framework.destinationResourcesDirectory)
|
||||
shutil.copytree(fromResourcesDir, toResourcesDir, symlinks=True)
|
||||
if verbose >= 3:
|
||||
print "Copied resources:", fromResourcesDir
|
||||
print " to:", toResourcesDir
|
||||
fromContentsDir = framework.sourceVersionContentsDirectory
|
||||
if not os.path.exists(fromContentsDir):
|
||||
fromContentsDir = framework.sourceContentsDirectory
|
||||
if os.path.exists(fromContentsDir):
|
||||
toContentsDir = os.path.join(path, framework.destinationVersionContentsDirectory)
|
||||
shutil.copytree(fromContentsDir, toContentsDir, symlinks=True)
|
||||
contentslinkfrom = os.path.join(path, framework.destinationContentsDirectory)
|
||||
if verbose >= 3:
|
||||
print "Copied Contents:", fromContentsDir
|
||||
print " to:", toContentsDir
|
||||
elif framework.frameworkName.startswith("libQtGui"): # Copy qt_menu.nib (applies to non-framework layout)
|
||||
qtMenuNibSourcePath = os.path.join(framework.frameworkDirectory, "Resources", "qt_menu.nib")
|
||||
qtMenuNibDestinationPath = os.path.join(path, "Contents", "Resources", "qt_menu.nib")
|
||||
if os.path.exists(qtMenuNibSourcePath) and not os.path.exists(qtMenuNibDestinationPath):
|
||||
shutil.copytree(qtMenuNibSourcePath, qtMenuNibDestinationPath, symlinks=True)
|
||||
if verbose >= 3:
|
||||
print "Copied for libQtGui:", qtMenuNibSourcePath
|
||||
print " to:", qtMenuNibDestinationPath
|
||||
|
||||
return toPath
|
||||
|
||||
def deployFrameworks(frameworks, bundlePath, binaryPath, strip, verbose, deploymentInfo=None):
|
||||
if deploymentInfo is None:
|
||||
deploymentInfo = DeploymentInfo()
|
||||
|
||||
while len(frameworks) > 0:
|
||||
framework = frameworks.pop(0)
|
||||
deploymentInfo.deployedFrameworks.append(framework.frameworkName)
|
||||
|
||||
if verbose >= 2:
|
||||
print "Processing", framework.frameworkName, "..."
|
||||
|
||||
# Get the Qt path from one of the Qt frameworks
|
||||
if deploymentInfo.qtPath is None and framework.isQtFramework():
|
||||
deploymentInfo.detectQtPath(framework.frameworkDirectory)
|
||||
|
||||
if framework.installName.startswith("@executable_path") or framework.installName.startswith(bundlePath):
|
||||
if verbose >= 2:
|
||||
print framework.frameworkName, "already deployed, skipping."
|
||||
continue
|
||||
|
||||
# install_name_tool the new id into the binary
|
||||
changeInstallName(framework.installName, framework.deployedInstallName, binaryPath, verbose)
|
||||
|
||||
# Copy farmework to app bundle.
|
||||
deployedBinaryPath = copyFramework(framework, bundlePath, verbose)
|
||||
# Skip the rest if already was deployed.
|
||||
if deployedBinaryPath is None:
|
||||
continue
|
||||
|
||||
if strip:
|
||||
runStrip(deployedBinaryPath, verbose)
|
||||
|
||||
# install_name_tool it a new id.
|
||||
changeIdentification(framework.deployedInstallName, deployedBinaryPath, verbose)
|
||||
# Check for framework dependencies
|
||||
dependencies = getFrameworks(deployedBinaryPath, verbose)
|
||||
|
||||
for dependency in dependencies:
|
||||
changeInstallName(dependency.installName, dependency.deployedInstallName, deployedBinaryPath, verbose)
|
||||
|
||||
# Deploy framework if necessary.
|
||||
if dependency.frameworkName not in deploymentInfo.deployedFrameworks and dependency not in frameworks:
|
||||
frameworks.append(dependency)
|
||||
|
||||
return deploymentInfo
|
||||
|
||||
def deployFrameworksForAppBundle(applicationBundle, strip, verbose):
|
||||
frameworks = getFrameworks(applicationBundle.binaryPath, verbose)
|
||||
if len(frameworks) == 0 and verbose >= 1:
|
||||
print "Warning: Could not find any external frameworks to deploy in %s." % (applicationBundle.path)
|
||||
return DeploymentInfo()
|
||||
else:
|
||||
return deployFrameworks(frameworks, applicationBundle.path, applicationBundle.binaryPath, strip, verbose)
|
||||
|
||||
def deployPlugins(appBundleInfo, deploymentInfo, strip, verbose):
|
||||
# Lookup available plugins, exclude unneeded
|
||||
plugins = []
|
||||
if deploymentInfo.pluginPath is None:
|
||||
return
|
||||
for dirpath, dirnames, filenames in os.walk(deploymentInfo.pluginPath):
|
||||
pluginDirectory = os.path.relpath(dirpath, deploymentInfo.pluginPath)
|
||||
if pluginDirectory == "designer":
|
||||
# Skip designer plugins
|
||||
continue
|
||||
elif pluginDirectory == "phonon" or pluginDirectory == "phonon_backend":
|
||||
# Deploy the phonon plugins only if phonon is in use
|
||||
if not deploymentInfo.usesFramework("phonon"):
|
||||
continue
|
||||
elif pluginDirectory == "sqldrivers":
|
||||
# Deploy the sql plugins only if QtSql is in use
|
||||
if not deploymentInfo.usesFramework("QtSql"):
|
||||
continue
|
||||
elif pluginDirectory == "script":
|
||||
# Deploy the script plugins only if QtScript is in use
|
||||
if not deploymentInfo.usesFramework("QtScript"):
|
||||
continue
|
||||
elif pluginDirectory == "qmltooling" or pluginDirectory == "qml1tooling":
|
||||
# Deploy the qml plugins only if QtDeclarative is in use
|
||||
if not deploymentInfo.usesFramework("QtDeclarative"):
|
||||
continue
|
||||
elif pluginDirectory == "bearer":
|
||||
# Deploy the bearer plugins only if QtNetwork is in use
|
||||
if not deploymentInfo.usesFramework("QtNetwork"):
|
||||
continue
|
||||
elif pluginDirectory == "position":
|
||||
# Deploy the position plugins only if QtPositioning is in use
|
||||
if not deploymentInfo.usesFramework("QtPositioning"):
|
||||
continue
|
||||
elif pluginDirectory == "sensors" or pluginDirectory == "sensorgestures":
|
||||
# Deploy the sensor plugins only if QtSensors is in use
|
||||
if not deploymentInfo.usesFramework("QtSensors"):
|
||||
continue
|
||||
elif pluginDirectory == "audio" or pluginDirectory == "playlistformats":
|
||||
# Deploy the audio plugins only if QtMultimedia is in use
|
||||
if not deploymentInfo.usesFramework("QtMultimedia"):
|
||||
continue
|
||||
elif pluginDirectory == "mediaservice":
|
||||
# Deploy the mediaservice plugins only if QtMultimediaWidgets is in use
|
||||
if not deploymentInfo.usesFramework("QtMultimediaWidgets"):
|
||||
continue
|
||||
|
||||
for pluginName in filenames:
|
||||
pluginPath = os.path.join(pluginDirectory, pluginName)
|
||||
if pluginName.endswith("_debug.dylib"):
|
||||
# Skip debug plugins
|
||||
continue
|
||||
elif pluginPath == "imageformats/libqsvg.dylib" or pluginPath == "iconengines/libqsvgicon.dylib":
|
||||
# Deploy the svg plugins only if QtSvg is in use
|
||||
if not deploymentInfo.usesFramework("QtSvg"):
|
||||
continue
|
||||
elif pluginPath == "accessible/libqtaccessiblecompatwidgets.dylib":
|
||||
# Deploy accessibility for Qt3Support only if the Qt3Support is in use
|
||||
if not deploymentInfo.usesFramework("Qt3Support"):
|
||||
continue
|
||||
elif pluginPath == "graphicssystems/libqglgraphicssystem.dylib":
|
||||
# Deploy the opengl graphicssystem plugin only if QtOpenGL is in use
|
||||
if not deploymentInfo.usesFramework("QtOpenGL"):
|
||||
continue
|
||||
elif pluginPath == "accessible/libqtaccessiblequick.dylib":
|
||||
# Deploy the accessible qtquick plugin only if QtQuick is in use
|
||||
if not deploymentInfo.usesFramework("QtQuick"):
|
||||
continue
|
||||
|
||||
plugins.append((pluginDirectory, pluginName))
|
||||
|
||||
for pluginDirectory, pluginName in plugins:
|
||||
if verbose >= 2:
|
||||
print "Processing plugin", os.path.join(pluginDirectory, pluginName), "..."
|
||||
|
||||
sourcePath = os.path.join(deploymentInfo.pluginPath, pluginDirectory, pluginName)
|
||||
destinationDirectory = os.path.join(appBundleInfo.pluginPath, pluginDirectory)
|
||||
if not os.path.exists(destinationDirectory):
|
||||
os.makedirs(destinationDirectory)
|
||||
|
||||
destinationPath = os.path.join(destinationDirectory, pluginName)
|
||||
shutil.copy2(sourcePath, destinationPath)
|
||||
if verbose >= 3:
|
||||
print "Copied:", sourcePath
|
||||
print " to:", destinationPath
|
||||
|
||||
if strip:
|
||||
runStrip(destinationPath, verbose)
|
||||
|
||||
dependencies = getFrameworks(destinationPath, verbose)
|
||||
|
||||
for dependency in dependencies:
|
||||
changeInstallName(dependency.installName, dependency.deployedInstallName, destinationPath, verbose)
|
||||
|
||||
# Deploy framework if necessary.
|
||||
if dependency.frameworkName not in deploymentInfo.deployedFrameworks:
|
||||
deployFrameworks([dependency], appBundleInfo.path, destinationPath, strip, verbose, deploymentInfo)
|
||||
|
||||
qt_conf="""[Paths]
|
||||
Translations=Resources
|
||||
Plugins=PlugIns
|
||||
"""
|
||||
|
||||
ap = ArgumentParser(description="""Improved version of macdeployqt.
|
||||
|
||||
Outputs a ready-to-deploy app in a folder "dist" and optionally wraps it in a .dmg file.
|
||||
Note, that the "dist" folder will be deleted before deploying on each run.
|
||||
|
||||
Optionally, Qt translation files (.qm) and additional resources can be added to the bundle.
|
||||
|
||||
Also optionally signs the .app bundle; set the CODESIGNARGS environment variable to pass arguments
|
||||
to the codesign tool.
|
||||
E.g. CODESIGNARGS='--sign "Developer ID Application: ..." --keychain /encrypted/foo.keychain'""")
|
||||
|
||||
ap.add_argument("app_bundle", nargs=1, metavar="app-bundle", help="application bundle to be deployed")
|
||||
ap.add_argument("-verbose", type=int, nargs=1, default=[1], metavar="<0-3>", help="0 = no output, 1 = error/warning (default), 2 = normal, 3 = debug")
|
||||
ap.add_argument("-no-plugins", dest="plugins", action="store_false", default=True, help="skip plugin deployment")
|
||||
ap.add_argument("-no-strip", dest="strip", action="store_false", default=True, help="don't run 'strip' on the binaries")
|
||||
ap.add_argument("-sign", dest="sign", action="store_true", default=False, help="sign .app bundle with codesign tool")
|
||||
ap.add_argument("-dmg", nargs="?", const="", metavar="basename", help="create a .dmg disk image; if basename is not specified, a camel-cased version of the app name is used")
|
||||
ap.add_argument("-fancy", nargs=1, metavar="plist", default=[], help="make a fancy looking disk image using the given plist file with instructions; requires -dmg to work")
|
||||
ap.add_argument("-add-qt-tr", nargs=1, metavar="languages", default=[], help="add Qt translation files to the bundle's ressources; the language list must be separated with commas, not with whitespace")
|
||||
ap.add_argument("-translations-dir", nargs=1, metavar="path", default=None, help="Path to Qt's translation files")
|
||||
ap.add_argument("-add-resources", nargs="+", metavar="path", default=[], help="list of additional files or folders to be copied into the bundle's resources; must be the last argument")
|
||||
|
||||
config = ap.parse_args()
|
||||
|
||||
verbose = config.verbose[0]
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
app_bundle = config.app_bundle[0]
|
||||
|
||||
if not os.path.exists(app_bundle):
|
||||
if verbose >= 1:
|
||||
sys.stderr.write("Error: Could not find app bundle \"%s\"\n" % (app_bundle))
|
||||
sys.exit(1)
|
||||
|
||||
app_bundle_name = os.path.splitext(os.path.basename(app_bundle))[0]
|
||||
|
||||
# ------------------------------------------------
|
||||
translations_dir = None
|
||||
if config.translations_dir and config.translations_dir[0]:
|
||||
if os.path.exists(config.translations_dir[0]):
|
||||
translations_dir = config.translations_dir[0]
|
||||
else:
|
||||
if verbose >= 1:
|
||||
sys.stderr.write("Error: Could not find translation dir \"%s\"\n" % (translations_dir))
|
||||
sys.exit(1)
|
||||
# ------------------------------------------------
|
||||
|
||||
for p in config.add_resources:
|
||||
if verbose >= 3:
|
||||
print "Checking for \"%s\"..." % p
|
||||
if not os.path.exists(p):
|
||||
if verbose >= 1:
|
||||
sys.stderr.write("Error: Could not find additional resource file \"%s\"\n" % (p))
|
||||
sys.exit(1)
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
if len(config.fancy) == 1:
|
||||
if verbose >= 3:
|
||||
print "Fancy: Importing plistlib..."
|
||||
try:
|
||||
import plistlib
|
||||
except ImportError:
|
||||
if verbose >= 1:
|
||||
sys.stderr.write("Error: Could not import plistlib which is required for fancy disk images.\n")
|
||||
sys.exit(1)
|
||||
|
||||
p = config.fancy[0]
|
||||
if verbose >= 3:
|
||||
print "Fancy: Loading \"%s\"..." % p
|
||||
if not os.path.exists(p):
|
||||
if verbose >= 1:
|
||||
sys.stderr.write("Error: Could not find fancy disk image plist at \"%s\"\n" % (p))
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
fancy = plistlib.readPlist(p)
|
||||
except:
|
||||
if verbose >= 1:
|
||||
sys.stderr.write("Error: Could not parse fancy disk image plist at \"%s\"\n" % (p))
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
assert not fancy.has_key("window_bounds") or (isinstance(fancy["window_bounds"], list) and len(fancy["window_bounds"]) == 4)
|
||||
assert not fancy.has_key("background_picture") or isinstance(fancy["background_picture"], str)
|
||||
assert not fancy.has_key("icon_size") or isinstance(fancy["icon_size"], int)
|
||||
assert not fancy.has_key("applications_symlink") or isinstance(fancy["applications_symlink"], bool)
|
||||
if fancy.has_key("items_position"):
|
||||
assert isinstance(fancy["items_position"], dict)
|
||||
for key, value in fancy["items_position"].iteritems():
|
||||
assert isinstance(value, list) and len(value) == 2 and isinstance(value[0], int) and isinstance(value[1], int)
|
||||
except:
|
||||
if verbose >= 1:
|
||||
sys.stderr.write("Error: Bad format of fancy disk image plist at \"%s\"\n" % (p))
|
||||
sys.exit(1)
|
||||
|
||||
if fancy.has_key("background_picture"):
|
||||
bp = fancy["background_picture"]
|
||||
if verbose >= 3:
|
||||
print "Fancy: Resolving background picture \"%s\"..." % bp
|
||||
if not os.path.exists(bp):
|
||||
bp = os.path.join(os.path.dirname(p), bp)
|
||||
if not os.path.exists(bp):
|
||||
if verbose >= 1:
|
||||
sys.stderr.write("Error: Could not find background picture at \"%s\" or \"%s\"\n" % (fancy["background_picture"], bp))
|
||||
sys.exit(1)
|
||||
else:
|
||||
fancy["background_picture"] = bp
|
||||
else:
|
||||
fancy = None
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
if os.path.exists("dist"):
|
||||
if verbose >= 2:
|
||||
print "+ Removing old dist folder +"
|
||||
|
||||
shutil.rmtree("dist")
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
target = os.path.join("dist", "Bitcoin-Qt.app")
|
||||
|
||||
if verbose >= 2:
|
||||
print "+ Copying source bundle +"
|
||||
if verbose >= 3:
|
||||
print app_bundle, "->", target
|
||||
|
||||
os.mkdir("dist")
|
||||
shutil.copytree(app_bundle, target, symlinks=True)
|
||||
|
||||
applicationBundle = ApplicationBundleInfo(target)
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
if verbose >= 2:
|
||||
print "+ Deploying frameworks +"
|
||||
|
||||
try:
|
||||
deploymentInfo = deployFrameworksForAppBundle(applicationBundle, config.strip, verbose)
|
||||
if deploymentInfo.qtPath is None:
|
||||
deploymentInfo.qtPath = os.getenv("QTDIR", None)
|
||||
if deploymentInfo.qtPath is None:
|
||||
if verbose >= 1:
|
||||
sys.stderr.write("Warning: Could not detect Qt's path, skipping plugin deployment!\n")
|
||||
config.plugins = False
|
||||
except RuntimeError as e:
|
||||
if verbose >= 1:
|
||||
sys.stderr.write("Error: %s\n" % str(e))
|
||||
sys.exit(1)
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
if config.plugins:
|
||||
if verbose >= 2:
|
||||
print "+ Deploying plugins +"
|
||||
|
||||
try:
|
||||
deployPlugins(applicationBundle, deploymentInfo, config.strip, verbose)
|
||||
except RuntimeError as e:
|
||||
if verbose >= 1:
|
||||
sys.stderr.write("Error: %s\n" % str(e))
|
||||
sys.exit(1)
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
if len(config.add_qt_tr) == 0:
|
||||
add_qt_tr = []
|
||||
else:
|
||||
if translations_dir is not None:
|
||||
qt_tr_dir = translations_dir
|
||||
else:
|
||||
if deploymentInfo.qtPath is not None:
|
||||
qt_tr_dir = os.path.join(deploymentInfo.qtPath, "translations")
|
||||
else:
|
||||
sys.stderr.write("Error: Could not find Qt translation path\n")
|
||||
sys.exit(1)
|
||||
add_qt_tr = ["qt_%s.qm" % lng for lng in config.add_qt_tr[0].split(",")]
|
||||
for lng_file in add_qt_tr:
|
||||
p = os.path.join(qt_tr_dir, lng_file)
|
||||
if verbose >= 3:
|
||||
print "Checking for \"%s\"..." % p
|
||||
if not os.path.exists(p):
|
||||
if verbose >= 1:
|
||||
sys.stderr.write("Error: Could not find Qt translation file \"%s\"\n" % (lng_file))
|
||||
sys.exit(1)
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
if verbose >= 2:
|
||||
print "+ Installing qt.conf +"
|
||||
|
||||
f = open(os.path.join(applicationBundle.resourcesPath, "qt.conf"), "wb")
|
||||
f.write(qt_conf)
|
||||
f.close()
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
if len(add_qt_tr) > 0 and verbose >= 2:
|
||||
print "+ Adding Qt translations +"
|
||||
|
||||
for lng_file in add_qt_tr:
|
||||
if verbose >= 3:
|
||||
print os.path.join(qt_tr_dir, lng_file), "->", os.path.join(applicationBundle.resourcesPath, lng_file)
|
||||
shutil.copy2(os.path.join(qt_tr_dir, lng_file), os.path.join(applicationBundle.resourcesPath, lng_file))
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
if len(config.add_resources) > 0 and verbose >= 2:
|
||||
print "+ Adding additional resources +"
|
||||
|
||||
for p in config.add_resources:
|
||||
t = os.path.join(applicationBundle.resourcesPath, os.path.basename(p))
|
||||
if verbose >= 3:
|
||||
print p, "->", t
|
||||
if os.path.isdir(p):
|
||||
shutil.copytree(p, t, symlinks=True)
|
||||
else:
|
||||
shutil.copy2(p, t)
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
if config.sign and 'CODESIGNARGS' not in os.environ:
|
||||
print "You must set the CODESIGNARGS environment variable. Skipping signing."
|
||||
elif config.sign:
|
||||
if verbose >= 1:
|
||||
print "Code-signing app bundle %s"%(target,)
|
||||
subprocess.check_call("codesign --force %s %s"%(os.environ['CODESIGNARGS'], target), shell=True)
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
if config.dmg is not None:
|
||||
|
||||
#Patch in check_output for Python 2.6
|
||||
if "check_output" not in dir( subprocess ):
|
||||
def f(*popenargs, **kwargs):
|
||||
if 'stdout' in kwargs:
|
||||
raise ValueError('stdout argument not allowed, it will be overridden.')
|
||||
process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs)
|
||||
output, unused_err = process.communicate()
|
||||
retcode = process.poll()
|
||||
if retcode:
|
||||
cmd = kwargs.get("args")
|
||||
if cmd is None:
|
||||
cmd = popenargs[0]
|
||||
raise CalledProcessError(retcode, cmd)
|
||||
return output
|
||||
subprocess.check_output = f
|
||||
|
||||
def runHDIUtil(verb, image_basename, **kwargs):
|
||||
hdiutil_args = ["hdiutil", verb, image_basename + ".dmg"]
|
||||
if kwargs.has_key("capture_stdout"):
|
||||
del kwargs["capture_stdout"]
|
||||
run = subprocess.check_output
|
||||
else:
|
||||
if verbose < 2:
|
||||
hdiutil_args.append("-quiet")
|
||||
elif verbose >= 3:
|
||||
hdiutil_args.append("-verbose")
|
||||
run = subprocess.check_call
|
||||
|
||||
for key, value in kwargs.iteritems():
|
||||
hdiutil_args.append("-" + key)
|
||||
if not value is True:
|
||||
hdiutil_args.append(str(value))
|
||||
|
||||
return run(hdiutil_args)
|
||||
|
||||
if verbose >= 2:
|
||||
if fancy is None:
|
||||
print "+ Creating .dmg disk image +"
|
||||
else:
|
||||
print "+ Preparing .dmg disk image +"
|
||||
|
||||
if config.dmg != "":
|
||||
dmg_name = config.dmg
|
||||
else:
|
||||
spl = app_bundle_name.split(" ")
|
||||
dmg_name = spl[0] + "".join(p.capitalize() for p in spl[1:])
|
||||
|
||||
if fancy is None:
|
||||
try:
|
||||
runHDIUtil("create", dmg_name, srcfolder="dist", format="UDBZ", volname="Bitcoin-Core", ov=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
sys.exit(e.returncode)
|
||||
else:
|
||||
if verbose >= 3:
|
||||
print "Determining size of \"dist\"..."
|
||||
size = 0
|
||||
for path, dirs, files in os.walk("dist"):
|
||||
for file in files:
|
||||
size += os.path.getsize(os.path.join(path, file))
|
||||
size += int(size * 0.15)
|
||||
|
||||
if verbose >= 3:
|
||||
print "Creating temp image for modification..."
|
||||
try:
|
||||
runHDIUtil("create", dmg_name + ".temp", srcfolder="dist", format="UDRW", size=size, volname="Bitcoin-Core", ov=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
sys.exit(e.returncode)
|
||||
|
||||
if verbose >= 3:
|
||||
print "Attaching temp image..."
|
||||
try:
|
||||
output = runHDIUtil("attach", dmg_name + ".temp", readwrite=True, noverify=True, noautoopen=True, capture_stdout=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
sys.exit(e.returncode)
|
||||
|
||||
m = re.search("/Volumes/(.+$)", output)
|
||||
disk_root = m.group(0)
|
||||
disk_name = m.group(1)
|
||||
|
||||
if verbose >= 2:
|
||||
print "+ Applying fancy settings +"
|
||||
|
||||
if fancy.has_key("background_picture"):
|
||||
bg_path = os.path.join(disk_root, ".background", os.path.basename(fancy["background_picture"]))
|
||||
os.mkdir(os.path.dirname(bg_path))
|
||||
if verbose >= 3:
|
||||
print fancy["background_picture"], "->", bg_path
|
||||
shutil.copy2(fancy["background_picture"], bg_path)
|
||||
else:
|
||||
bg_path = None
|
||||
|
||||
if fancy.get("applications_symlink", False):
|
||||
os.symlink("/Applications", os.path.join(disk_root, "Applications"))
|
||||
|
||||
# The Python appscript package broke with OSX 10.8 and isn't being fixed.
|
||||
# So we now build up an AppleScript string and use the osascript command
|
||||
# to make the .dmg file pretty:
|
||||
appscript = Template( """
|
||||
on run argv
|
||||
tell application "Finder"
|
||||
tell disk "$disk"
|
||||
open
|
||||
set current view of container window to icon view
|
||||
set toolbar visible of container window to false
|
||||
set statusbar visible of container window to false
|
||||
set the bounds of container window to {$window_bounds}
|
||||
set theViewOptions to the icon view options of container window
|
||||
set arrangement of theViewOptions to not arranged
|
||||
set icon size of theViewOptions to $icon_size
|
||||
$background_commands
|
||||
$items_positions
|
||||
close -- close/reopen works around a bug...
|
||||
open
|
||||
update without registering applications
|
||||
delay 5
|
||||
eject
|
||||
end tell
|
||||
end tell
|
||||
end run
|
||||
""")
|
||||
|
||||
itemscript = Template('set position of item "${item}" of container window to {${position}}')
|
||||
items_positions = []
|
||||
if fancy.has_key("items_position"):
|
||||
for name, position in fancy["items_position"].iteritems():
|
||||
params = { "item" : name, "position" : ",".join([str(p) for p in position]) }
|
||||
items_positions.append(itemscript.substitute(params))
|
||||
|
||||
params = {
|
||||
"disk" : "Bitcoin-Core",
|
||||
"window_bounds" : "300,300,800,620",
|
||||
"icon_size" : "96",
|
||||
"background_commands" : "",
|
||||
"items_positions" : "\n ".join(items_positions)
|
||||
}
|
||||
if fancy.has_key("window_bounds"):
|
||||
params["window.bounds"] = ",".join([str(p) for p in fancy["window_bounds"]])
|
||||
if fancy.has_key("icon_size"):
|
||||
params["icon_size"] = str(fancy["icon_size"])
|
||||
if bg_path is not None:
|
||||
# Set background file, then call SetFile to make it invisible.
|
||||
# (note: making it invisible first makes set background picture fail)
|
||||
bgscript = Template("""set background picture of theViewOptions to file ".background:$bgpic"
|
||||
do shell script "SetFile -a V /Volumes/$disk/.background/$bgpic" """)
|
||||
params["background_commands"] = bgscript.substitute({"bgpic" : os.path.basename(bg_path), "disk" : params["disk"]})
|
||||
|
||||
s = appscript.substitute(params)
|
||||
if verbose >= 2:
|
||||
print("Running AppleScript:")
|
||||
print(s)
|
||||
|
||||
p = subprocess.Popen(['osascript', '-'], stdin=subprocess.PIPE)
|
||||
p.communicate(input=s)
|
||||
if p.returncode:
|
||||
print("Error running osascript.")
|
||||
|
||||
if verbose >= 2:
|
||||
print "+ Finalizing .dmg disk image +"
|
||||
time.sleep(5)
|
||||
|
||||
try:
|
||||
runHDIUtil("convert", dmg_name + ".temp", format="UDBZ", o=dmg_name + ".dmg", ov=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
sys.exit(e.returncode)
|
||||
|
||||
os.unlink(dmg_name + ".temp.dmg")
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
if verbose >= 2:
|
||||
print "+ Done +"
|
||||
|
||||
sys.exit(0)
|
|
@ -1,22 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# Helpful little script that spits out a comma-separated list of
|
||||
# language codes for Qt icons that should be included
|
||||
# in binary bitcoin distributions
|
||||
|
||||
import glob
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
if len(sys.argv) != 3:
|
||||
sys.exit("Usage: %s $QTDIR/translations $BITCOINDIR/src/qt/locale"%sys.argv[0])
|
||||
|
||||
d1 = sys.argv[1]
|
||||
d2 = sys.argv[2]
|
||||
|
||||
l1 = set([ re.search(r'qt_(.*).qm', f).group(1) for f in glob.glob(os.path.join(d1, 'qt_*.qm')) ])
|
||||
l2 = set([ re.search(r'bitcoin_(.*).qm', f).group(1) for f in glob.glob(os.path.join(d2, 'bitcoin_*.qm')) ])
|
||||
|
||||
print ",".join(sorted(l1.intersection(l2)))
|
||||
|
|
@ -3,7 +3,6 @@
|
|||
SOURCES_PATH ?= $(BASEDIR)/sources
|
||||
BASE_CACHE ?= $(BASEDIR)/built
|
||||
SDK_PATH ?= $(BASEDIR)/SDKs
|
||||
NO_QT ?=
|
||||
NO_WALLET ?=
|
||||
NO_UPNP ?=
|
||||
FALLBACK_DOWNLOAD_PATH ?= https://z.cash/depends-sources
|
||||
|
@ -73,13 +72,12 @@ include builders/$(build_os).mk
|
|||
include builders/default.mk
|
||||
include packages/packages.mk
|
||||
|
||||
qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages)
|
||||
qt_native_packages_$(NO_QT) = $(qt_native_packages)
|
||||
rust_packages_$(NO_RUST) = $(rust_packages)
|
||||
wallet_packages_$(NO_WALLET) = $(wallet_packages)
|
||||
upnp_packages_$(NO_UPNP) = $(upnp_packages)
|
||||
|
||||
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_packages_) $(wallet_packages_) $(upnp_packages_)
|
||||
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages) $(qt_native_packages_)
|
||||
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(rust_packages_) $(wallet_packages_) $(upnp_packages_)
|
||||
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
|
||||
all_packages = $(packages) $(native_packages)
|
||||
|
||||
meta_depends = Makefile funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk
|
||||
|
@ -114,7 +112,6 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
|
|||
-e 's|@CXXFLAGS@|$(strip $(host_CXXFLAGS) $(host_$(release_type)_CXXFLAGS))|' \
|
||||
-e 's|@CPPFLAGS@|$(strip $(host_CPPFLAGS) $(host_$(release_type)_CPPFLAGS))|' \
|
||||
-e 's|@LDFLAGS@|$(strip $(host_LDFLAGS) $(host_$(release_type)_LDFLAGS))|' \
|
||||
-e 's|@no_qt@|$(NO_QT)|' \
|
||||
-e 's|@no_wallet@|$(NO_WALLET)|' \
|
||||
-e 's|@no_upnp@|$(NO_UPNP)|' \
|
||||
-e 's|@debug@|$(DEBUG)|' \
|
||||
|
|
|
@ -34,7 +34,6 @@ The following can be set when running make: make FOO=bar
|
|||
BASE_CACHE: built packages will be placed here
|
||||
SDK_PATH: Path where sdk's can be found (used by OSX)
|
||||
FALLBACK_DOWNLOAD_PATH: If a source file can't be fetched, try here before giving up
|
||||
NO_QT: Don't download/build/cache qt and its dependencies
|
||||
NO_WALLET: Don't download/build/cache libs needed to enable the wallet
|
||||
NO_UPNP: Don't download/build/cache packages needed for enabling upnp
|
||||
DEBUG: disable some optimizations and enable more runtime checking
|
||||
|
|
|
@ -7,18 +7,6 @@ ac_tool_prefix=${host_alias}-
|
|||
if test -z $with_boost; then
|
||||
with_boost=$depends_prefix
|
||||
fi
|
||||
if test -z $with_qt_plugindir; then
|
||||
with_qt_plugindir=$depends_prefix/plugins
|
||||
fi
|
||||
if test -z $with_qt_translationdir; then
|
||||
with_qt_translationdir=$depends_prefix/translations
|
||||
fi
|
||||
if test -z $with_qt_bindir; then
|
||||
with_qt_bindir=$depends_prefix/native/bin
|
||||
fi
|
||||
if test -z $with_protoc_bindir; then
|
||||
with_protoc_bindir=$depends_prefix/native/bin
|
||||
fi
|
||||
# Disable comparison utility (#592)
|
||||
#if test -z $with_comparison_tool; then
|
||||
# with_comparison_tool=$depends_prefix/native/share/BitcoindComparisonTool_jar/BitcoindComparisonTool.jar
|
||||
|
@ -33,24 +21,11 @@ if test -z $with_miniupnpc && test -n "@no_upnp@"; then
|
|||
with_miniupnpc=no
|
||||
fi
|
||||
|
||||
if test -z $with_gui && test -n "@no_qt@"; then
|
||||
with_gui=no
|
||||
fi
|
||||
|
||||
if test x@host_os@ = xdarwin; then
|
||||
BREW=no
|
||||
PORT=no
|
||||
fi
|
||||
|
||||
if test x@host_os@ = xmingw32; then
|
||||
if test -z $with_qt_incdir; then
|
||||
with_qt_incdir=$depends_prefix/include
|
||||
fi
|
||||
if test -z $with_qt_libdir; then
|
||||
with_qt_libdir=$depends_prefix/lib
|
||||
fi
|
||||
fi
|
||||
|
||||
PATH=$depends_prefix/native/bin:$PATH
|
||||
PKG_CONFIG="`which pkg-config` --static"
|
||||
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
package=dbus
|
||||
$(package)_version=1.8.6
|
||||
$(package)_download_path=http://dbus.freedesktop.org/releases/dbus
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=eded83ca007b719f32761e60fd8b9ffd0f5796a4caf455b01b5a5ef740ebd23f
|
||||
$(package)_dependencies=expat
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-tests --disable-doxygen-docs --disable-xml-docs --disable-static --without-x
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE) -C dbus libdbus-1.la
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) -C dbus DESTDIR=$($(package)_staging_dir) install-libLTLIBRARIES install-dbusincludeHEADERS install-nodist_dbusarchincludeHEADERS && \
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install-pkgconfigDATA
|
||||
endef
|
|
@ -1,21 +0,0 @@
|
|||
package=expat
|
||||
$(package)_version=2.1.0
|
||||
$(package)_download_path=http://sourceforge.net/projects/expat/files/expat/$($(package)_version)
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=823705472f816df21c8f6aa026dd162b280806838bb55b3432b0fb1fcca7eb86
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-static
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
|
@ -1,22 +0,0 @@
|
|||
package=fontconfig
|
||||
$(package)_version=2.11.1
|
||||
$(package)_download_path=http://www.freedesktop.org/software/fontconfig/release/
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
|
||||
$(package)_sha256_hash=dc62447533bca844463a3c3fd4083b57c90f18a70506e7a9f4936b5a1e516a99
|
||||
$(package)_dependencies=freetype expat
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-docs --disable-static
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
|
@ -1,22 +0,0 @@
|
|||
package=freetype
|
||||
$(package)_version=2.5.3
|
||||
$(package)_download_path=http://downloads.sourceforge.net/$(package)
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
|
||||
$(package)_sha256_hash=c0848b29d52ef3ca27ad92e08351f023c5e24ce8cea7d8fe69fc96358e65f75e
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--without-zlib --without-png --disable-static
|
||||
$(package)_config_opts_linux=--with-pic
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
|
@ -1,23 +0,0 @@
|
|||
package=libICE
|
||||
$(package)_version=1.0.9
|
||||
$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
|
||||
$(package)_sha256_hash=8f7032f2c1c64352b5423f6b48a8ebdc339cc63064af34d66a6c9aa79759e202
|
||||
$(package)_dependencies=xtrans xproto
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-static --disable-docs --disable-specs --without-xsltproc
|
||||
$(package)_config_opts_linux=--with-pic
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
|
@ -1,23 +0,0 @@
|
|||
package=libSM
|
||||
$(package)_version=1.2.2
|
||||
$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
|
||||
$(package)_sha256_hash=0baca8c9f5d934450a70896c4ad38d06475521255ca63b717a6510fdb6e287bd
|
||||
$(package)_dependencies=xtrans xproto libICE
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--without-libuuid --without-xsltproc --disable-docs --disable-static
|
||||
$(package)_config_opts_linux=--with-pic
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
|
@ -1,23 +0,0 @@
|
|||
package=libX11
|
||||
$(package)_version=1.6.2
|
||||
$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
|
||||
$(package)_sha256_hash=2aa027e837231d2eeea90f3a4afe19948a6eb4c8b2bec0241eba7dbc8106bd16
|
||||
$(package)_dependencies=libxcb xtrans xextproto xproto
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-xkb --disable-static
|
||||
$(package)_config_opts_linux=--with-pic
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
|
@ -1,23 +0,0 @@
|
|||
package=libXau
|
||||
$(package)_version=1.0.8
|
||||
$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
|
||||
$(package)_sha256_hash=fdd477320aeb5cdd67272838722d6b7d544887dfe7de46e1e7cc0c27c2bea4f2
|
||||
$(package)_dependencies=xproto
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-shared
|
||||
$(package)_config_opts_linux=--with-pic
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
|
@ -1,22 +0,0 @@
|
|||
package=libXext
|
||||
$(package)_version=1.3.2
|
||||
$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
|
||||
$(package)_sha256_hash=f829075bc646cdc085fa25d98d5885d83b1759ceb355933127c257e8e50432e0
|
||||
$(package)_dependencies=xproto xextproto libX11 libXau
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-static
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
|
@ -0,0 +1,31 @@
|
|||
package=libevent
|
||||
$(package)_version=2.1.8
|
||||
$(package)_download_path=https://github.com/libevent/libevent/archive/
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||
$(package)_download_file=release-$($(package)_version)-stable.tar.gz
|
||||
$(package)_sha256_hash=316ddb401745ac5d222d7c529ef1eada12f58f6376a66c1118eee803cb70f83d
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
./autogen.sh
|
||||
endef
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress
|
||||
$(package)_config_opts_release=--disable-debug-mode
|
||||
$(package)_config_opts_linux=--with-pic
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
endef
|
|
@ -0,0 +1,19 @@
|
|||
package=librustzcash
|
||||
$(package)_version=0.1
|
||||
$(package)_download_path=https://github.com/zcash/$(package)/archive/
|
||||
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz
|
||||
$(package)_download_file=$($(package)_git_commit).tar.gz
|
||||
$(package)_sha256_hash=a5760a90d4a1045c8944204f29fa2a3cf2f800afee400f88bf89bbfe2cce1279
|
||||
$(package)_git_commit=91348647a86201a9482ad4ad68398152dc3d635e
|
||||
$(package)_dependencies=rust
|
||||
|
||||
define $(package)_build_cmds
|
||||
cargo build --release
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
mkdir $($(package)_staging_dir)$(host_prefix)/lib/ && \
|
||||
mkdir $($(package)_staging_dir)$(host_prefix)/include/ && \
|
||||
cp target/release/librustzcash.a $($(package)_staging_dir)$(host_prefix)/lib/ && \
|
||||
cp include/librustzcash.h $($(package)_staging_dir)$(host_prefix)/include/
|
||||
endef
|
|
@ -1,35 +0,0 @@
|
|||
package=libxcb
|
||||
$(package)_version=1.10
|
||||
$(package)_download_path=http://xcb.freedesktop.org/dist
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
|
||||
$(package)_sha256_hash=98d9ab05b636dd088603b64229dd1ab2d2cc02ab807892e107d674f9c3f2d5b5
|
||||
$(package)_dependencies=xcb_proto libXau xproto
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-static
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
sed "s/pthread-stubs//" -i configure
|
||||
endef
|
||||
|
||||
# Don't install xcb headers to the default path in order to work around a qt
|
||||
# build issue: https://bugreports.qt.io/browse/QTBUG-34748
|
||||
# When using qt's internal libxcb, it may end up finding the real headers in
|
||||
# depends staging. Use a non-default path to avoid that.
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf) --includedir=$(host_prefix)/include/xcb-shared
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm -rf share/man share/doc
|
||||
endef
|
|
@ -1,26 +0,0 @@
|
|||
package=native_cdrkit
|
||||
$(package)_version=1.1.11
|
||||
$(package)_download_path=http://distro.ibiblio.org/fatdog/source/600/c
|
||||
$(package)_file_name=cdrkit-$($(package)_version).tar.bz2
|
||||
$(package)_sha256_hash=b50d64c214a65b1a79afe3a964c691931a4233e2ba605d793eb85d0ac3652564
|
||||
$(package)_patches=cdrkit-deterministic.patch
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
patch -p1 < $($(package)_patch_dir)/cdrkit-deterministic.patch
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE) genisoimage
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) -C genisoimage install
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm bin/isovfy bin/isoinfo bin/isodump bin/isodebug bin/devdump
|
||||
endef
|
|
@ -1,22 +0,0 @@
|
|||
package=native_libdmg-hfsplus
|
||||
$(package)_version=0.1
|
||||
$(package)_download_path=https://github.com/theuni/libdmg-hfsplus/archive
|
||||
$(package)_file_name=libdmg-hfsplus-v$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=6569a02eb31c2827080d7d59001869ea14484c281efab0ae7f2b86af5c3120b3
|
||||
$(package)_build_subdir=build
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
mkdir build
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
cmake -DCMAKE_INSTALL_PREFIX:PATH=$(build_prefix)/bin ..
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE) -C dmg
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) -C dmg install
|
||||
endef
|
|
@ -1,25 +0,0 @@
|
|||
package=native_protobuf
|
||||
$(package)_version=2.5.0
|
||||
$(package)_download_path=https://protobuf.googlecode.com/files
|
||||
$(package)_file_name=protobuf-$($(package)_version).tar.bz2
|
||||
$(package)_sha256_hash=13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-shared
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE) -C src protoc
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) -C src DESTDIR=$($(package)_staging_dir) install-strip
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm -rf lib include
|
||||
endef
|
|
@ -1,5 +1,6 @@
|
|||
rust_packages := rust librustzcash
|
||||
zcash_packages := libsnark libgmp libsodium
|
||||
packages := boost openssl zeromq $(zcash_packages) googletest googlemock
|
||||
packages := boost openssl libevent zeromq $(zcash_packages) googletest googlemock
|
||||
native_packages := native_ccache
|
||||
|
||||
wallet_packages=bdb
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
package=protobuf
|
||||
$(package)_version=$(native_$(package)_version)
|
||||
$(package)_download_path=$(native_$(package)_download_path)
|
||||
$(package)_file_name=$(native_$(package)_file_name)
|
||||
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
|
||||
$(package)_dependencies=native_$(package)
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-shared --with-protoc=$(build_prefix)/bin/protoc
|
||||
$(package)_config_opts_linux=--with-pic
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE) -C src libprotobuf.la
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) -C src install-libLTLIBRARIES install-nobase_includeHEADERS &&\
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install-pkgconfigDATA
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm lib/libprotoc.a
|
||||
endef
|
|
@ -1,22 +0,0 @@
|
|||
package=qrencode
|
||||
$(package)_version=3.4.3
|
||||
$(package)_download_path=https://fukuchi.org/works/qrencode/
|
||||
$(package)_file_name=qrencode-$(qrencode_version).tar.bz2
|
||||
$(package)_sha256_hash=dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-shared -without-tools --disable-sdltest
|
||||
$(package)_config_opts_linux=--with-pic
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
|
@ -1,66 +0,0 @@
|
|||
PACKAGE=qt46
|
||||
$(package)_version=4.6.4
|
||||
$(package)_download_path=http://download.qt-project.org/archive/qt/4.6/
|
||||
$(package)_file_name=qt-everywhere-opensource-src-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=9ad4d46c721b53a429ed5a2eecfd3c239a9ab566562f183f99d3125f1a234250
|
||||
$(package)_dependencies=openssl freetype dbus libX11 xproto libXext libICE libSM
|
||||
$(package)_patches=stlfix.patch
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts = -prefix $(host_prefix) -headerdir $(host_prefix)/include/qt4 -bindir $(build_prefix)/bin
|
||||
$(package)_config_opts += -release -no-separate-debug-info -opensource -confirm-license
|
||||
$(package)_config_opts += -stl -qt-zlib
|
||||
|
||||
$(package)_config_opts += -nomake examples -nomake tests -nomake tools -nomake translations -nomake demos -nomake docs
|
||||
$(package)_config_opts += -no-audio-backend -no-glib -no-nis -no-cups -no-iconv -no-gif -no-pch
|
||||
$(package)_config_opts += -no-xkb -no-xrender -no-xrandr -no-xfixes -no-xcursor -no-xinerama -no-xsync -no-xinput -no-mitshm -no-xshape
|
||||
$(package)_config_opts += -no-libtiff -no-fontconfig -openssl-linked
|
||||
$(package)_config_opts += -no-sql-db2 -no-sql-ibase -no-sql-oci -no-sql-tds -no-sql-mysql
|
||||
$(package)_config_opts += -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2
|
||||
$(package)_config_opts += -no-xmlpatterns -no-multimedia -no-phonon -no-scripttools -no-declarative
|
||||
$(package)_config_opts += -no-phonon-backend -no-webkit -no-javascript-jit -no-script
|
||||
$(package)_config_opts += -no-svg -no-libjpeg -no-libtiff -no-libpng -no-libmng -no-qt3support -no-opengl
|
||||
|
||||
$(package)_config_opts_x86_64_linux += -platform linux-g++-64
|
||||
$(package)_config_opts_i686_linux = -platform linux-g++-32
|
||||
$(package)_build_env = QT_RCC_TEST=1
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
sed -i.old "s|/include /usr/include||" config.tests/unix/freetype/freetype.pri && \
|
||||
sed -i.old "s|src_plugins.depends = src_gui src_sql src_svg|src_plugins.depends = src_gui src_sql|" src/src.pro && \
|
||||
sed -i.old "s|\.lower(|\.toLower(|g" src/network/ssl/qsslsocket_openssl.cpp && \
|
||||
sed -i.old "s|Key_BackSpace|Key_Backspace|" src/gui/itemviews/qabstractitemview.cpp && \
|
||||
sed -i.old "s|/usr/X11R6/lib64|$(host_prefix)/lib|" mkspecs/*/*.conf && \
|
||||
sed -i.old "s|/usr/X11R6/lib|$(host_prefix)/lib|" mkspecs/*/*.conf && \
|
||||
sed -i.old "s|/usr/X11R6/include|$(host_prefix)/include|" mkspecs/*/*.conf && \
|
||||
sed -i.old "s|QMAKE_LFLAGS_SHLIB\t+= -shared|QMAKE_LFLAGS_SHLIB\t+= -shared -Wl,--exclude-libs,ALL|" mkspecs/common/g++.conf && \
|
||||
sed -i.old "/SSLv2_client_method/d" src/network/ssl/qsslsocket_openssl.cpp src/network/ssl/qsslsocket_openssl_symbols.cpp && \
|
||||
sed -i.old "/SSLv2_server_method/d" src/network/ssl/qsslsocket_openssl.cpp src/network/ssl/qsslsocket_openssl_symbols.cpp && \
|
||||
patch -p1 < $($(package)_patch_dir)/stlfix.patch
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
export PKG_CONFIG_SYSROOT_DIR=/ && \
|
||||
export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \
|
||||
export PKG_CONFIG_PATH=$(host_prefix)/share/pkgconfig && \
|
||||
export CPATH=$(host_prefix)/include && \
|
||||
OPENSSL_LIBS='-L$(host_prefix)/lib -lssl -lcrypto' ./configure $($(package)_config_opts) && \
|
||||
cd tools/linguist/lrelease; ../../../bin/qmake -o Makefile lrelease.pro
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
export CPATH=$(host_prefix)/include && \
|
||||
$(MAKE) -C src && \
|
||||
$(MAKE) -C tools/linguist/lrelease
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) -C src INSTALL_ROOT=$($(package)_staging_dir) install && \
|
||||
$(MAKE) -C tools/linguist/lrelease INSTALL_ROOT=$($(package)_staging_dir) install
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm -rf mkspecs/ lib/cmake/ lib/*.prl lib/*.la && \
|
||||
find native/bin -type f -exec mv {} {}-qt4 \;
|
||||
endef
|
|
@ -0,0 +1,9 @@
|
|||
package=rust
|
||||
$(package)_version=1.16.0
|
||||
$(package)_download_path=https://static.rust-lang.org/dist
|
||||
$(package)_file_name=rust-$($(package)_version)-x86_64-unknown-linux-gnu.tar.gz
|
||||
$(package)_sha256_hash=48621912c242753ba37cad5145df375eeba41c81079df46f93ffb4896542e8fd
|
||||
|
||||
define $(package)_stage_cmds
|
||||
./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig
|
||||
endef
|
|
@ -1,27 +0,0 @@
|
|||
package=xcb_proto
|
||||
$(package)_version=1.10
|
||||
$(package)_download_path=http://xcb.freedesktop.org/dist
|
||||
$(package)_file_name=xcb-proto-$($(package)_version).tar.bz2
|
||||
$(package)_sha256_hash=7ef40ddd855b750bc597d2a435da21e55e502a0fefa85b274f2c922800baaf05
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-shared
|
||||
$(package)_config_opts_linux=--with-pic
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
find -name "*.pyc" -delete && \
|
||||
find -name "*.pyo" -delete
|
||||
endef
|
|
@ -1,21 +0,0 @@
|
|||
package=xextproto
|
||||
$(package)_version=7.3.0
|
||||
$(package)_download_path=http://xorg.freedesktop.org/releases/individual/proto
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
|
||||
$(package)_sha256_hash=f3f4b23ac8db9c3a9e0d8edb591713f3d70ef9c3b175970dd8823dfc92aa5bb0
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-shared
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
|
@ -1,21 +0,0 @@
|
|||
package=xproto
|
||||
$(package)_version=7.0.26
|
||||
$(package)_download_path=http://xorg.freedesktop.org/releases/individual/proto
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
|
||||
$(package)_sha256_hash=636162c1759805a5a0114a369dffdeccb8af8c859ef6e1445f26a4e6e046514f
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-shared
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
|
@ -1,22 +0,0 @@
|
|||
package=xtrans
|
||||
$(package)_version=1.3.4
|
||||
$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
|
||||
$(package)_sha256_hash=054d4ee3efd52508c753e9f7bc655ef185a29bd2850dd9e2fc2ccc33544f583a
|
||||
$(package)_dependencies=
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts_linux=--with-pic --disable-static
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
|
@ -1,86 +0,0 @@
|
|||
--- cdrkit-1.1.11.old/genisoimage/tree.c 2008-10-21 19:57:47.000000000 -0400
|
||||
+++ cdrkit-1.1.11/genisoimage/tree.c 2013-12-06 00:23:18.489622668 -0500
|
||||
@@ -1139,8 +1139,9 @@
|
||||
scan_directory_tree(struct directory *this_dir, char *path,
|
||||
struct directory_entry *de)
|
||||
{
|
||||
- DIR *current_dir;
|
||||
+ int current_file;
|
||||
char whole_path[PATH_MAX];
|
||||
+ struct dirent **d_list;
|
||||
struct dirent *d_entry;
|
||||
struct directory *parent;
|
||||
int dflag;
|
||||
@@ -1164,7 +1165,8 @@
|
||||
this_dir->dir_flags |= DIR_WAS_SCANNED;
|
||||
|
||||
errno = 0; /* Paranoia */
|
||||
- current_dir = opendir(path);
|
||||
+ //current_dir = opendir(path);
|
||||
+ current_file = scandir(path, &d_list, NULL, alphasort);
|
||||
d_entry = NULL;
|
||||
|
||||
/*
|
||||
@@ -1173,12 +1175,12 @@
|
||||
*/
|
||||
old_path = path;
|
||||
|
||||
- if (current_dir) {
|
||||
+ if (current_file >= 0) {
|
||||
errno = 0;
|
||||
- d_entry = readdir(current_dir);
|
||||
+ d_entry = d_list[0];
|
||||
}
|
||||
|
||||
- if (!current_dir || !d_entry) {
|
||||
+ if (current_file < 0 || !d_entry) {
|
||||
int ret = 1;
|
||||
|
||||
#ifdef USE_LIBSCHILY
|
||||
@@ -1191,8 +1193,8 @@
|
||||
de->isorec.flags[0] &= ~ISO_DIRECTORY;
|
||||
ret = 0;
|
||||
}
|
||||
- if (current_dir)
|
||||
- closedir(current_dir);
|
||||
+ if(d_list)
|
||||
+ free(d_list);
|
||||
return (ret);
|
||||
}
|
||||
#ifdef ABORT_DEEP_ISO_ONLY
|
||||
@@ -1208,7 +1210,7 @@
|
||||
errmsgno(EX_BAD, "use Rock Ridge extensions via -R or -r,\n");
|
||||
errmsgno(EX_BAD, "or allow deep ISO9660 directory nesting via -D.\n");
|
||||
}
|
||||
- closedir(current_dir);
|
||||
+ free(d_list);
|
||||
return (1);
|
||||
}
|
||||
#endif
|
||||
@@ -1250,13 +1252,13 @@
|
||||
* The first time through, skip this, since we already asked
|
||||
* for the first entry when we opened the directory.
|
||||
*/
|
||||
- if (dflag)
|
||||
- d_entry = readdir(current_dir);
|
||||
+ if (dflag && current_file >= 0)
|
||||
+ d_entry = d_list[current_file];
|
||||
dflag++;
|
||||
|
||||
- if (!d_entry)
|
||||
+ if (current_file < 0)
|
||||
break;
|
||||
-
|
||||
+ current_file--;
|
||||
/* OK, got a valid entry */
|
||||
|
||||
/* If we do not want all files, then pitch the backups. */
|
||||
@@ -1348,7 +1350,7 @@
|
||||
insert_file_entry(this_dir, whole_path, d_entry->d_name);
|
||||
#endif /* APPLE_HYB */
|
||||
}
|
||||
- closedir(current_dir);
|
||||
+ free(d_list);
|
||||
|
||||
#ifdef APPLE_HYB
|
||||
/*
|
|
@ -1,45 +0,0 @@
|
|||
--- old/qtbase/src/plugins/platforms/xcb/xcb_qpa_lib.pro 2015-03-17 02:06:42.705930685 +0000
|
||||
+++ new/qtbase/src/plugins/platforms/xcb/xcb_qpa_lib.pro 2015-03-17 02:08:41.281926351 +0000
|
||||
@@ -94,8 +94,6 @@
|
||||
|
||||
DEFINES += $$QMAKE_DEFINES_XCB
|
||||
LIBS += $$QMAKE_LIBS_XCB
|
||||
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XCB
|
||||
-QMAKE_CFLAGS += $$QMAKE_CFLAGS_XCB
|
||||
|
||||
CONFIG += qpa/genericunixfontdatabase
|
||||
|
||||
@@ -104,7 +102,8 @@
|
||||
contains(QT_CONFIG, xcb-qt) {
|
||||
DEFINES += XCB_USE_RENDER
|
||||
XCB_DIR = ../../../3rdparty/xcb
|
||||
- INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/sysinclude
|
||||
+ QMAKE_CFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/sysinclude $$QMAKE_CFLAGS_XCB
|
||||
+ QMAKE_CXXFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/sysinclude $$QMAKE_CFLAGS_XCB
|
||||
LIBS += -lxcb -L$$OUT_PWD/xcb-static -lxcb-static
|
||||
} else {
|
||||
LIBS += -lxcb -lxcb-image -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shm -lxcb-randr -lxcb-shape -lxcb-keysyms
|
||||
--- old/qtbase/src/plugins/platforms/xcb/xcb-static/xcb-static.pro 2015-03-17 02:07:04.641929383 +0000
|
||||
+++ new/qtbase/src/plugins/platforms/xcb/xcb-static/xcb-static.pro 2015-03-17 02:10:15.485922059 +0000
|
||||
@@ -8,7 +8,8 @@
|
||||
|
||||
XCB_DIR = ../../../../3rdparty/xcb
|
||||
|
||||
-INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/include/xcb $$XCB_DIR/sysinclude
|
||||
+QMAKE_CFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/include/xcb -I$$XCB_DIR/sysinclude
|
||||
+QMAKE_CXXFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/include/xcb -I$$XCB_DIR/sysinclude
|
||||
|
||||
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XCB
|
||||
QMAKE_CFLAGS += $$QMAKE_CFLAGS_XCB
|
||||
--- old/qtbase/src/plugins/platforms/xcb/xcb-plugin.pro 2015-07-24 16:02:59.530038830 -0400
|
||||
+++ new/qtbase/src/plugins/platforms/xcb/xcb-plugin.pro 2015-07-24 16:01:22.106037459 -0400
|
||||
@@ -11,3 +11,9 @@
|
||||
qxcbmain.cpp
|
||||
OTHER_FILES += xcb.json README
|
||||
|
||||
+contains(QT_CONFIG, xcb-qt) {
|
||||
+ DEFINES += XCB_USE_RENDER
|
||||
+ XCB_DIR = ../../../3rdparty/xcb
|
||||
+ QMAKE_CFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/sysinclude $$QMAKE_CFLAGS_XCB
|
||||
+ QMAKE_CXXFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/sysinclude $$QMAKE_CFLAGS_XCB
|
||||
+}
|
|
@ -1,26 +0,0 @@
|
|||
MAKEFILE_GENERATOR = UNIX
|
||||
CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname absolute_library_soname
|
||||
DEFINES += QT_NO_PRINTER QT_NO_PRINTDIALOG
|
||||
QMAKE_INCREMENTAL_STYLE = sublib
|
||||
include(../common/macx.conf)
|
||||
include(../common/gcc-base-mac.conf)
|
||||
include(../common/clang.conf)
|
||||
include(../common/clang-mac.conf)
|
||||
QMAKE_MAC_SDK_PATH=$${MAC_SDK_PATH}
|
||||
QMAKE_XCODE_VERSION=4.3
|
||||
QMAKE_XCODE_DEVELOPER_PATH=/Developer
|
||||
QMAKE_MACOSX_DEPLOYMENT_TARGET = $${MAC_MIN_VERSION}
|
||||
QMAKE_MAC_SDK=macosx
|
||||
QMAKE_MAC_SDK.macosx.path = $${MAC_SDK_PATH}
|
||||
QMAKE_MAC_SDK.macosx.platform_name = macosx
|
||||
QMAKE_MAC_SDK.macosx.version = $${MAC_SDK_VERSION}
|
||||
QMAKE_MAC_SDK.macosx.platform_path = /phony
|
||||
QMAKE_CFLAGS += -target $${MAC_TARGET}
|
||||
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS
|
||||
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
|
||||
QMAKE_LFLAGS += -target $${MAC_TARGET} -mlinker-version=$${MAC_LD64_VERSION}
|
||||
QMAKE_AR = $${CROSS_COMPILE}ar cq
|
||||
QMAKE_RANLIB=$${CROSS_COMPILE}ranlib
|
||||
QMAKE_LIBTOOL=$${CROSS_COMPILE}libtool
|
||||
QMAKE_INSTALL_NAME_TOOL=$${CROSS_COMPILE}install_name_tool
|
||||
load(qt_config)
|
|
@ -1,44 +0,0 @@
|
|||
--- old/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp 2015-06-20 17:40:20.956781548 -0400
|
||||
+++ new/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp 2015-06-20 17:29:32.052772416 -0400
|
||||
@@ -69,7 +69,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <windowsx.h>
|
||||
-#ifndef Q_OS_WINCE
|
||||
+#if !defined(Q_OS_WINCE) && (!defined(USE___UUIDOF) || (defined(USE___UUIDOF) && USE___UUIDOF == 1))
|
||||
# include <comdef.h>
|
||||
#endif
|
||||
|
||||
@@ -762,7 +762,7 @@
|
||||
HWND_MESSAGE, NULL, (HINSTANCE)GetModuleHandle(0), NULL);
|
||||
}
|
||||
|
||||
-#ifndef Q_OS_WINCE
|
||||
+#if !defined(Q_OS_WINCE) && (!defined(USE___UUIDOF) || (defined(USE___UUIDOF) && USE___UUIDOF == 1))
|
||||
// Re-engineered from the inline function _com_error::ErrorMessage().
|
||||
// We cannot use it directly since it uses swprintf_s(), which is not
|
||||
// present in the MSVCRT.DLL found on Windows XP (QTBUG-35617).
|
||||
@@ -781,7 +781,7 @@
|
||||
return QStringLiteral("IDispatch error #") + QString::number(wCode);
|
||||
return QStringLiteral("Unknown error 0x0") + QString::number(comError.Error(), 16);
|
||||
}
|
||||
-#endif // !Q_OS_WINCE
|
||||
+#endif // !defined(Q_OS_WINCE) && (!defined(USE___UUIDOF) || (defined(USE___UUIDOF) && USE___UUIDOF == 1))
|
||||
|
||||
/*!
|
||||
\brief Common COM error strings.
|
||||
@@ -846,12 +846,12 @@
|
||||
default:
|
||||
break;
|
||||
}
|
||||
-#ifndef Q_OS_WINCE
|
||||
+#if !defined(Q_OS_WINCE) && (!defined(USE___UUIDOF) || (defined(USE___UUIDOF) && USE___UUIDOF == 1))
|
||||
_com_error error(hr);
|
||||
result += QByteArrayLiteral(" (");
|
||||
result += errorMessageFromComError(error);
|
||||
result += ')';
|
||||
-#endif // !Q_OS_WINCE
|
||||
+#endif // !defined(Q_OS_WINCE) && (!defined(USE___UUIDOF) || (defined(USE___UUIDOF) && USE___UUIDOF == 1))
|
||||
return result;
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
--- old/config.tests/unix/stl/stltest.cpp 2011-06-23 03:45:23.000000000 -0400
|
||||
+++ new/config.tests/unix/stl/stltest.cpp 2014-08-28 00:54:04.154837604 -0400
|
||||
@@ -49,6 +49,7 @@
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
+#include <cstddef>
|
||||
|
||||
// something mean to see if the compiler and C++ standard lib are good enough
|
||||
template<class K, class T>
|
|
@ -1,46 +0,0 @@
|
|||
The following is a list of assets used in the bitcoin source and their proper attribution.
|
||||
|
||||
[Typicons/Stephen Hutchings](http://typicons.com)
|
||||
-----------------------
|
||||
|
||||
### Info
|
||||
* Icon Pack: Typicons (http://typicons.com)
|
||||
* Designer: Stephen Hutchings (and more)
|
||||
* License: MIT
|
||||
* Site: [https://github.com/stephenhutchings/typicons.font](https://github.com/stephenhutchings/typicons.font)
|
||||
|
||||
### Assets Used
|
||||
src/qt/res/icons/add.png, src/qt/res/icons/address-book.png,
|
||||
src/qt/res/icons/configure.png, src/qt/res/icons/connect4.png,
|
||||
src/qt/res/icons/debugwindow.png, src/qt/res/icons/edit.png,
|
||||
src/qt/res/icons/exitcopy.png, src/qt/res/icons/editpaste.png,
|
||||
src/qt/res/icons/export.png, src/qt/res/icons/eye.png,
|
||||
src/qt/res/icons/filesave.png, src/qt/res/icons/history.png,
|
||||
src/qt/res/icons/info.png, src/qt/res/icons/key.png,
|
||||
src/qt/res/icons/lock_*.png, src/qt/res/icons/open.png,
|
||||
src/qt/res/icons/overview.png, src/qt/res/icons/quit.png,
|
||||
src/qt/res/icons/receive.png, src/qt/res/icons/remove.png,
|
||||
src/qt/res/icons/send.png, src/qt/res/icons/synced.png,
|
||||
src/qt/res/icons/transaction*.png, src/qt/res/icons/tx_output.png,
|
||||
src/qt/res/icons/warning.png
|
||||
|
||||
Jonas Schnelli
|
||||
-----------------------
|
||||
|
||||
### Info
|
||||
* Designer: Jonas Schnelli
|
||||
* Bitcoin Icon: (based on the original bitcoin logo from Bitboy)
|
||||
* Some icons are based on Stephan Hutchings Typicons
|
||||
* License: MIT
|
||||
|
||||
### Assets Used
|
||||
src/qt/res/icons/about.png, src/qt/res/icons/about_qt.png,
|
||||
src/qt/res/icons/bitcoin.icns, src/qt/res/icons/bitcoin.ico,
|
||||
src/qt/res/icons/bitcoin.png, src/qt/res/icons/clock*.png,
|
||||
src/qt/res/icons/connect[0-3].png, src/qt/res/icons/eye_minus.png,
|
||||
src/qt/res/icons/eye_plus.png, src/qt/res/icons/verify.png,
|
||||
src/qt/res/icons/tx_inout.png, src/qt/res/icons/tx_input.png,
|
||||
src/qt/res/src/verify.svg, src/qt/res/src/bitcoin.svg,
|
||||
src/qt/res/src/clock*.svg, src/qt/res/src/connect*.svg,
|
||||
src/qt/res/src/mine.svg, src/qt/res/src/qt.svg, src/qt/res/src/tx*.svg,
|
||||
src/qt/res/src/verify.svg,
|
|
@ -1,54 +1,86 @@
|
|||
Zcash Contributors
|
||||
==================
|
||||
|
||||
Jack Grigg (356)
|
||||
Simon Liu (236)
|
||||
Sean Bowe (183)
|
||||
Jack Grigg (392)
|
||||
Simon Liu (254)
|
||||
Sean Bowe (185)
|
||||
Daira Hopwood (80)
|
||||
Taylor Hornby (65)
|
||||
Daira Hopwood (64)
|
||||
Wladimir J. van der Laan (58)
|
||||
Jonas Schnelli (48)
|
||||
Jay Graber (47)
|
||||
Kevin Gallagher (38)
|
||||
Jay Graber (35)
|
||||
Jonas Schnelli (24)
|
||||
Wladimir J. van der Laan (20)
|
||||
Cory Fields (11)
|
||||
Cory Fields (15)
|
||||
Pieter Wuille (14)
|
||||
Nathan Wilcox (10)
|
||||
Pieter Wuille (8)
|
||||
nomnombtc (9)
|
||||
fanquake (5)
|
||||
Paige Peterson (5)
|
||||
MarcoFalke (5)
|
||||
Johnathan Corgan (5)
|
||||
fanquake (4)
|
||||
Gregory Maxwell (5)
|
||||
Philip Kaufmann (4)
|
||||
Peter Todd (4)
|
||||
Patrick Strateman (4)
|
||||
Matt Corallo (4)
|
||||
Karl-Johan Alm (4)
|
||||
Jeff Garzik (4)
|
||||
David Mercer (4)
|
||||
Daniel Cousens (4)
|
||||
lpescher (3)
|
||||
Patrick Strateman (3)
|
||||
MarcoFalke (3)
|
||||
Daniel Cousens (3)
|
||||
Pavel Janík (3)
|
||||
Alfie John (3)
|
||||
paveljanik (2)
|
||||
aniemerg (2)
|
||||
Scott (2)
|
||||
Robert C. Seacord (2)
|
||||
Luke Dashjr (2)
|
||||
João Barbosa (2)
|
||||
Joe Turgeon (2)
|
||||
Jack Gavigan (2)
|
||||
ITH4Coinomia (2)
|
||||
Gregory Maxwell (2)
|
||||
paveljanik (1)
|
||||
Gavin Andresen (2)
|
||||
zathras-crypto (1)
|
||||
unsystemizer (1)
|
||||
mruddy (1)
|
||||
mrbandrews (1)
|
||||
kazcw (1)
|
||||
isle2983 (1)
|
||||
instagibbs (1)
|
||||
dexX7 (1)
|
||||
calebogden (1)
|
||||
ayleph (1)
|
||||
Tom Ritter (1)
|
||||
Stephen (1)
|
||||
S. Matthew English (1)
|
||||
Philip Kaufmann (1)
|
||||
Pavel Vasin (1)
|
||||
Paul Georgiou (1)
|
||||
Paragon Initiative Enterprises, LLC (1)
|
||||
Nathaniel Mahieu (1)
|
||||
Murilo Santana (1)
|
||||
Matt Quinn (1)
|
||||
Louis Nyffenegger (1)
|
||||
Leo Arias (1)
|
||||
Lars-Magnus Skog (1)
|
||||
Jorge Timón (1)
|
||||
Jeffrey Walton (1)
|
||||
Ian Kelling (1)
|
||||
Gaurav Rana (1)
|
||||
Forrest Voight (1)
|
||||
Florian Schmaus (1)
|
||||
Ethan Heilman (1)
|
||||
Eran Tromer (1)
|
||||
Daniel Kraft (1)
|
||||
Christian von Roques (1)
|
||||
Chirag Davé (1)
|
||||
Casey Rodarmor (1)
|
||||
Cameron Boehmer (1)
|
||||
Bryan Stitt (1)
|
||||
Bob McElrath (1)
|
||||
Bitcoin Error Log (1)
|
||||
Allan Niemerg (1)
|
||||
Alex van der Peet (1)
|
||||
Alex (1)
|
||||
Adam Weiss (1)
|
||||
Adam Brown (1)
|
||||
4ZEC (1)
|
||||
|
|
|
@ -105,9 +105,6 @@ error and debugging messages are written there.
|
|||
The -debug=... command-line option controls debugging; running with just -debug or -debug=1 will turn
|
||||
on all categories (and give you a very large debug.log file).
|
||||
|
||||
The Qt code routes qDebug() output to debug.log under category "qt": run with -debug=qt
|
||||
to see it.
|
||||
|
||||
**testnet and regtest modes**
|
||||
|
||||
Run with the -testnet option to run with "play zcash" on the test network, if you
|
||||
|
|
|
@ -10,3 +10,5 @@
|
|||
* fee_estimates.dat: stores statistics used to estimate minimum transaction fees and priorities required for confirmation
|
||||
* peers.dat: peer IP address database (custom format)
|
||||
* wallet.dat: personal wallet (BDB) with keys and transactions
|
||||
* .cookie: session RPC authentication cookie (written at start when cookie authentication is used, deleted on shutdown): since 0.12.0
|
||||
* onion_private_key: cached Tor hidden service private key for `-listenonion`: since 0.12.0
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
dist_man1_MANS=zcashd.1 zcash-cli.1 zcash-fetch-params.1 zcash-tx.1
|
|
@ -1,9 +1,12 @@
|
|||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
|
||||
.TH ZCASH-CLI "1" "February 2017" "Zcash RPC client version v1.0.6" "User Commands"
|
||||
.TH ZCASH-CLI "1" "March 2017" "zcash-cli v1.0.8" "User Commands"
|
||||
.SH NAME
|
||||
zcash-cli \- RPC client for the Zcash daemon
|
||||
zcash-cli \- manual page for zcash-cli v1.0.8
|
||||
.SH DESCRIPTION
|
||||
Zcash RPC client version v1.0.6
|
||||
Zcash RPC client version v1.0.8
|
||||
.PP
|
||||
In order to ensure you are adequately protecting your privacy when using Zclassic,
|
||||
please see <https://z.cash/support/security/index.html>.
|
||||
.SS "Usage:"
|
||||
.TP
|
||||
zcash\-cli [options] <command> [params]
|
||||
|
@ -57,36 +60,21 @@ Username for JSON\-RPC connections
|
|||
\fB\-rpcpassword=\fR<pw>
|
||||
.IP
|
||||
Password for JSON\-RPC connections
|
||||
.PP
|
||||
SSL options: (see the Bitcoin Wiki for SSL setup instructions)
|
||||
.HP
|
||||
\fB\-rpcssl\fR
|
||||
\fB\-rpcclienttimeout=\fR<n>
|
||||
.IP
|
||||
Use OpenSSL (https) for JSON\-RPC connections
|
||||
Timeout in seconds during HTTP requests, or 0 for no timeout. (default:
|
||||
900)
|
||||
.SH COPYRIGHT
|
||||
Copyright \(co 2009\-2017 The Bitcoin Core Developers
|
||||
.br
|
||||
Copyright \(co 2015\-2017 The Zcash Developers
|
||||
.br
|
||||
Copyright \(co 2015\-2017 zdeveloper.org
|
||||
.PP
|
||||
|
||||
This is experimental software.
|
||||
.PP
|
||||
|
||||
Distributed under the MIT software license, see the accompanying file COPYING
|
||||
or <http://www.opensource.org/licenses/mit\-license.php>.
|
||||
.PP
|
||||
|
||||
This product includes software developed by the OpenSSL Project for use in the
|
||||
OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
|
||||
by Eric Young and UPnP software written by Thomas Bernard.
|
||||
.SH "SEE ALSO"
|
||||
The full documentation for
|
||||
.B Zcash
|
||||
is maintained as a Texinfo manual. If the
|
||||
.B info
|
||||
and
|
||||
.B Zcash
|
||||
programs are properly installed at your site, the command
|
||||
.IP
|
||||
.B info Zcash
|
||||
.PP
|
||||
should give you access to the complete manual.
|
|
@ -0,0 +1,97 @@
|
|||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
|
||||
.TH ZCASH-TX "1" "March 2017" "zcash-tx v1.0.8" "User Commands"
|
||||
.SH NAME
|
||||
zcash-tx \- manual page for zcash-tx v1.0.8
|
||||
.SH DESCRIPTION
|
||||
Zcash zcash\-tx utility version v1.0.8
|
||||
.SS "Usage:"
|
||||
.TP
|
||||
zcash\-tx [options] <hex\-tx> [commands]
|
||||
Update hex\-encoded zcash transaction
|
||||
.TP
|
||||
zcash\-tx [options] \fB\-create\fR [commands]
|
||||
Create hex\-encoded zcash transaction
|
||||
.SH OPTIONS
|
||||
.HP
|
||||
\-?
|
||||
.IP
|
||||
This help message
|
||||
.HP
|
||||
\fB\-create\fR
|
||||
.IP
|
||||
Create new, empty TX.
|
||||
.HP
|
||||
\fB\-json\fR
|
||||
.IP
|
||||
Select JSON output
|
||||
.HP
|
||||
\fB\-txid\fR
|
||||
.IP
|
||||
Output only the hex\-encoded transaction id of the resultant transaction.
|
||||
.HP
|
||||
\fB\-regtest\fR
|
||||
.IP
|
||||
Enter regression test mode, which uses a special chain in which blocks
|
||||
can be solved instantly.
|
||||
.HP
|
||||
\fB\-testnet\fR
|
||||
.IP
|
||||
Use the test network
|
||||
.PP
|
||||
Commands:
|
||||
.IP
|
||||
delin=N
|
||||
.IP
|
||||
Delete input N from TX
|
||||
.IP
|
||||
delout=N
|
||||
.IP
|
||||
Delete output N from TX
|
||||
.IP
|
||||
in=TXID:VOUT
|
||||
.IP
|
||||
Add input to TX
|
||||
.IP
|
||||
locktime=N
|
||||
.IP
|
||||
Set TX lock time to N
|
||||
.IP
|
||||
nversion=N
|
||||
.IP
|
||||
Set TX version to N
|
||||
.IP
|
||||
outaddr=VALUE:ADDRESS
|
||||
.IP
|
||||
Add address\-based output to TX
|
||||
.IP
|
||||
outscript=VALUE:SCRIPT
|
||||
.IP
|
||||
Add raw script output to TX
|
||||
.IP
|
||||
sign=SIGHASH\-FLAGS
|
||||
.IP
|
||||
Add zero or more signatures to transaction. This command requires JSON
|
||||
registers:prevtxs=JSON object, privatekeys=JSON object. See
|
||||
signrawtransaction docs for format of sighash flags, JSON objects.
|
||||
.PP
|
||||
Register Commands:
|
||||
.IP
|
||||
load=NAME:FILENAME
|
||||
.IP
|
||||
Load JSON file FILENAME into register NAME
|
||||
.IP
|
||||
set=NAME:JSON\-STRING
|
||||
.IP
|
||||
Set register NAME to given JSON\-STRING
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) 2009-2017 The Bitcoin Core Developers
|
||||
Copyright (C) 2015-2017 The Zcash Developers
|
||||
|
||||
This is experimental software.
|
||||
|
||||
Distributed under the MIT software license, see the accompanying file COPYING
|
||||
or <http://www.opensource.org/licenses/mit-license.php>.
|
||||
|
||||
This product includes software developed by the OpenSSL Project for use in the
|
||||
OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
|
||||
by Eric Young and UPnP software written by Thomas Bernard.
|
|
@ -1,9 +1,12 @@
|
|||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
|
||||
.TH ZCASHD "1" "February 2017" "Zcash Daemon version v1.0.6" "User Commands"
|
||||
.TH ZCASHD "1" "March 2017" "zcashd v1.0.8" "User Commands"
|
||||
.SH NAME
|
||||
zcashd \- Network daemon for interacting with the Zcash blockchain
|
||||
zcashd \- manual page for zcashd v1.0.8
|
||||
.SH DESCRIPTION
|
||||
Zcash Daemon version v1.0.6
|
||||
Zcash Daemon version v1.0.8
|
||||
.PP
|
||||
In order to ensure you are adequately protecting your privacy when using Zclassic,
|
||||
please see <https://z.cash/support/security/index.html>.
|
||||
.SS "Usage:"
|
||||
.TP
|
||||
zcashd [options]
|
||||
|
@ -66,7 +69,7 @@ Keep at most <n> unconnectable transactions in memory (default: 100)
|
|||
.HP
|
||||
\fB\-par=\fR<n>
|
||||
.IP
|
||||
Set the number of script verification threads (\fB\-8\fR to 16, 0 = auto, <0 =
|
||||
Set the number of script verification threads (\fB\-4\fR to 16, 0 = auto, <0 =
|
||||
leave that many cores free, default: 0)
|
||||
.HP
|
||||
\fB\-pid=\fR<file>
|
||||
|
@ -145,6 +148,10 @@ Always query for peer addresses via DNS lookup (default: 0)
|
|||
.IP
|
||||
Accept connections from outside (default: 1 if no \fB\-proxy\fR or \fB\-connect\fR)
|
||||
.HP
|
||||
\fB\-listenonion\fR
|
||||
.IP
|
||||
Automatically create Tor hidden service (default: 1)
|
||||
.HP
|
||||
\fB\-maxconnections=\fR<n>
|
||||
.IP
|
||||
Maintain at most <n> connections to peers (default: 125)
|
||||
|
@ -191,6 +198,15 @@ Connect to a node to retrieve peer addresses, and disconnect
|
|||
.IP
|
||||
Specify connection timeout in milliseconds (minimum: 1, default: 5000)
|
||||
.HP
|
||||
\fB\-torcontrol=\fR<ip>:<port>
|
||||
.IP
|
||||
Tor control port to use if onion listening enabled (default:
|
||||
127.0.0.1:9051)
|
||||
.HP
|
||||
\fB\-torpassword=\fR<pass>
|
||||
.IP
|
||||
Tor control port password (default: empty)
|
||||
.HP
|
||||
\fB\-upnp\fR
|
||||
.IP
|
||||
Use UPnP to map the listening port (default: 0)
|
||||
|
@ -295,9 +311,9 @@ Debugging/Testing options:
|
|||
Output debugging information (default: 0, supplying <category> is
|
||||
optional). If <category> is not supplied or if <category> = 1, output
|
||||
all debugging information. <category> can be: addrman, alert, bench,
|
||||
coindb, db, estimatefee, lock, mempool, net, partitioncheck, pow, proxy,
|
||||
prune, rand, reindex, rpc, selectcoins, zmq, zrpc, zrpcunsafe (implies
|
||||
zrpc).
|
||||
coindb, db, estimatefee, http, libevent, lock, mempool, net,
|
||||
partitioncheck, pow, proxy, prune, rand, reindex, rpc, selectcoins, tor,
|
||||
zmq, zrpc, zrpcunsafe (implies zrpc).
|
||||
.HP
|
||||
\fB\-experimentalfeatures\fR
|
||||
.IP
|
||||
|
@ -318,7 +334,7 @@ Prepend debug output with timestamp (default: 1)
|
|||
\fB\-minrelaytxfee=\fR<amt>
|
||||
.IP
|
||||
Fees (in BTC/Kb) smaller than this are considered zero fee for relaying
|
||||
(default: 0.00001)
|
||||
(default: 0.000001)
|
||||
.HP
|
||||
\fB\-printtoconsole\fR
|
||||
.IP
|
||||
|
@ -422,25 +438,6 @@ multiple times
|
|||
.IP
|
||||
Set the number of threads to service RPC calls (default: 4)
|
||||
.PP
|
||||
RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)
|
||||
.HP
|
||||
\fB\-rpcssl\fR
|
||||
.IP
|
||||
Use OpenSSL (https) for JSON\-RPC connections
|
||||
.HP
|
||||
\fB\-rpcsslcertificatechainfile=\fR<file.cert>
|
||||
.IP
|
||||
Server certificate file (default: server.cert)
|
||||
.HP
|
||||
\fB\-rpcsslprivatekeyfile=\fR<file.pem>
|
||||
.IP
|
||||
Server private key (default: server.pem)
|
||||
.HP
|
||||
\fB\-rpcsslciphers=\fR<ciphers>
|
||||
.IP
|
||||
Acceptable ciphers (default:
|
||||
TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)
|
||||
.PP
|
||||
Metrics Options (only if \fB\-daemon\fR and \fB\-printtoconsole\fR are not set):
|
||||
.HP
|
||||
\fB\-showmetrics\fR
|
||||
|
@ -458,28 +455,14 @@ Number of seconds between metrics refreshes (default: 1 if running in a
|
|||
console, 600 otherwise)
|
||||
.SH COPYRIGHT
|
||||
Copyright \(co 2009\-2017 The Bitcoin Core Developers
|
||||
.br
|
||||
Copyright \(co 2015\-2017 The Zcash Developers
|
||||
.br
|
||||
Copyright \(co 2015\-2017 zdeveloper.org
|
||||
.PP
|
||||
|
||||
This is experimental software.
|
||||
.PP
|
||||
|
||||
Distributed under the MIT software license, see the accompanying file COPYING
|
||||
or <http://www.opensource.org/licenses/mit\-license.php>.
|
||||
.PP
|
||||
or <http://www.opensource.org/licenses/mit-license.php>.
|
||||
|
||||
This product includes software developed by the OpenSSL Project for use in the
|
||||
OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
|
||||
by Eric Young and UPnP software written by Thomas Bernard.
|
||||
.SH "SEE ALSO"
|
||||
The full documentation for
|
||||
.B Zcash
|
||||
is maintained as a Texinfo manual. If the
|
||||
.B info
|
||||
and
|
||||
.B Zcash
|
||||
programs are properly installed at your site, the command
|
||||
.IP
|
||||
.B info Zcash
|
||||
.PP
|
||||
should give you access to the complete manual.
|
|
@ -1,50 +0,0 @@
|
|||
*** Warning: This document has not been updated for Zcash and may be inaccurate. ***
|
||||
|
||||
Multiwallet Qt Development and Integration Strategy
|
||||
===================================================
|
||||
|
||||
In order to support loading of multiple wallets in bitcoin-qt, a few changes in the UI architecture will be needed.
|
||||
Fortunately, only four of the files in the existing project are affected by this change.
|
||||
|
||||
Two new classes have been implemented in two new .h/.cpp file pairs, with much of the functionality that was previously
|
||||
implemented in the BitcoinGUI class moved over to these new classes.
|
||||
|
||||
The two existing files most affected, by far, are bitcoingui.h and bitcoingui.cpp, as the BitcoinGUI class will require
|
||||
some major retrofitting.
|
||||
|
||||
Only requiring some minor changes is bitcoin.cpp.
|
||||
|
||||
Finally, two new headers and source files will have to be added to bitcoin-qt.pro.
|
||||
|
||||
Changes to class BitcoinGUI
|
||||
---------------------------
|
||||
The principal change to the BitcoinGUI class concerns the QStackedWidget instance called centralWidget.
|
||||
This widget owns five page views: overviewPage, transactionsPage, addressBookPage, receiveCoinsPage, and sendCoinsPage.
|
||||
|
||||
A new class called *WalletView* inheriting from QStackedWidget has been written to handle all renderings and updates of
|
||||
these page views. In addition to owning these five page views, a WalletView also has a pointer to a WalletModel instance.
|
||||
This allows the construction of multiple WalletView objects, each rendering a distinct wallet.
|
||||
|
||||
A second class called *WalletFrame* inheriting from QFrame has been written as a container for embedding all wallet-related
|
||||
controls into BitcoinGUI. At present it contains the WalletView instances for the wallets and does little more than passing on messages
|
||||
from BitcoinGUI to the currently selected WalletView. It is a WalletFrame instance
|
||||
that takes the place of what used to be centralWidget in BitcoinGUI. The purpose of this class is to allow future
|
||||
refinements of the wallet controls with minimal need for further modifications to BitcoinGUI, thus greatly simplifying
|
||||
merges while reducing the risk of breaking top-level stuff.
|
||||
|
||||
Changes to bitcoin.cpp
|
||||
----------------------
|
||||
bitcoin.cpp is the entry point into bitcoin-qt, and as such, will require some minor modifications to provide hooks for
|
||||
multiple wallet support. Most importantly will be the way it instantiates WalletModels and passes them to the
|
||||
singleton BitcoinGUI instance called window. Formerly, BitcoinGUI kept a pointer to a single instance of a WalletModel.
|
||||
The initial change required is very simple: rather than calling `window.setWalletModel(&walletModel);` we perform the
|
||||
following two steps:
|
||||
|
||||
window.addWallet("~Default", &walletModel);
|
||||
window.setCurrentWallet("~Default");
|
||||
|
||||
The string parameter is just an arbitrary name given to the default wallet. It's been prepended with a tilde to avoid name collisions in the future with additional wallets.
|
||||
|
||||
The shutdown call `window.setWalletModel(0)` has also been removed. In its place is now:
|
||||
|
||||
window.removeAllWallets();
|
|
@ -0,0 +1,4 @@
|
|||
Jay Graber (3):
|
||||
Add -t to git fetch for release-notes.py
|
||||
Update version to 1.0.7-1
|
||||
Update auto-generated manpages to 1.0.7-1
|
|
@ -0,0 +1,165 @@
|
|||
Adam Weiss (1):
|
||||
Buffer log messages and explicitly open logs
|
||||
|
||||
Alex van der Peet (1):
|
||||
New RPC command disconnectnode
|
||||
|
||||
Allan Niemerg (1):
|
||||
Pause mining during joinsplit creation
|
||||
|
||||
Casey Rodarmor (1):
|
||||
Don't share objects between TestInstances
|
||||
|
||||
Cory Fields (2):
|
||||
locking: teach Clang's -Wthread-safety to cope with our scoped lock macros
|
||||
locking: add a quick example of GUARDED_BY
|
||||
|
||||
Daira Hopwood (1):
|
||||
Don't assume sizes of unsigned short and unsigned int in GetSizeOfCompactSize and WriteCompactSize. Fixes #2137
|
||||
|
||||
Daniel Kraft (1):
|
||||
Fix univalue handling of \u0000 characters.
|
||||
|
||||
Florian Schmaus (1):
|
||||
Add BITCOIND_SIGTERM_TIMEOUT to OpenRC init scripts
|
||||
|
||||
Forrest Voight (1):
|
||||
When processing RPC commands during warmup phase, parse the request object before returning an error so that id value can be used in the response.
|
||||
|
||||
Gavin Andresen (2):
|
||||
configure --enable-debug changes
|
||||
Testing infrastructure: mocktime fixes
|
||||
|
||||
Jack Grigg (11):
|
||||
Remove reference to -reindex-chainstate
|
||||
Treat metrics screen as non-interactive for now
|
||||
Adjust gen-manpages.sh for Zcash, use in Debian builds
|
||||
Regenerate and collate Zcash manpages, delete Bitcoin ones
|
||||
Update release process with gen-manpages.sh
|
||||
Adjust blockheaderToJSON() for Zcash block header
|
||||
Adjust fundrawtransaction RPC test for Zcash
|
||||
Re-encode t-addrs in disablewallet.py with Zcash prefixes
|
||||
BTC -> ZEC in paytxfee RPC docs
|
||||
Update default RPC port in help strings
|
||||
Fix typo in listbanned RPC keys
|
||||
|
||||
Jay Graber (4):
|
||||
Add rpc test for prioritisetransaction
|
||||
Inc num of txs in test mempool
|
||||
Update release to 1.0.7, generate manpages
|
||||
Add 1.0.7 release notes and update authors.md
|
||||
|
||||
Jonas Schnelli (23):
|
||||
[net] extend core functionallity for ban/unban/listban
|
||||
[RPC] add setban/listbanned/clearbanned RPC commands
|
||||
[QA] add setban/listbanned/clearbanned tests
|
||||
[net] remove unused return type bool from CNode::Ban()
|
||||
[RPC] extend setban to allow subnets
|
||||
rename json field "bannedtill" to "banned_until"
|
||||
setban: rewrite to UniValue, allow absolute bantime
|
||||
fix CSubNet comparison operator
|
||||
setban: add RPCErrorCode
|
||||
add RPC tests for setban & disconnectnode
|
||||
fix missing lock in CNode::ClearBanned()
|
||||
setban: add IPv6 tests
|
||||
fix lock issue for QT node diconnect and RPC disconnectnode
|
||||
fundrawtransaction tests
|
||||
UniValue: don't escape solidus, keep espacing of reverse solidus
|
||||
[REST] add JSON support for /rest/headers/
|
||||
[QA] fix possible reorg issue in rawtransaction.py/fundrawtransaction.py RPC test
|
||||
[QA] remove rawtransactions.py from the extended test list
|
||||
[QA] add testcases for parsing strings as values
|
||||
[bitcoin-cli] improve error output
|
||||
fix and extend CBitcoinExtKeyBase template
|
||||
extend bip32 tests to cover Base58c/CExtKey decode
|
||||
don't try to decode invalid encoded ext keys
|
||||
|
||||
Jorge Timón (1):
|
||||
Consensus: Refactor: Separate Consensus::CheckTxInputs and GetSpendHeight in CheckInputs
|
||||
|
||||
Leo Arias (1):
|
||||
Fix the path to the example configuration
|
||||
|
||||
Luke Dashjr (1):
|
||||
Fix various warnings
|
||||
|
||||
Matt Corallo (4):
|
||||
Small tweaks to CCoinControl for fundrawtransaction
|
||||
Add FundTransaction method to wallet
|
||||
Add fundrawtransaction RPC method
|
||||
Assert on probable deadlocks if the second lock isnt try_lock
|
||||
|
||||
Murilo Santana (1):
|
||||
Fix sha256sum on busybox by using -c instead of --check
|
||||
|
||||
Paul Georgiou (1):
|
||||
Update Linearize tool to support Windows paths
|
||||
|
||||
Pavel Vasin (1):
|
||||
remove unused inv from ConnectTip()
|
||||
|
||||
Peter Todd (2):
|
||||
Add getblockheader RPC call
|
||||
Improve comment explaining purpose of MAX_MONEY constant
|
||||
|
||||
Philip Kaufmann (3):
|
||||
use const references where appropriate
|
||||
[init] add -blockversion help and extend -upnp help
|
||||
make CAddrMan::size() return the correct type of size_t
|
||||
|
||||
Pieter Wuille (3):
|
||||
Do not ask a UI question from bitcoind
|
||||
Add DummySignatureCreator which just creates zeroed sigs
|
||||
Reduce checkpoints' effect on consensus.
|
||||
|
||||
Simon Liu (14):
|
||||
Alert 1000
|
||||
Alert 1001
|
||||
Add assert to check alert message length is valid
|
||||
Fix bug where test was generating but not saving keys to wallet on disk.
|
||||
Update founders reward addresses for testnet
|
||||
Keep first three original testnet fr addresses so existing coinbase transactions on testnet remain valid during upgrade. New addresses will be used starting from block 53127.
|
||||
Closes #2083 and #2088. Update release process documentation
|
||||
Closes #2084. Fix incorrect year in timestamp.
|
||||
Closes #2112 where z_getoperationresult could return stale status.
|
||||
Add mainnet checkpoint at block 67500
|
||||
Add testnet checkpoint at block 38000
|
||||
Closes #1969. Default fee now sufficient for large shielded tx.
|
||||
Part of #1969. Changing min fee calculation also changes the dust threshold.
|
||||
Part of #1969. Update tests to avoid error 'absurdly high fee' from change in min fee calc.
|
||||
|
||||
Stephen (1):
|
||||
Add paytxfee to getwalletinfo, warnings to getnetworkinfo
|
||||
|
||||
Wladimir J. van der Laan (10):
|
||||
rpc: make `gettxoutsettinfo` run lock-free
|
||||
test: Move reindex test to standard tests
|
||||
rpc: Remove chain-specific RequireRPCPassword
|
||||
univalue: Avoid unnecessary roundtrip through double for numbers
|
||||
rpc: Accept strings in AmountFromValue
|
||||
Fix crash in validateaddress with -disablewallet
|
||||
Improve proxy initialization
|
||||
tests: Extend RPC proxy tests
|
||||
build: Remove -DBOOST_SPIRIT_THREADSAFE
|
||||
tests: Fix bitcoin-tx signing testcase
|
||||
|
||||
dexX7 (1):
|
||||
Return all available information via validateaddress
|
||||
|
||||
mruddy (1):
|
||||
add tests for the decodescript rpc. add mention of the rpc regression tests to the testing seciton of the main readme.
|
||||
|
||||
nomnombtc (9):
|
||||
add script to generate manpages with help2man
|
||||
add gen-manpages.sh description to README.md
|
||||
add autogenerated manpages by help2man
|
||||
add doc/man/Makefile.am to include manpages
|
||||
add doc/man to subdir if configure flag --enable-man is set
|
||||
add conditional for --enable-man, default is yes
|
||||
change help string --enable-man to --disable-man
|
||||
regenerated all manpages with commit tag stripped, also add bitcoin-tx
|
||||
improved gen-manpages.sh, includes bitcoin-tx and strips commit tag, now also runs binaries from build dir by default, added variables for more control
|
||||
|
||||
zathras-crypto (1):
|
||||
Exempt unspendable transaction outputs from dust checks
|
||||
|
|
@ -0,0 +1,170 @@
|
|||
Adam Brown (1):
|
||||
[doc] Update port in tor.md
|
||||
|
||||
Bob McElrath (1):
|
||||
Add explicit shared_ptr constructor due to C++11 error
|
||||
|
||||
Cory Fields (2):
|
||||
libevent: add depends
|
||||
libevent: Windows reuseaddr workaround in depends
|
||||
|
||||
Daira Hopwood (15):
|
||||
Remove src/qt.
|
||||
License updates for removal of src/qt.
|
||||
Correct license text for LGPL.
|
||||
Remove QT gunk from Makefiles.
|
||||
Remove some more QT-related stragglers.
|
||||
Update documentation for QT removal.
|
||||
Update which libraries are allowed to be linked to zcashd by symbol-check.py.
|
||||
Remove NO_QT make option.
|
||||
.gitignore cache/ and venv-mnf/
|
||||
Remove unused packages and patches.
|
||||
Delete -rootcertificates from bash completion script.
|
||||
Line-wrap privacy notice. Use <> around URL and end sentence with '.'. Include privacy notice in help text for zcashd -help.
|
||||
Update version numbers.
|
||||
Improvement to release process doc.
|
||||
Generate man pages.
|
||||
|
||||
Daniel Cousens (1):
|
||||
torcontrol: only output disconnect if -debug=tor
|
||||
|
||||
Gregory Maxwell (3):
|
||||
Avoid a compile error on hosts with libevent too old for EVENT_LOG_WARN.
|
||||
Do not absolutely protect local peers from eviction.
|
||||
Decide eviction group ties based on time.
|
||||
|
||||
Ian Kelling (1):
|
||||
Docs: add details to -rpcclienttimeout doc
|
||||
|
||||
Jack Gavigan (2):
|
||||
Removed markdown from COPYING
|
||||
Updated the Bitcoin Core copyright statement
|
||||
|
||||
Jack Grigg (25):
|
||||
Add anchor to output of getblock
|
||||
Migrate IncrementalMerkleTree memory usage calls
|
||||
Add tests for getmempoolinfo
|
||||
Usability improvements for z_importkey
|
||||
Implement an AtomicTimer
|
||||
Use AtomicTimer for more accurate local solution rate
|
||||
Metrics: Move local solution rate into stats
|
||||
Metrics: Improve mining status
|
||||
Expand on reasons for mining being paused
|
||||
Simplify z_importkey by making rescan a string
|
||||
Revert "Closes #1680, temporary fix for rpc deadlock inherited from upstream."
|
||||
Add libevent to zcash-gtest
|
||||
[depends] libevent 2.1.8
|
||||
Test boolean fallback in z_importkey
|
||||
Require that z_importkey height parameter be in valid range
|
||||
Update LocalSolPS test
|
||||
Add AtomicTimer tests
|
||||
Revert "Revert "rpc-tests: re-enable rpc-tests for Windows""
|
||||
Wrap error string
|
||||
Fix typo
|
||||
torcontrol: Improve comments
|
||||
torcontrol: Add unit tests for Tor reply parsers
|
||||
torcontrol: Fix ParseTorReplyMapping
|
||||
torcontrol: Check for reading errors in ReadBinaryFile
|
||||
torcontrol: Log invalid parameters in Tor reply strings where meaningful
|
||||
|
||||
Jay Graber (5):
|
||||
Document returned results of submitblock
|
||||
Edit release-process.md for clarity
|
||||
Add security warning to zcash-cli --help and --version message output
|
||||
Add security warning to zcashd metrics display
|
||||
Add security message to license text, rm url from translation string
|
||||
|
||||
Jonas Schnelli (1):
|
||||
Fix torcontrol.cpp unused private field warning
|
||||
|
||||
Karl-Johan Alm (4):
|
||||
Added std::unique_ptr<> wrappers with deleters for libevent modules.
|
||||
Switched bitcoin-cli.cpp to use RAII unique pointers with deleters.
|
||||
Added some simple tests for the RAII-style events.
|
||||
Added EVENT_CFLAGS to test makefile to explicitly include libevent headers.
|
||||
|
||||
Luke Dashjr (1):
|
||||
Skip RAII event tests if libevent is built without event_set_mem_functions
|
||||
|
||||
MarcoFalke (2):
|
||||
[doc] [tor] Clarify when to use bind
|
||||
torcontrol debug: Change to a blanket message that covers both cases
|
||||
|
||||
Matt Quinn (1):
|
||||
Consolidate individual references to the current maximum peer connection value of 125 into a single constant declaration.
|
||||
|
||||
Nathaniel Mahieu (1):
|
||||
Clarify documentation for running a tor node
|
||||
|
||||
Patrick Strateman (1):
|
||||
Remove vfReachable and modify IsReachable to only use vfLimited.
|
||||
|
||||
Pavel Janík (3):
|
||||
Implement REST mempool API, add test and documentation.
|
||||
Prevent -Wshadow warnings with gcc versions 4.8.5, 5.3.1 and 6.2.1.
|
||||
Make some global variables less-global (static)
|
||||
|
||||
Peter Todd (2):
|
||||
Better error message if Tor version too old
|
||||
Connect to Tor hidden services by default
|
||||
|
||||
Pieter Wuille (3):
|
||||
Implement accurate memory accounting for mempool
|
||||
Separate core memory usage computation in core_memusage.h
|
||||
Fix interrupted HTTP RPC connection workaround for Python 3.5+
|
||||
|
||||
Sean Bowe (2):
|
||||
Introduce librustzcash and Rust to depends system.
|
||||
Allow Rust-language related assets to be disabled with `--disable-rust`.
|
||||
|
||||
Simon Liu (4):
|
||||
Remove stale Qt comments and dead code
|
||||
Remove QT translation support files
|
||||
Remove redundant gui options from build scripts
|
||||
Closes #2186. RPC getblock now accepts height or hash.
|
||||
|
||||
Wladimir J. van der Laan (28):
|
||||
doc: remove documentation for rpcssl
|
||||
qa: Remove -rpckeepalive tests from httpbasics
|
||||
Remove rpc_boostasiotocnetaddr test
|
||||
build: build-system changes for libevent
|
||||
tests: GET requests cannot have request body, use POST in rest.py
|
||||
evhttpd implementation
|
||||
Implement RPCTimerHandler for Qt RPC console
|
||||
Document options for new HTTP/RPC server in --help
|
||||
Fix race condition between starting HTTP server thread and setting EventBase()
|
||||
Move windows socket init to utility function
|
||||
Revert "rpc-tests: re-enable rpc-tests for Windows"
|
||||
init: Ignore SIGPIPE
|
||||
http: Disable libevent debug logging, if not explicitly enabled
|
||||
rpc: Split option -rpctimeout into -rpcservertimeout and -rpcclienttimeout
|
||||
Make RPC tests cope with server-side timeout between requests
|
||||
chain: define enum used as bit field as uint32_t
|
||||
auto_ptr → unique_ptr
|
||||
bitcoin-cli: More detailed error reporting
|
||||
depends: Add libevent compatibility patch for windows
|
||||
bitcoin-cli: Make error message less confusing
|
||||
test: Avoid ConnectionResetErrors during RPC tests
|
||||
net: Automatically create hidden service, listen on Tor
|
||||
torcontrol improvements and fixes
|
||||
doc: update docs for Tor listening
|
||||
tests: Disable Tor interaction
|
||||
Fix memleak in TorController [rework]
|
||||
tor: Change auth order to only use HASHEDPASSWORD if -torpassword
|
||||
torcontrol: Explicitly request RSA1024 private key
|
||||
|
||||
calebogden (1):
|
||||
Fixing typos on security-check.py and torcontrol.cpp
|
||||
|
||||
fanquake (1):
|
||||
[depends] libevent 2.1.7rc
|
||||
|
||||
instagibbs (1):
|
||||
Add common failure cases for rpc server connection failure
|
||||
|
||||
paveljanik (1):
|
||||
[TRIVIAL] Fix typo: exactmath -> exactmatch
|
||||
|
||||
unsystemizer (1):
|
||||
Clarify `listenonion`
|
||||
|
|
@ -4,7 +4,7 @@ Meta: There should always be a single release engineer to disambiguate responsib
|
|||
|
||||
## Pre-release
|
||||
|
||||
Check all of the following:
|
||||
The following should have been checked well in advance of the release:
|
||||
|
||||
- All dependencies have been updated as appropriate:
|
||||
- BDB
|
||||
|
@ -16,6 +16,9 @@ Check all of the following:
|
|||
- miniupnpc
|
||||
- OpenSSL
|
||||
|
||||
|
||||
## Release process
|
||||
|
||||
## A. Define the release version as:
|
||||
|
||||
$ ZCASH_RELEASE=MAJOR.MINOR.REVISION(-BUILD_STRING)
|
||||
|
@ -30,19 +33,16 @@ previous release:
|
|||
$ ZCASH_RELEASE_PREV=1.0.0-beta1
|
||||
|
||||
## B. Create a new release branch / github PR
|
||||
### B1. Update (commit) version in sources
|
||||
|
||||
### B1. Check that you are up-to-date with current master, then create a release branch.
|
||||
|
||||
### B2. Update (commit) version in sources.
|
||||
|
||||
README.md
|
||||
src/clientversion.h
|
||||
configure.ac
|
||||
contrib/gitian-descriptors/gitian-linux.yml
|
||||
|
||||
Build and commit to update versions, and then perform the following commands:
|
||||
|
||||
help2man -n "RPC client for the Zcash daemon" src/zcash-cli > contrib/DEBIAN/manpages/zcash-cli.1
|
||||
help2man -n "Network daemon for interacting with the Zcash blockchain" src/zcashd > contrib/DEBIAN/manpages/zcashd.1
|
||||
|
||||
|
||||
In `configure.ac` and `clientversion.h`:
|
||||
|
||||
- Increment `CLIENT_VERSION_BUILD` according to the following schema:
|
||||
|
@ -59,29 +59,43 @@ In `configure.ac` and `clientversion.h`:
|
|||
If this release changes the behavior of the protocol or fixes a serious bug, we may
|
||||
also wish to change the `PROTOCOL_VERSION` in `version.h`.
|
||||
|
||||
### B2. Write release notes
|
||||
Commit these changes. (Be sure to do this before building, or else the built binary will include the flag `-dirty`)
|
||||
|
||||
Build by running `./zcutil/build.sh`.
|
||||
|
||||
Then perform the following command:
|
||||
|
||||
$ bash contrib/devtools/gen-manpages.sh
|
||||
|
||||
Commit the changes.
|
||||
|
||||
### B3. Generate release notes
|
||||
|
||||
Run the release-notes.py script to generate release notes and update authors.md file. For example:
|
||||
|
||||
$ python zcutil/release-notes.py --version $ZCASH_RELEASE
|
||||
|
||||
Add the newly created release notes to the Git repository:
|
||||
|
||||
$ git add doc/release-notes/release-notes-$ZCASH_RELEASE.md
|
||||
|
||||
Update the Debian package changelog:
|
||||
|
||||
export DEBVERSION="${ZCASH_RELEASE}"
|
||||
export DEBEMAIL="${DEBEMAIL:-team@z.cash}"
|
||||
export DEBFULLNAME="${DEBFULLNAME:-Zcash Company}"
|
||||
|
||||
dch -v $DEBVERSION -D jessie -c contrib/DEBIAN/changelog
|
||||
dch -v $DEBVERSION -D jessie -c contrib/debian/changelog
|
||||
|
||||
(`dch` comes from the devscripts package.)
|
||||
|
||||
### B3. Change the network magics
|
||||
### B4. Change the network magics
|
||||
|
||||
If this release breaks backwards compatibility, change the network magic
|
||||
numbers. Set the four `pchMessageStart` in `CTestNetParams` in `chainparams.cpp`
|
||||
to random values.
|
||||
|
||||
### B4. Merge the previous changes
|
||||
### B5. Merge the previous changes
|
||||
|
||||
Do the normal pull-request, review, testing process for this release PR.
|
||||
|
||||
|
@ -97,8 +111,11 @@ Run `./fetch-params.sh`.
|
|||
|
||||
## D. Make tag for the newly merged result
|
||||
|
||||
In this example, we ensure master is up to date with the
|
||||
previous merged PR, then:
|
||||
Checkout master and pull the latest version to ensure master is up to date with the release PR which was merged in before.
|
||||
|
||||
Check the last commit on the local and remote versions of master to make sure they are the same.
|
||||
|
||||
Then create the git tag:
|
||||
|
||||
$ git tag -s v${ZCASH_RELEASE}
|
||||
$ git push origin v${ZCASH_RELEASE}
|
||||
|
|
45
doc/tor.md
45
doc/tor.md
|
@ -5,7 +5,7 @@ TOR SUPPORT IN ZCASH
|
|||
|
||||
It is possible to run Zcash as a Tor hidden service, and connect to such services.
|
||||
|
||||
The following directions assume you have a Tor proxy running on port 9050. Many distributions default to having a SOCKS proxy listening on port 9050, but others may not. In particular, the Tor Browser Bundle defaults to listening on a random port. See [Tor Project FAQ:TBBSocksPort](https://www.torproject.org/docs/faq.html.en#TBBSocksPort) for how to properly
|
||||
The following directions assume you have a Tor proxy running on port 9050. Many distributions default to having a SOCKS proxy listening on port 9050, but others may not. In particular, the Tor Browser Bundle defaults to listening on port 9150. See [Tor Project FAQ:TBBSocksPort](https://www.torproject.org/docs/faq.html.en#TBBSocksPort) for how to properly
|
||||
configure Tor.
|
||||
|
||||
|
||||
|
@ -72,9 +72,14 @@ In a typical situation, where you're only reachable via Tor, this should suffice
|
|||
|
||||
./zcashd -proxy=127.0.0.1:9050 -externalip=zctestseie6wxgio.onion -listen
|
||||
|
||||
(obviously, replace the Onion address with your own). If you don't care too much
|
||||
about hiding your node, and want to be reachable on IPv4 as well, additionally
|
||||
specify:
|
||||
(obviously, replace the Onion address with your own). It should be noted that you still
|
||||
listen on all devices and another node could establish a clearnet connection, when knowing
|
||||
your address. To mitigate this, additionally bind the address of your Tor proxy:
|
||||
|
||||
./bitcoind ... -bind=127.0.0.1
|
||||
|
||||
If you don't care too much about hiding your node, and want to be reachable on IPv4
|
||||
as well, use `discover` instead:
|
||||
|
||||
./zcashd ... -discover
|
||||
|
||||
|
@ -86,7 +91,37 @@ for normal IPv4/IPv6 communication, use:
|
|||
./zcashd -onion=127.0.0.1:9050 -externalip=zctestseie6wxgio.onion -discover
|
||||
|
||||
|
||||
3. Connect to a Zcash hidden server
|
||||
3. Automatically listen on Tor
|
||||
--------------------------------
|
||||
|
||||
Starting with Tor version 0.2.7.1 it is possible, through Tor's control socket
|
||||
API, to create and destroy 'ephemeral' hidden services programmatically.
|
||||
Zcash has been updated to make use of this.
|
||||
|
||||
This means that if Tor is running (and proper authentication has been configured),
|
||||
Zcash automatically creates a hidden service to listen on. Zcash will also use Tor
|
||||
automatically to connect to other .onion nodes if the control socket can be
|
||||
successfully opened. This will positively affect the number of available .onion
|
||||
nodes and their usage.
|
||||
|
||||
This new feature is enabled by default if Zcash is listening (`-listen`), and
|
||||
requires a Tor connection to work. It can be explicitly disabled with `-listenonion=0`
|
||||
and, if not disabled, configured using the `-torcontrol` and `-torpassword` settings.
|
||||
To show verbose debugging information, pass `-debug=tor`.
|
||||
|
||||
Connecting to Tor's control socket API requires one of two authentication methods to be
|
||||
configured. For cookie authentication the user running zcashd must have write access
|
||||
to the `CookieAuthFile` specified in Tor configuration. In some cases this is
|
||||
preconfigured and the creation of a hidden service is automatic. If permission problems
|
||||
are seen with `-debug=tor` they can be resolved by adding both the user running tor and
|
||||
the user running zcashd to the same group and setting permissions appropriately. On
|
||||
Debian-based systems the user running zcashd can be added to the debian-tor group,
|
||||
which has the appropriate permissions. An alternative authentication method is the use
|
||||
of the `-torpassword` flag and a `hash-password` which can be enabled and specified in
|
||||
Tor configuration.
|
||||
|
||||
|
||||
4. Connect to a Zcash hidden server
|
||||
-----------------------------------
|
||||
|
||||
To test your set-up, you might want to try connecting via Tor on a different computer to just a
|
||||
|
|
|
@ -1,114 +0,0 @@
|
|||
*** Warning: This document has not been updated for Zcash and may be inaccurate. ***
|
||||
|
||||
|
||||
Translations
|
||||
============
|
||||
|
||||
The Bitcoin-Core project has been designed to support multiple localisations. This makes adding new phrases, and completely new languages easily achievable. For managing all application translations, Bitcoin-Core makes use of the Transifex online translation management tool.
|
||||
|
||||
### Helping to translate (using Transifex)
|
||||
Transifex is setup to monitor the Github repo for updates, and when code containing new translations is found, Transifex will process any changes. It may take several hours after a pull-request has been merged, to appear in the Transifex web interface.
|
||||
|
||||
Multiple language support is critical in assisting Bitcoin’s global adoption, and growth. One of Bitcoin’s greatest strengths is cross-boarder money transfers, any help making that easier is greatly appreciated.
|
||||
|
||||
See the [Transifex Bitcoin project](https://www.transifex.com/projects/p/bitcoin/) to assist in translations. You should also join the translation mailing list for announcements - see details below.
|
||||
|
||||
### Writing code with translations
|
||||
We use automated scripts to help extract translations in both Qt, and non-Qt source files. It is rarely necessary to manually edit the files in `src/qt/locale/`. The translation source files must adhere to the following format:
|
||||
`bitcoin_xx_YY.ts or bitcoin_xx.ts`
|
||||
|
||||
`src/qt/locale/bitcoin_en.ts` is treated in a special way. It is used as the source for all other translations. Whenever a string in the source code is changed, this file must be updated to reflect those changes. A custom script is used to extract strings from the non-Qt parts. This script makes use of `gettext`, so make sure that utility is installed (ie, `apt-get install gettext` on Ubuntu/Debian). Once this has been updated, `lupdate` (included in the Qt SDK) is used to update `bitcoin_en.ts`.
|
||||
|
||||
To automatically regenerate the `bitcoin_en.ts` file, run the following commands:
|
||||
```sh
|
||||
cd src/
|
||||
make translate
|
||||
```
|
||||
|
||||
`contrib/bitcoin-qt.pro` takes care of generating `.qm` (binary compiled) files from `.ts` (source files) files. It’s mostly automated, and you shouldn’t need to worry about it.
|
||||
|
||||
**Example Qt translation**
|
||||
```cpp
|
||||
QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
|
||||
```
|
||||
|
||||
### Creating a pull-request
|
||||
For general PRs, you shouldn’t include any updates to the translation source files. They will be updated periodically, primarily around pre-releases, allowing time for any new phrases to be translated before public releases. This is also important in avoiding translation related merge conflicts.
|
||||
|
||||
When an updated source file is merged into the Github repo, Transifex will automatically detect it (although it can take several hours). Once processed, the new strings will show up as "Remaining" in the Transifex web interface and are ready for translators.
|
||||
|
||||
To create the pull-request, use the following commands:
|
||||
```
|
||||
git add src/qt/bitcoinstrings.cpp src/qt/locale/bitcoin_en.ts
|
||||
git commit
|
||||
```
|
||||
|
||||
### Creating a Transifex account
|
||||
Visit the [Transifex Signup](https://www.transifex.com/signup/) page to create an account. Take note of your username and password, as they will be required to configure the command-line tool.
|
||||
|
||||
You can find the Bitcoin translation project at [https://www.transifex.com/projects/p/bitcoin/](https://www.transifex.com/projects/p/bitcoin/).
|
||||
|
||||
### Installing the Transifex client command-line tool
|
||||
The client it used to fetch updated translations. If you are having problems, or need more details, see [http://docs.transifex.com/developer/client/setup](http://docs.transifex.com/developer/client/setup)
|
||||
|
||||
**For Linux and Mac**
|
||||
|
||||
`pip install transifex-client`
|
||||
|
||||
Setup your transifex client config as follows. Please *ignore the token field*.
|
||||
|
||||
```ini
|
||||
nano ~/.transifexrc
|
||||
|
||||
[https://www.transifex.com]
|
||||
hostname = https://www.transifex.com
|
||||
password = PASSWORD
|
||||
token =
|
||||
username = USERNAME
|
||||
```
|
||||
|
||||
**For Windows**
|
||||
|
||||
Please see [http://docs.transifex.com/developer/client/setup#windows](http://docs.transifex.com/developer/client/setup#windows) for details on installation.
|
||||
|
||||
The Transifex Bitcoin project config file is included as part of the repo. It can be found at `.tx/config`, however you shouldn’t need change anything.
|
||||
|
||||
### Synchronising translations
|
||||
To assist in updating translations, we have created a script to help.
|
||||
|
||||
1. `python contrib/devtools/update-translations.py`
|
||||
2. Update `src/qt/bitcoin.qrc` manually or via
|
||||
`ls src/qt/locale/*ts|xargs -n1 basename|sed 's/\(bitcoin_\(.*\)\).ts/<file alias="\2">locale\/\1.qm<\/file>/'`
|
||||
3. Update `src/qt/Makefile.am` manually or via
|
||||
`ls src/qt/locale/*ts|xargs -n1 basename|sed 's/\(bitcoin_\(.*\)\).ts/ locale\/\1.ts \\/'`
|
||||
4. `git add` new translations from `src/qt/locale/`
|
||||
|
||||
**Do not directly download translations** one by one from the Transifex website, as we do a few post-processing steps before committing the translations.
|
||||
|
||||
### Handling Plurals (in source files)
|
||||
When new plurals are added to the source file, it's important to do the following steps:
|
||||
|
||||
1. Open `bitcoin_en.ts` in Qt Linguist (included in the Qt SDK)
|
||||
2. Search for `%n`, which will take you to the parts in the translation that use plurals
|
||||
3. Look for empty `English Translation (Singular)` and `English Translation (Plural)` fields
|
||||
4. Add the appropriate strings for the singular and plural form of the base string
|
||||
5. Mark the item as done (via the green arrow symbol in the toolbar)
|
||||
6. Repeat from step 2, until all singular and plural forms are in the source file
|
||||
7. Save the source file
|
||||
|
||||
### Translating a new language
|
||||
To create a new language template, you will need to edit the languages manifest file `src/qt/bitcoin.qrc` and add a new entry. Below is an example of the english language entry.
|
||||
|
||||
```xml
|
||||
<qresource prefix="/translations">
|
||||
<file alias="en">locale/bitcoin_en.qm</file>
|
||||
...
|
||||
</qresource>
|
||||
```
|
||||
|
||||
**Note:** that the language translation file **must end in `.qm`** (the compiled extension), and not `.ts`.
|
||||
|
||||
### Questions and general assistance
|
||||
The Bitcoin-Core translation maintainers include *tcatm, seone, Diapolo, wumpus and luke-jr*.You can find them, and others, in the Freenode IRC chatroom - `irc.freenode.net #bitcoin-dev`.
|
||||
|
||||
If you are a translator, you should also subscribe to the mailing list, https://groups.google.com/forum/#!forum/bitcoin-translators. Announcements will be posted during application pre-releases to notify translators to check for updates.
|
|
@ -10,8 +10,6 @@ How to translate?
|
|||
|
||||
To mark a message as translatable
|
||||
|
||||
- In GUI source code (under `src/qt`): use `tr("...")`
|
||||
|
||||
- In non-GUI source code (under `src`): use `_("...")`
|
||||
|
||||
No internationalization is used for e.g. developer scripts outside `src`.
|
||||
|
|
|
@ -11,6 +11,7 @@ export BITCOIND=${REAL_BITCOIND}
|
|||
#Run the tests
|
||||
|
||||
testScripts=(
|
||||
'prioritisetransaction.py'
|
||||
'wallet_treestate.py'
|
||||
'wallet_protectcoinbase.py'
|
||||
'wallet.py'
|
||||
|
@ -29,8 +30,13 @@ testScripts=(
|
|||
'zapwallettxes.py'
|
||||
'proxy_test.py'
|
||||
'merkle_blocks.py'
|
||||
'fundrawtransaction.py'
|
||||
'signrawtransactions.py'
|
||||
'walletbackup.py'
|
||||
'nodehandling.py'
|
||||
'reindex.py'
|
||||
'decodescript.py'
|
||||
'disablewallet.py'
|
||||
'zcjoinsplit.py'
|
||||
'zcjoinsplitdoublespend.py'
|
||||
'getblocktemplate.py'
|
||||
|
@ -46,13 +52,11 @@ testScriptsExt=(
|
|||
'invalidateblock.py'
|
||||
'keypool.py'
|
||||
'receivedby.py'
|
||||
'reindex.py'
|
||||
'rpcbind_test.py'
|
||||
# 'script_test.py'
|
||||
'smartfees.py'
|
||||
'maxblocksinflight.py'
|
||||
'invalidblockrequest.py'
|
||||
'rawtransactions.py'
|
||||
# 'forknotify.py'
|
||||
'p2p-acceptblock.py'
|
||||
);
|
||||
|
|
|
@ -21,7 +21,7 @@ Run all possible tests with `qa/pull-tester/rpc-tests.sh -extended`.
|
|||
|
||||
Possible options:
|
||||
|
||||
````
|
||||
```
|
||||
-h, --help show this help message and exit
|
||||
--nocleanup Leave bitcoinds and test.* datadir on exit or error
|
||||
--noshutdown Don't stop bitcoinds after the test execution
|
||||
|
|
|
@ -0,0 +1,116 @@
|
|||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2015 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import *
|
||||
|
||||
class DecodeScriptTest(BitcoinTestFramework):
|
||||
"""Tests decoding scripts via RPC command "decodescript"."""
|
||||
|
||||
def setup_chain(self):
|
||||
print('Initializing test directory ' + self.options.tmpdir)
|
||||
initialize_chain_clean(self.options.tmpdir, 1)
|
||||
|
||||
def setup_network(self, split=False):
|
||||
self.nodes = start_nodes(1, self.options.tmpdir)
|
||||
self.is_network_split = False
|
||||
|
||||
def decodescript_script_sig(self):
|
||||
signature = '304502207fa7a6d1e0ee81132a269ad84e68d695483745cde8b541e3bf630749894e342a022100c1f7ab20e13e22fb95281a870f3dcf38d782e53023ee313d741ad0cfbc0c509001'
|
||||
push_signature = '48' + signature
|
||||
public_key = '03b0da749730dc9b4b1f4a14d6902877a92541f5368778853d9c4a0cb7802dcfb2'
|
||||
push_public_key = '21' + public_key
|
||||
|
||||
# below are test cases for all of the standard transaction types
|
||||
|
||||
# 1) P2PK scriptSig
|
||||
# the scriptSig of a public key scriptPubKey simply pushes a signature onto the stack
|
||||
rpc_result = self.nodes[0].decodescript(push_signature)
|
||||
assert_equal(signature, rpc_result['asm'])
|
||||
|
||||
# 2) P2PKH scriptSig
|
||||
rpc_result = self.nodes[0].decodescript(push_signature + push_public_key)
|
||||
assert_equal(signature + ' ' + public_key, rpc_result['asm'])
|
||||
|
||||
# 3) multisig scriptSig
|
||||
# this also tests the leading portion of a P2SH multisig scriptSig
|
||||
# OP_0 <A sig> <B sig>
|
||||
rpc_result = self.nodes[0].decodescript('00' + push_signature + push_signature)
|
||||
assert_equal('0 ' + signature + ' ' + signature, rpc_result['asm'])
|
||||
|
||||
# 4) P2SH scriptSig
|
||||
# an empty P2SH redeemScript is valid and makes for a very simple test case.
|
||||
# thus, such a spending scriptSig would just need to pass the outer redeemScript
|
||||
# hash test and leave true on the top of the stack.
|
||||
rpc_result = self.nodes[0].decodescript('5100')
|
||||
assert_equal('1 0', rpc_result['asm'])
|
||||
|
||||
# 5) null data scriptSig - no such thing because null data scripts can not be spent.
|
||||
# thus, no test case for that standard transaction type is here.
|
||||
|
||||
def decodescript_script_pub_key(self):
|
||||
public_key = '03b0da749730dc9b4b1f4a14d6902877a92541f5368778853d9c4a0cb7802dcfb2'
|
||||
push_public_key = '21' + public_key
|
||||
public_key_hash = '11695b6cd891484c2d49ec5aa738ec2b2f897777'
|
||||
push_public_key_hash = '14' + public_key_hash
|
||||
|
||||
# below are test cases for all of the standard transaction types
|
||||
|
||||
# 1) P2PK scriptPubKey
|
||||
# <pubkey> OP_CHECKSIG
|
||||
rpc_result = self.nodes[0].decodescript(push_public_key + 'ac')
|
||||
assert_equal(public_key + ' OP_CHECKSIG', rpc_result['asm'])
|
||||
|
||||
# 2) P2PKH scriptPubKey
|
||||
# OP_DUP OP_HASH160 <PubKeyHash> OP_EQUALVERIFY OP_CHECKSIG
|
||||
rpc_result = self.nodes[0].decodescript('76a9' + push_public_key_hash + '88ac')
|
||||
assert_equal('OP_DUP OP_HASH160 ' + public_key_hash + ' OP_EQUALVERIFY OP_CHECKSIG', rpc_result['asm'])
|
||||
|
||||
# 3) multisig scriptPubKey
|
||||
# <m> <A pubkey> <B pubkey> <C pubkey> <n> OP_CHECKMULTISIG
|
||||
# just imagine that the pub keys used below are different.
|
||||
# for our purposes here it does not matter that they are the same even though it is unrealistic.
|
||||
rpc_result = self.nodes[0].decodescript('52' + push_public_key + push_public_key + push_public_key + '53ae')
|
||||
assert_equal('2 ' + public_key + ' ' + public_key + ' ' + public_key + ' 3 OP_CHECKMULTISIG', rpc_result['asm'])
|
||||
|
||||
# 4) P2SH scriptPubKey
|
||||
# OP_HASH160 <Hash160(redeemScript)> OP_EQUAL.
|
||||
# push_public_key_hash here should actually be the hash of a redeem script.
|
||||
# but this works the same for purposes of this test.
|
||||
rpc_result = self.nodes[0].decodescript('a9' + push_public_key_hash + '87')
|
||||
assert_equal('OP_HASH160 ' + public_key_hash + ' OP_EQUAL', rpc_result['asm'])
|
||||
|
||||
# 5) null data scriptPubKey
|
||||
# use a signature look-alike here to make sure that we do not decode random data as a signature.
|
||||
# this matters if/when signature sighash decoding comes along.
|
||||
# would want to make sure that no such decoding takes place in this case.
|
||||
signature_imposter = '48304502207fa7a6d1e0ee81132a269ad84e68d695483745cde8b541e3bf630749894e342a022100c1f7ab20e13e22fb95281a870f3dcf38d782e53023ee313d741ad0cfbc0c509001'
|
||||
# OP_RETURN <data>
|
||||
rpc_result = self.nodes[0].decodescript('6a' + signature_imposter)
|
||||
assert_equal('OP_RETURN ' + signature_imposter[2:], rpc_result['asm'])
|
||||
|
||||
# 6) a CLTV redeem script. redeem scripts are in-effect scriptPubKey scripts, so adding a test here.
|
||||
# OP_NOP2 is also known as OP_CHECKLOCKTIMEVERIFY.
|
||||
# just imagine that the pub keys used below are different.
|
||||
# for our purposes here it does not matter that they are the same even though it is unrealistic.
|
||||
#
|
||||
# OP_IF
|
||||
# <receiver-pubkey> OP_CHECKSIGVERIFY
|
||||
# OP_ELSE
|
||||
# <lock-until> OP_NOP2 OP_DROP
|
||||
# OP_ENDIF
|
||||
# <sender-pubkey> OP_CHECKSIG
|
||||
#
|
||||
# lock until block 500,000
|
||||
rpc_result = self.nodes[0].decodescript('63' + push_public_key + 'ad670320a107b17568' + push_public_key + 'ac')
|
||||
assert_equal('OP_IF ' + public_key + ' OP_CHECKSIGVERIFY OP_ELSE 500000 OP_NOP2 OP_DROP OP_ENDIF ' + public_key + ' OP_CHECKSIG', rpc_result['asm'])
|
||||
|
||||
def run_test(self):
|
||||
self.decodescript_script_sig()
|
||||
self.decodescript_script_pub_key()
|
||||
|
||||
if __name__ == '__main__':
|
||||
DecodeScriptTest().main()
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2014 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#
|
||||
# Exercise API with -disablewallet.
|
||||
#
|
||||
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import *
|
||||
|
||||
class DisableWalletTest (BitcoinTestFramework):
|
||||
|
||||
def setup_chain(self):
|
||||
print("Initializing test directory "+self.options.tmpdir)
|
||||
initialize_chain_clean(self.options.tmpdir, 1)
|
||||
|
||||
def setup_network(self, split=False):
|
||||
self.nodes = start_nodes(1, self.options.tmpdir, [['-disablewallet']])
|
||||
self.is_network_split = False
|
||||
self.sync_all()
|
||||
|
||||
def run_test (self):
|
||||
# Check regression: https://github.com/bitcoin/bitcoin/issues/6963#issuecomment-154548880
|
||||
x = self.nodes[0].validateaddress('t3b1jtLvxCstdo1pJs9Tjzc5dmWyvGQSZj8')
|
||||
assert(x['isvalid'] == False)
|
||||
x = self.nodes[0].validateaddress('tmGqwWtL7RsbxikDSN26gsbicxVr2xJNe86')
|
||||
assert(x['isvalid'] == True)
|
||||
|
||||
if __name__ == '__main__':
|
||||
DisableWalletTest ().main ()
|
|
@ -0,0 +1,546 @@
|
|||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2014 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import *
|
||||
from pprint import pprint
|
||||
from time import sleep
|
||||
|
||||
# Create one-input, one-output, no-fee transaction:
|
||||
class RawTransactionsTest(BitcoinTestFramework):
|
||||
|
||||
def setup_chain(self):
|
||||
print("Initializing test directory "+self.options.tmpdir)
|
||||
initialize_chain_clean(self.options.tmpdir, 3)
|
||||
|
||||
def setup_network(self, split=False):
|
||||
self.nodes = start_nodes(3, self.options.tmpdir,
|
||||
extra_args=[['-experimentalfeatures', '-developerencryptwallet']] * 4)
|
||||
|
||||
connect_nodes_bi(self.nodes,0,1)
|
||||
connect_nodes_bi(self.nodes,1,2)
|
||||
connect_nodes_bi(self.nodes,0,2)
|
||||
|
||||
self.is_network_split=False
|
||||
self.sync_all()
|
||||
|
||||
def run_test(self):
|
||||
print "Mining blocks..."
|
||||
feeTolerance = Decimal(0.00000002) #if the fee's positive delta is higher than this value tests will fail, neg. delta always fail the tests
|
||||
|
||||
self.nodes[2].generate(1)
|
||||
self.sync_all()
|
||||
self.nodes[0].generate(101)
|
||||
self.sync_all()
|
||||
self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(),1.5);
|
||||
self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(),1.0);
|
||||
self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(),5.0);
|
||||
self.sync_all()
|
||||
self.nodes[0].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
###############
|
||||
# simple test #
|
||||
###############
|
||||
inputs = [ ]
|
||||
outputs = { self.nodes[0].getnewaddress() : 1.0 }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
|
||||
fee = rawtxfund['fee']
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
|
||||
assert_equal(len(dec_tx['vin']) > 0, True) #test if we have enought inputs
|
||||
|
||||
##############################
|
||||
# simple test with two coins #
|
||||
##############################
|
||||
inputs = [ ]
|
||||
outputs = { self.nodes[0].getnewaddress() : 2.2 }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
|
||||
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
|
||||
fee = rawtxfund['fee']
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
|
||||
assert_equal(len(dec_tx['vin']) > 0, True) #test if we have enough inputs
|
||||
|
||||
##############################
|
||||
# simple test with two coins #
|
||||
##############################
|
||||
inputs = [ ]
|
||||
outputs = { self.nodes[0].getnewaddress() : 2.6 }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
|
||||
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
|
||||
fee = rawtxfund['fee']
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
|
||||
assert_equal(len(dec_tx['vin']) > 0, True)
|
||||
assert_equal(dec_tx['vin'][0]['scriptSig']['hex'], '')
|
||||
|
||||
|
||||
################################
|
||||
# simple test with two outputs #
|
||||
################################
|
||||
inputs = [ ]
|
||||
outputs = { self.nodes[0].getnewaddress() : 2.6, self.nodes[1].getnewaddress() : 2.5 }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
|
||||
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
|
||||
fee = rawtxfund['fee']
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
|
||||
totalOut = 0
|
||||
for out in dec_tx['vout']:
|
||||
totalOut += out['value']
|
||||
|
||||
assert_equal(len(dec_tx['vin']) > 0, True)
|
||||
assert_equal(dec_tx['vin'][0]['scriptSig']['hex'], '')
|
||||
|
||||
|
||||
#########################################################################
|
||||
# test a fundrawtransaction with a VIN greater than the required amount #
|
||||
#########################################################################
|
||||
utx = False
|
||||
listunspent = self.nodes[2].listunspent()
|
||||
for aUtx in listunspent:
|
||||
if aUtx['amount'] == 5.0:
|
||||
utx = aUtx
|
||||
break;
|
||||
|
||||
assert_equal(utx!=False, True)
|
||||
|
||||
inputs = [ {'txid' : utx['txid'], 'vout' : utx['vout']}]
|
||||
outputs = { self.nodes[0].getnewaddress() : 1.0 }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
assert_equal(utx['txid'], dec_tx['vin'][0]['txid'])
|
||||
|
||||
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
|
||||
fee = rawtxfund['fee']
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
|
||||
totalOut = 0
|
||||
for out in dec_tx['vout']:
|
||||
totalOut += out['value']
|
||||
|
||||
assert_equal(fee + totalOut, utx['amount']) #compare vin total and totalout+fee
|
||||
|
||||
|
||||
|
||||
#####################################################################
|
||||
# test a fundrawtransaction with which will not get a change output #
|
||||
#####################################################################
|
||||
utx = False
|
||||
listunspent = self.nodes[2].listunspent()
|
||||
for aUtx in listunspent:
|
||||
if aUtx['amount'] == 5.0:
|
||||
utx = aUtx
|
||||
break;
|
||||
|
||||
assert_equal(utx!=False, True)
|
||||
|
||||
inputs = [ {'txid' : utx['txid'], 'vout' : utx['vout']}]
|
||||
outputs = { self.nodes[0].getnewaddress() : Decimal(5.0) - fee - feeTolerance }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
assert_equal(utx['txid'], dec_tx['vin'][0]['txid'])
|
||||
|
||||
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
|
||||
fee = rawtxfund['fee']
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
|
||||
totalOut = 0
|
||||
for out in dec_tx['vout']:
|
||||
totalOut += out['value']
|
||||
|
||||
assert_equal(rawtxfund['changepos'], -1)
|
||||
assert_equal(fee + totalOut, utx['amount']) #compare vin total and totalout+fee
|
||||
|
||||
|
||||
|
||||
#########################################################################
|
||||
# test a fundrawtransaction with a VIN smaller than the required amount #
|
||||
#########################################################################
|
||||
utx = False
|
||||
listunspent = self.nodes[2].listunspent()
|
||||
for aUtx in listunspent:
|
||||
if aUtx['amount'] == 1.0:
|
||||
utx = aUtx
|
||||
break;
|
||||
|
||||
assert_equal(utx!=False, True)
|
||||
|
||||
inputs = [ {'txid' : utx['txid'], 'vout' : utx['vout']}]
|
||||
outputs = { self.nodes[0].getnewaddress() : 1.0 }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
|
||||
# 4-byte version + 1-byte vin count + 36-byte prevout then script_len
|
||||
rawtx = rawtx[:82] + "0100" + rawtx[84:]
|
||||
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
assert_equal(utx['txid'], dec_tx['vin'][0]['txid'])
|
||||
assert_equal("00", dec_tx['vin'][0]['scriptSig']['hex'])
|
||||
|
||||
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
|
||||
fee = rawtxfund['fee']
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
|
||||
totalOut = 0
|
||||
matchingOuts = 0
|
||||
for i, out in enumerate(dec_tx['vout']):
|
||||
totalOut += out['value']
|
||||
if outputs.has_key(out['scriptPubKey']['addresses'][0]):
|
||||
matchingOuts+=1
|
||||
else:
|
||||
assert_equal(i, rawtxfund['changepos'])
|
||||
|
||||
assert_equal(utx['txid'], dec_tx['vin'][0]['txid'])
|
||||
assert_equal("00", dec_tx['vin'][0]['scriptSig']['hex'])
|
||||
|
||||
assert_equal(matchingOuts, 1)
|
||||
assert_equal(len(dec_tx['vout']), 2)
|
||||
|
||||
|
||||
###########################################
|
||||
# test a fundrawtransaction with two VINs #
|
||||
###########################################
|
||||
utx = False
|
||||
utx2 = False
|
||||
listunspent = self.nodes[2].listunspent()
|
||||
for aUtx in listunspent:
|
||||
if aUtx['amount'] == 1.0:
|
||||
utx = aUtx
|
||||
if aUtx['amount'] == 5.0:
|
||||
utx2 = aUtx
|
||||
|
||||
|
||||
assert_equal(utx!=False, True)
|
||||
|
||||
inputs = [ {'txid' : utx['txid'], 'vout' : utx['vout']},{'txid' : utx2['txid'], 'vout' : utx2['vout']} ]
|
||||
outputs = { self.nodes[0].getnewaddress() : 6.0 }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
assert_equal(utx['txid'], dec_tx['vin'][0]['txid'])
|
||||
|
||||
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
|
||||
fee = rawtxfund['fee']
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
|
||||
totalOut = 0
|
||||
matchingOuts = 0
|
||||
for out in dec_tx['vout']:
|
||||
totalOut += out['value']
|
||||
if outputs.has_key(out['scriptPubKey']['addresses'][0]):
|
||||
matchingOuts+=1
|
||||
|
||||
assert_equal(matchingOuts, 1)
|
||||
assert_equal(len(dec_tx['vout']), 2)
|
||||
|
||||
matchingIns = 0
|
||||
for vinOut in dec_tx['vin']:
|
||||
for vinIn in inputs:
|
||||
if vinIn['txid'] == vinOut['txid']:
|
||||
matchingIns+=1
|
||||
|
||||
assert_equal(matchingIns, 2) #we now must see two vins identical to vins given as params
|
||||
|
||||
#########################################################
|
||||
# test a fundrawtransaction with two VINs and two vOUTs #
|
||||
#########################################################
|
||||
utx = False
|
||||
utx2 = False
|
||||
listunspent = self.nodes[2].listunspent()
|
||||
for aUtx in listunspent:
|
||||
if aUtx['amount'] == 1.0:
|
||||
utx = aUtx
|
||||
if aUtx['amount'] == 5.0:
|
||||
utx2 = aUtx
|
||||
|
||||
|
||||
assert_equal(utx!=False, True)
|
||||
|
||||
inputs = [ {'txid' : utx['txid'], 'vout' : utx['vout']},{'txid' : utx2['txid'], 'vout' : utx2['vout']} ]
|
||||
outputs = { self.nodes[0].getnewaddress() : 6.0, self.nodes[0].getnewaddress() : 1.0 }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
assert_equal(utx['txid'], dec_tx['vin'][0]['txid'])
|
||||
|
||||
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
|
||||
fee = rawtxfund['fee']
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
|
||||
totalOut = 0
|
||||
matchingOuts = 0
|
||||
for out in dec_tx['vout']:
|
||||
totalOut += out['value']
|
||||
if outputs.has_key(out['scriptPubKey']['addresses'][0]):
|
||||
matchingOuts+=1
|
||||
|
||||
assert_equal(matchingOuts, 2)
|
||||
assert_equal(len(dec_tx['vout']), 3)
|
||||
|
||||
##############################################
|
||||
# test a fundrawtransaction with invalid vin #
|
||||
##############################################
|
||||
listunspent = self.nodes[2].listunspent()
|
||||
inputs = [ {'txid' : "1c7f966dab21119bac53213a2bc7532bff1fa844c124fd750a7d0b1332440bd1", 'vout' : 0} ] #invalid vin!
|
||||
outputs = { self.nodes[0].getnewaddress() : 1.0}
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
|
||||
errorString = ""
|
||||
try:
|
||||
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
|
||||
except JSONRPCException,e:
|
||||
errorString = e.error['message']
|
||||
|
||||
assert_equal("Insufficient" in errorString, True);
|
||||
|
||||
|
||||
|
||||
############################################################
|
||||
#compare fee of a standard pubkeyhash transaction
|
||||
inputs = []
|
||||
outputs = {self.nodes[1].getnewaddress():1.1}
|
||||
rawTx = self.nodes[0].createrawtransaction(inputs, outputs)
|
||||
fundedTx = self.nodes[0].fundrawtransaction(rawTx)
|
||||
|
||||
#create same transaction over sendtoaddress
|
||||
txId = self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 1.1);
|
||||
signedFee = self.nodes[0].getrawmempool(True)[txId]['fee']
|
||||
|
||||
#compare fee
|
||||
feeDelta = Decimal(fundedTx['fee']) - Decimal(signedFee);
|
||||
assert(feeDelta >= 0 and feeDelta <= feeTolerance)
|
||||
############################################################
|
||||
|
||||
############################################################
|
||||
#compare fee of a standard pubkeyhash transaction with multiple outputs
|
||||
inputs = []
|
||||
outputs = {self.nodes[1].getnewaddress():1.1,self.nodes[1].getnewaddress():1.2,self.nodes[1].getnewaddress():0.1,self.nodes[1].getnewaddress():1.3,self.nodes[1].getnewaddress():0.2,self.nodes[1].getnewaddress():0.3}
|
||||
rawTx = self.nodes[0].createrawtransaction(inputs, outputs)
|
||||
fundedTx = self.nodes[0].fundrawtransaction(rawTx)
|
||||
#create same transaction over sendtoaddress
|
||||
txId = self.nodes[0].sendmany("", outputs);
|
||||
signedFee = self.nodes[0].getrawmempool(True)[txId]['fee']
|
||||
|
||||
#compare fee
|
||||
feeDelta = Decimal(fundedTx['fee']) - Decimal(signedFee);
|
||||
assert(feeDelta >= 0 and feeDelta <= feeTolerance)
|
||||
############################################################
|
||||
|
||||
|
||||
############################################################
|
||||
#compare fee of a 2of2 multisig p2sh transaction
|
||||
|
||||
# create 2of2 addr
|
||||
addr1 = self.nodes[1].getnewaddress()
|
||||
addr2 = self.nodes[1].getnewaddress()
|
||||
|
||||
addr1Obj = self.nodes[1].validateaddress(addr1)
|
||||
addr2Obj = self.nodes[1].validateaddress(addr2)
|
||||
|
||||
mSigObj = self.nodes[1].addmultisigaddress(2, [addr1Obj['pubkey'], addr2Obj['pubkey']])
|
||||
|
||||
inputs = []
|
||||
outputs = {mSigObj:1.1}
|
||||
rawTx = self.nodes[0].createrawtransaction(inputs, outputs)
|
||||
fundedTx = self.nodes[0].fundrawtransaction(rawTx)
|
||||
|
||||
#create same transaction over sendtoaddress
|
||||
txId = self.nodes[0].sendtoaddress(mSigObj, 1.1);
|
||||
signedFee = self.nodes[0].getrawmempool(True)[txId]['fee']
|
||||
|
||||
#compare fee
|
||||
feeDelta = Decimal(fundedTx['fee']) - Decimal(signedFee);
|
||||
assert(feeDelta >= 0 and feeDelta <= feeTolerance)
|
||||
############################################################
|
||||
|
||||
|
||||
############################################################
|
||||
#compare fee of a standard pubkeyhash transaction
|
||||
|
||||
# create 4of5 addr
|
||||
addr1 = self.nodes[1].getnewaddress()
|
||||
addr2 = self.nodes[1].getnewaddress()
|
||||
addr3 = self.nodes[1].getnewaddress()
|
||||
addr4 = self.nodes[1].getnewaddress()
|
||||
addr5 = self.nodes[1].getnewaddress()
|
||||
|
||||
addr1Obj = self.nodes[1].validateaddress(addr1)
|
||||
addr2Obj = self.nodes[1].validateaddress(addr2)
|
||||
addr3Obj = self.nodes[1].validateaddress(addr3)
|
||||
addr4Obj = self.nodes[1].validateaddress(addr4)
|
||||
addr5Obj = self.nodes[1].validateaddress(addr5)
|
||||
|
||||
mSigObj = self.nodes[1].addmultisigaddress(4, [addr1Obj['pubkey'], addr2Obj['pubkey'], addr3Obj['pubkey'], addr4Obj['pubkey'], addr5Obj['pubkey']])
|
||||
|
||||
inputs = []
|
||||
outputs = {mSigObj:1.1}
|
||||
rawTx = self.nodes[0].createrawtransaction(inputs, outputs)
|
||||
fundedTx = self.nodes[0].fundrawtransaction(rawTx)
|
||||
|
||||
#create same transaction over sendtoaddress
|
||||
txId = self.nodes[0].sendtoaddress(mSigObj, 1.1);
|
||||
signedFee = self.nodes[0].getrawmempool(True)[txId]['fee']
|
||||
|
||||
#compare fee
|
||||
feeDelta = Decimal(fundedTx['fee']) - Decimal(signedFee);
|
||||
assert(feeDelta >= 0 and feeDelta <= feeTolerance)
|
||||
############################################################
|
||||
|
||||
|
||||
############################################################
|
||||
# spend a 2of2 multisig transaction over fundraw
|
||||
|
||||
# create 2of2 addr
|
||||
addr1 = self.nodes[2].getnewaddress()
|
||||
addr2 = self.nodes[2].getnewaddress()
|
||||
|
||||
addr1Obj = self.nodes[2].validateaddress(addr1)
|
||||
addr2Obj = self.nodes[2].validateaddress(addr2)
|
||||
|
||||
mSigObj = self.nodes[2].addmultisigaddress(2, [addr1Obj['pubkey'], addr2Obj['pubkey']])
|
||||
|
||||
|
||||
# send 1.2 BTC to msig addr
|
||||
txId = self.nodes[0].sendtoaddress(mSigObj, 1.2);
|
||||
self.sync_all()
|
||||
self.nodes[1].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
oldBalance = self.nodes[1].getbalance()
|
||||
inputs = []
|
||||
outputs = {self.nodes[1].getnewaddress():1.1}
|
||||
rawTx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
fundedTx = self.nodes[2].fundrawtransaction(rawTx)
|
||||
|
||||
signedTx = self.nodes[2].signrawtransaction(fundedTx['hex'])
|
||||
txId = self.nodes[2].sendrawtransaction(signedTx['hex'])
|
||||
self.sync_all()
|
||||
self.nodes[1].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
# make sure funds are received at node1
|
||||
assert_equal(oldBalance+Decimal('1.10000000'), self.nodes[1].getbalance())
|
||||
|
||||
############################################################
|
||||
# locked wallet test
|
||||
self.nodes[1].encryptwallet("test")
|
||||
self.nodes.pop(1)
|
||||
stop_nodes(self.nodes)
|
||||
wait_bitcoinds()
|
||||
|
||||
self.nodes = start_nodes(3, self.options.tmpdir)
|
||||
|
||||
connect_nodes_bi(self.nodes,0,1)
|
||||
connect_nodes_bi(self.nodes,1,2)
|
||||
connect_nodes_bi(self.nodes,0,2)
|
||||
self.is_network_split=False
|
||||
self.sync_all()
|
||||
|
||||
error = False
|
||||
try:
|
||||
self.nodes[1].sendtoaddress(self.nodes[0].getnewaddress(), 1.2);
|
||||
except:
|
||||
error = True
|
||||
assert(error)
|
||||
|
||||
oldBalance = self.nodes[0].getbalance()
|
||||
|
||||
inputs = []
|
||||
outputs = {self.nodes[0].getnewaddress():1.1}
|
||||
rawTx = self.nodes[1].createrawtransaction(inputs, outputs)
|
||||
fundedTx = self.nodes[1].fundrawtransaction(rawTx)
|
||||
|
||||
#now we need to unlock
|
||||
self.nodes[1].walletpassphrase("test", 100)
|
||||
signedTx = self.nodes[1].signrawtransaction(fundedTx['hex'])
|
||||
txId = self.nodes[1].sendrawtransaction(signedTx['hex'])
|
||||
self.sync_all()
|
||||
self.nodes[1].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
# make sure funds are received at node1
|
||||
assert_equal(oldBalance+Decimal('11.10000000'), self.nodes[0].getbalance())
|
||||
|
||||
|
||||
|
||||
###############################################
|
||||
# multiple (~19) inputs tx test | Compare fee #
|
||||
###############################################
|
||||
|
||||
#empty node1, send some small coins from node0 to node1
|
||||
self.nodes[1].sendtoaddress(self.nodes[0].getnewaddress(), self.nodes[1].getbalance(), "", "", True);
|
||||
self.sync_all()
|
||||
self.nodes[0].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
for i in range(0,20):
|
||||
self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 0.01);
|
||||
self.sync_all()
|
||||
self.nodes[0].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
#fund a tx with ~20 small inputs
|
||||
inputs = []
|
||||
outputs = {self.nodes[0].getnewaddress():0.15,self.nodes[0].getnewaddress():0.04}
|
||||
rawTx = self.nodes[1].createrawtransaction(inputs, outputs)
|
||||
fundedTx = self.nodes[1].fundrawtransaction(rawTx)
|
||||
|
||||
#create same transaction over sendtoaddress
|
||||
txId = self.nodes[1].sendmany("", outputs);
|
||||
signedFee = self.nodes[1].getrawmempool(True)[txId]['fee']
|
||||
|
||||
#compare fee
|
||||
feeDelta = Decimal(fundedTx['fee']) - Decimal(signedFee);
|
||||
assert(feeDelta >= 0 and feeDelta <= feeTolerance*19) #~19 inputs
|
||||
|
||||
|
||||
#############################################
|
||||
# multiple (~19) inputs tx test | sign/send #
|
||||
#############################################
|
||||
|
||||
#again, empty node1, send some small coins from node0 to node1
|
||||
self.nodes[1].sendtoaddress(self.nodes[0].getnewaddress(), self.nodes[1].getbalance(), "", "", True);
|
||||
self.sync_all()
|
||||
self.nodes[0].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
for i in range(0,20):
|
||||
self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 0.01);
|
||||
self.sync_all()
|
||||
self.nodes[0].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
#fund a tx with ~20 small inputs
|
||||
oldBalance = self.nodes[0].getbalance()
|
||||
|
||||
inputs = []
|
||||
outputs = {self.nodes[0].getnewaddress():0.15,self.nodes[0].getnewaddress():0.04}
|
||||
rawTx = self.nodes[1].createrawtransaction(inputs, outputs)
|
||||
fundedTx = self.nodes[1].fundrawtransaction(rawTx)
|
||||
fundedAndSignedTx = self.nodes[1].signrawtransaction(fundedTx['hex'])
|
||||
txId = self.nodes[1].sendrawtransaction(fundedAndSignedTx['hex'])
|
||||
self.sync_all()
|
||||
self.nodes[0].generate(1)
|
||||
self.sync_all()
|
||||
assert_equal(oldBalance+Decimal('10.19000000'), self.nodes[0].getbalance()) #0.19+block reward
|
||||
|
||||
#####################################################
|
||||
# test fundrawtransaction with OP_RETURN and no vin #
|
||||
#####################################################
|
||||
|
||||
rawtx = "0100000000010000000000000000066a047465737400000000"
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
|
||||
assert_equal(len(dec_tx['vin']), 0)
|
||||
assert_equal(len(dec_tx['vout']), 1)
|
||||
|
||||
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
|
||||
|
||||
assert_greater_than(len(dec_tx['vin']), 0) # at least one vin
|
||||
assert_equal(len(dec_tx['vout']), 2) # one change output added
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
RawTransactionsTest().main()
|
|
@ -4,7 +4,7 @@
|
|||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#
|
||||
# Test REST interface
|
||||
# Test rpc http basics
|
||||
#
|
||||
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
|
@ -20,78 +20,82 @@ try:
|
|||
except ImportError:
|
||||
import urlparse
|
||||
|
||||
class HTTPBasicsTest (BitcoinTestFramework):
|
||||
class HTTPBasicsTest (BitcoinTestFramework):
|
||||
def setup_nodes(self):
|
||||
return start_nodes(4, self.options.tmpdir, extra_args=[['-rpckeepalive=1'], ['-rpckeepalive=0'], [], []])
|
||||
return start_nodes(4, self.options.tmpdir)
|
||||
|
||||
def run_test(self):
|
||||
|
||||
def run_test(self):
|
||||
|
||||
#################################################
|
||||
# lowlevel check for http persistent connection #
|
||||
#################################################
|
||||
url = urlparse.urlparse(self.nodes[0].url)
|
||||
authpair = url.username + ':' + url.password
|
||||
headers = {"Authorization": "Basic " + base64.b64encode(authpair)}
|
||||
|
||||
|
||||
conn = httplib.HTTPConnection(url.hostname, url.port)
|
||||
conn.connect()
|
||||
conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
|
||||
out1 = conn.getresponse().read();
|
||||
assert_equal('"error":null' in out1, True)
|
||||
assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open!
|
||||
|
||||
# TODO #1856: Re-enable support for persistent connections.
|
||||
assert_equal(conn.sock!=None, False)
|
||||
#send 2nd request without closing connection
|
||||
conn.request('POST', '/', '{"method": "getchaintips"}', headers)
|
||||
out2 = conn.getresponse().read();
|
||||
assert_equal('"error":null' in out1, True) #must also response with a correct json-rpc message
|
||||
assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open!
|
||||
conn.close()
|
||||
|
||||
|
||||
#same should be if we add keep-alive because this should be the std. behaviour
|
||||
headers = {"Authorization": "Basic " + base64.b64encode(authpair), "Connection": "keep-alive"}
|
||||
|
||||
|
||||
conn = httplib.HTTPConnection(url.hostname, url.port)
|
||||
conn.connect()
|
||||
conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
|
||||
out1 = conn.getresponse().read();
|
||||
assert_equal('"error":null' in out1, True)
|
||||
assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open!
|
||||
|
||||
# TODO #1856: Re-enable support for persistent connections.
|
||||
assert_equal(conn.sock!=None, False)
|
||||
#send 2nd request without closing connection
|
||||
conn.request('POST', '/', '{"method": "getchaintips"}', headers)
|
||||
out2 = conn.getresponse().read();
|
||||
assert_equal('"error":null' in out1, True) #must also response with a correct json-rpc message
|
||||
assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open!
|
||||
conn.close()
|
||||
|
||||
|
||||
#now do the same with "Connection: close"
|
||||
headers = {"Authorization": "Basic " + base64.b64encode(authpair), "Connection":"close"}
|
||||
|
||||
|
||||
conn = httplib.HTTPConnection(url.hostname, url.port)
|
||||
conn.connect()
|
||||
conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
|
||||
out1 = conn.getresponse().read();
|
||||
assert_equal('"error":null' in out1, True)
|
||||
assert_equal(conn.sock!=None, False) #now the connection must be closed after the response
|
||||
|
||||
assert_equal(conn.sock!=None, False) #now the connection must be closed after the response
|
||||
|
||||
#node1 (2nd node) is running with disabled keep-alive option
|
||||
urlNode1 = urlparse.urlparse(self.nodes[1].url)
|
||||
authpair = urlNode1.username + ':' + urlNode1.password
|
||||
headers = {"Authorization": "Basic " + base64.b64encode(authpair)}
|
||||
|
||||
|
||||
conn = httplib.HTTPConnection(urlNode1.hostname, urlNode1.port)
|
||||
conn.connect()
|
||||
conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
|
||||
out1 = conn.getresponse().read();
|
||||
assert_equal('"error":null' in out1, True)
|
||||
assert_equal(conn.sock!=None, False) #connection must be closed because keep-alive was set to false
|
||||
|
||||
#node2 (third node) is running with standard keep-alive parameters which means keep-alive is off
|
||||
|
||||
#node2 (third node) is running with standard keep-alive parameters which means keep-alive is on
|
||||
urlNode2 = urlparse.urlparse(self.nodes[2].url)
|
||||
authpair = urlNode2.username + ':' + urlNode2.password
|
||||
headers = {"Authorization": "Basic " + base64.b64encode(authpair)}
|
||||
|
||||
|
||||
conn = httplib.HTTPConnection(urlNode2.hostname, urlNode2.port)
|
||||
conn.connect()
|
||||
conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
|
||||
out1 = conn.getresponse().read();
|
||||
assert_equal('"error":null' in out1, True)
|
||||
assert_equal(conn.sock!=None, True) #connection must be closed because bitcoind should use keep-alive by default
|
||||
|
||||
# TODO #1856: Re-enable support for persistent connections.
|
||||
assert_equal(conn.sock!=None, False)
|
||||
conn.close()
|
||||
|
||||
if __name__ == '__main__':
|
||||
HTTPBasicsTest ().main ()
|
||||
|
|
|
@ -51,7 +51,7 @@ class MempoolCoinbaseTest(BitcoinTestFramework):
|
|||
blocks = []
|
||||
blocks.extend(self.nodes[0].generate(1))
|
||||
|
||||
spends2_raw = [ self.create_tx(txid, node0_address, 9.99) for txid in spends1_id ]
|
||||
spends2_raw = [ self.create_tx(txid, node0_address, 9.999) for txid in spends1_id ]
|
||||
spends2_id = [ self.nodes[0].sendrawtransaction(tx) for tx in spends2_raw ]
|
||||
|
||||
blocks.extend(self.nodes[0].generate(1))
|
||||
|
|
|
@ -54,15 +54,31 @@ class MempoolSpendCoinbaseTest(BitcoinTestFramework):
|
|||
assert_raises(JSONRPCException, self.nodes[0].sendrawtransaction, spends_raw[1])
|
||||
|
||||
# mempool should have just spend_101:
|
||||
mempoolinfo = self.nodes[0].getmempoolinfo()
|
||||
assert_equal(mempoolinfo['size'], 1)
|
||||
assert_equal(self.nodes[0].getrawmempool(), [ spend_101_id ])
|
||||
|
||||
# the size of the memory pool should be greater than 1x ~100 bytes
|
||||
assert_greater_than(mempoolinfo['bytes'], 100)
|
||||
# the actual memory usage should be strictly greater than the size
|
||||
# of the memory pool
|
||||
assert_greater_than(mempoolinfo['usage'], mempoolinfo['bytes'])
|
||||
|
||||
# mine a block, spend_101 should get confirmed
|
||||
self.nodes[0].generate(1)
|
||||
mempoolinfo = self.nodes[0].getmempoolinfo()
|
||||
assert_equal(mempoolinfo['size'], 0)
|
||||
assert_equal(mempoolinfo['bytes'], 0)
|
||||
assert_equal(mempoolinfo['usage'], 0)
|
||||
assert_equal(set(self.nodes[0].getrawmempool()), set())
|
||||
|
||||
# ... and now height 102 can be spent:
|
||||
spend_102_id = self.nodes[0].sendrawtransaction(spends_raw[1])
|
||||
mempoolinfo = self.nodes[0].getmempoolinfo()
|
||||
assert_equal(mempoolinfo['size'], 1)
|
||||
assert_equal(self.nodes[0].getrawmempool(), [ spend_102_id ])
|
||||
assert_greater_than(mempoolinfo['bytes'], 100)
|
||||
assert_greater_than(mempoolinfo['usage'], mempoolinfo['bytes'])
|
||||
|
||||
if __name__ == '__main__':
|
||||
MempoolSpendCoinbaseTest().main()
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2014 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#
|
||||
# Test node handling
|
||||
#
|
||||
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import *
|
||||
import base64
|
||||
|
||||
try:
|
||||
import http.client as httplib
|
||||
except ImportError:
|
||||
import httplib
|
||||
try:
|
||||
import urllib.parse as urlparse
|
||||
except ImportError:
|
||||
import urlparse
|
||||
|
||||
class NodeHandlingTest (BitcoinTestFramework):
|
||||
def run_test(self):
|
||||
###########################
|
||||
# setban/listbanned tests #
|
||||
###########################
|
||||
assert_equal(len(self.nodes[2].getpeerinfo()), 4) #we should have 4 nodes at this point
|
||||
self.nodes[2].setban("127.0.0.1", "add")
|
||||
time.sleep(3) #wait till the nodes are disconected
|
||||
assert_equal(len(self.nodes[2].getpeerinfo()), 0) #all nodes must be disconnected at this point
|
||||
assert_equal(len(self.nodes[2].listbanned()), 1)
|
||||
self.nodes[2].clearbanned()
|
||||
assert_equal(len(self.nodes[2].listbanned()), 0)
|
||||
self.nodes[2].setban("127.0.0.0/24", "add")
|
||||
assert_equal(len(self.nodes[2].listbanned()), 1)
|
||||
try:
|
||||
self.nodes[2].setban("127.0.0.1", "add") #throws exception because 127.0.0.1 is within range 127.0.0.0/24
|
||||
except:
|
||||
pass
|
||||
assert_equal(len(self.nodes[2].listbanned()), 1) #still only one banned ip because 127.0.0.1 is within the range of 127.0.0.0/24
|
||||
try:
|
||||
self.nodes[2].setban("127.0.0.1", "remove")
|
||||
except:
|
||||
pass
|
||||
assert_equal(len(self.nodes[2].listbanned()), 1)
|
||||
self.nodes[2].setban("127.0.0.0/24", "remove")
|
||||
assert_equal(len(self.nodes[2].listbanned()), 0)
|
||||
self.nodes[2].clearbanned()
|
||||
assert_equal(len(self.nodes[2].listbanned()), 0)
|
||||
|
||||
###########################
|
||||
# RPC disconnectnode test #
|
||||
###########################
|
||||
url = urlparse.urlparse(self.nodes[1].url)
|
||||
self.nodes[0].disconnectnode(url.hostname+":"+str(p2p_port(1)))
|
||||
time.sleep(2) #disconnecting a node needs a little bit of time
|
||||
for node in self.nodes[0].getpeerinfo():
|
||||
assert(node['addr'] != url.hostname+":"+str(p2p_port(1)))
|
||||
|
||||
connect_nodes_bi(self.nodes,0,1) #reconnect the node
|
||||
found = False
|
||||
for node in self.nodes[0].getpeerinfo():
|
||||
if node['addr'] == url.hostname+":"+str(p2p_port(1)):
|
||||
found = True
|
||||
assert(found)
|
||||
|
||||
if __name__ == '__main__':
|
||||
NodeHandlingTest ().main ()
|
|
@ -0,0 +1,124 @@
|
|||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2017 The Zcash developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import *
|
||||
from time import *
|
||||
from test_framework.mininode import COIN
|
||||
|
||||
class PrioritiseTransactionTest (BitcoinTestFramework):
|
||||
|
||||
def setup_chain(self):
|
||||
print("Initializing test directory "+self.options.tmpdir)
|
||||
initialize_chain_clean(self.options.tmpdir, 4)
|
||||
|
||||
def setup_network(self, split=False):
|
||||
self.nodes = []
|
||||
# Start nodes with tiny block size of 11kb
|
||||
self.nodes.append(start_node(0, self.options.tmpdir, ["-blockprioritysize=7000", "-blockmaxsize=11000", "-maxorphantx=1000", "-relaypriority=true", "-printpriority=1"]))
|
||||
self.nodes.append(start_node(1, self.options.tmpdir, ["-blockprioritysize=7000", "-blockmaxsize=11000", "-maxorphantx=1000", "-relaypriority=true", "-printpriority=1"]))
|
||||
connect_nodes(self.nodes[1], 0)
|
||||
self.is_network_split=False
|
||||
self.sync_all()
|
||||
|
||||
# Returns txid if operation was a success or None
|
||||
def wait_and_assert_operationid_status(self, myopid, in_status='success', in_errormsg=None):
|
||||
print('waiting for async operation {}'.format(myopid))
|
||||
opids = []
|
||||
opids.append(myopid)
|
||||
timeout = 300
|
||||
status = None
|
||||
errormsg = None
|
||||
txid = None
|
||||
for x in xrange(1, timeout):
|
||||
results = self.nodes[0].z_getoperationresult(opids)
|
||||
if len(results)==0:
|
||||
sleep(1)
|
||||
else:
|
||||
status = results[0]["status"]
|
||||
if status == "failed":
|
||||
errormsg = results[0]['error']['message']
|
||||
elif status == "success":
|
||||
txid = results[0]['result']['txid']
|
||||
break
|
||||
print('...returned status: {}'.format(status))
|
||||
assert_equal(in_status, status)
|
||||
if errormsg is not None:
|
||||
assert(in_errormsg is not None)
|
||||
assert_equal(in_errormsg in errormsg, True)
|
||||
print('...returned error: {}'.format(errormsg))
|
||||
return txid
|
||||
|
||||
def run_test (self):
|
||||
# tx priority is calculated: priority = sum(input_value_in_base_units * input_age)/size_in_bytes
|
||||
|
||||
print "Mining 11kb blocks..."
|
||||
self.nodes[0].generate(501)
|
||||
|
||||
base_fee = self.nodes[0].getnetworkinfo()['relayfee']
|
||||
|
||||
# 11 kb blocks will only hold about 50 txs, so this will fill mempool with older txs
|
||||
taddr = self.nodes[1].getnewaddress()
|
||||
for _ in range(900):
|
||||
self.nodes[0].sendtoaddress(taddr, 0.1)
|
||||
self.nodes[0].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
# Create tx of lower value to be prioritized on node 0
|
||||
# Older transactions get mined first, so this lower value, newer tx is unlikely to be mined without prioritization
|
||||
priority_tx_0 = self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 0.1)
|
||||
|
||||
# Check that priority_tx_0 is not in block_template() prior to prioritisation
|
||||
block_template = self.nodes[0].getblocktemplate()
|
||||
in_block_template = False
|
||||
for tx in block_template['transactions']:
|
||||
if tx['hash'] == priority_tx_0:
|
||||
in_block_template = True
|
||||
break
|
||||
assert_equal(in_block_template, False)
|
||||
|
||||
priority_result = self.nodes[0].prioritisetransaction(priority_tx_0, 1000, int(3 * base_fee * COIN))
|
||||
|
||||
# Check that prioritized transaction is in getblocktemplate()
|
||||
in_block_template = False
|
||||
block_template = self.nodes[0].getblocktemplate()
|
||||
for tx in block_template['transactions']:
|
||||
if tx['hash'] == priority_tx_0:
|
||||
in_block_template = True
|
||||
break
|
||||
# NOTE: getblocktemplate() should return prioritized transaction, but is not
|
||||
# Noted by user in issue #1884
|
||||
assert_equal(in_block_template, False)
|
||||
|
||||
# Node 1 doesn't get the next block, so this *shouldn't* be mined despite being prioritized on node 1
|
||||
priority_tx_1 = self.nodes[1].sendtoaddress(self.nodes[0].getnewaddress(), 0.1)
|
||||
self.nodes[1].prioritisetransaction(priority_tx_1, 1000, int(3 * base_fee * COIN))
|
||||
|
||||
# Mine block on node 0
|
||||
blk_hash = self.nodes[0].generate(1)
|
||||
block = self.nodes[0].getblock(blk_hash[0])
|
||||
self.sync_all()
|
||||
|
||||
# Check that priority_tx_0 was mined
|
||||
mempool = self.nodes[0].getrawmempool()
|
||||
assert_equal(priority_tx_0 in block['tx'], True)
|
||||
assert_equal(priority_tx_0 in mempool, False)
|
||||
|
||||
# Check that priority_tx_1 was not mined
|
||||
assert_equal(priority_tx_1 in mempool, True)
|
||||
assert_equal(priority_tx_1 in block['tx'], False)
|
||||
|
||||
# Mine a block on node 1 and sync
|
||||
blk_hash_1 = self.nodes[1].generate(1)
|
||||
block_1 = self.nodes[1].getblock(blk_hash_1[0])
|
||||
self.sync_all()
|
||||
|
||||
# Check to see if priority_tx_1 is now mined
|
||||
mempool_1 = self.nodes[1].getrawmempool()
|
||||
assert_equal(priority_tx_1 in mempool_1, False)
|
||||
assert_equal(priority_tx_1 in block_1['tx'], True)
|
||||
|
||||
if __name__ == '__main__':
|
||||
PrioritiseTransactionTest().main()
|
|
@ -68,10 +68,10 @@ class ProxyTest(BitcoinTestFramework):
|
|||
['-listen', '-debug=net', '-debug=proxy', '-proxy=%s:%i' % (self.conf1.addr),'-proxyrandomize=1'],
|
||||
['-listen', '-debug=net', '-debug=proxy', '-proxy=%s:%i' % (self.conf1.addr),'-onion=%s:%i' % (self.conf2.addr),'-proxyrandomize=0'],
|
||||
['-listen', '-debug=net', '-debug=proxy', '-proxy=%s:%i' % (self.conf2.addr),'-proxyrandomize=1'],
|
||||
['-listen', '-debug=net', '-debug=proxy', '-proxy=[%s]:%i' % (self.conf3.addr),'-proxyrandomize=0']
|
||||
['-listen', '-debug=net', '-debug=proxy', '-proxy=[%s]:%i' % (self.conf3.addr),'-proxyrandomize=0', '-noonion']
|
||||
])
|
||||
|
||||
def node_test(self, node, proxies, auth):
|
||||
def node_test(self, node, proxies, auth, test_onion=True):
|
||||
rv = []
|
||||
# Test: outgoing IPv4 connection through node
|
||||
node.addnode("15.61.23.23:1234", "onetry")
|
||||
|
@ -99,17 +99,18 @@ class ProxyTest(BitcoinTestFramework):
|
|||
assert_equal(cmd.password, None)
|
||||
rv.append(cmd)
|
||||
|
||||
# Test: outgoing onion connection through node
|
||||
node.addnode("bitcoinostk4e4re.onion:8333", "onetry")
|
||||
cmd = proxies[2].queue.get()
|
||||
assert(isinstance(cmd, Socks5Command))
|
||||
assert_equal(cmd.atyp, AddressType.DOMAINNAME)
|
||||
assert_equal(cmd.addr, "bitcoinostk4e4re.onion")
|
||||
assert_equal(cmd.port, 8333)
|
||||
if not auth:
|
||||
assert_equal(cmd.username, None)
|
||||
assert_equal(cmd.password, None)
|
||||
rv.append(cmd)
|
||||
if test_onion:
|
||||
# Test: outgoing onion connection through node
|
||||
node.addnode("bitcoinostk4e4re.onion:8333", "onetry")
|
||||
cmd = proxies[2].queue.get()
|
||||
assert(isinstance(cmd, Socks5Command))
|
||||
assert_equal(cmd.atyp, AddressType.DOMAINNAME)
|
||||
assert_equal(cmd.addr, "bitcoinostk4e4re.onion")
|
||||
assert_equal(cmd.port, 8333)
|
||||
if not auth:
|
||||
assert_equal(cmd.username, None)
|
||||
assert_equal(cmd.password, None)
|
||||
rv.append(cmd)
|
||||
|
||||
# Test: outgoing DNS name connection through node
|
||||
node.addnode("node.noumenon:8333", "onetry")
|
||||
|
@ -139,8 +140,41 @@ class ProxyTest(BitcoinTestFramework):
|
|||
assert_equal(len(credentials), 4)
|
||||
|
||||
# proxy on IPv6 localhost
|
||||
self.node_test(self.nodes[3], [self.serv3, self.serv3, self.serv3, self.serv3], False)
|
||||
self.node_test(self.nodes[3], [self.serv3, self.serv3, self.serv3, self.serv3], False, False)
|
||||
|
||||
def networks_dict(d):
|
||||
r = {}
|
||||
for x in d['networks']:
|
||||
r[x['name']] = x
|
||||
return r
|
||||
|
||||
# test RPC getnetworkinfo
|
||||
n0 = networks_dict(self.nodes[0].getnetworkinfo())
|
||||
for net in ['ipv4','ipv6','onion']:
|
||||
assert_equal(n0[net]['proxy'], '%s:%i' % (self.conf1.addr))
|
||||
assert_equal(n0[net]['proxy_randomize_credentials'], True)
|
||||
assert_equal(n0['onion']['reachable'], True)
|
||||
|
||||
n1 = networks_dict(self.nodes[1].getnetworkinfo())
|
||||
for net in ['ipv4','ipv6']:
|
||||
assert_equal(n1[net]['proxy'], '%s:%i' % (self.conf1.addr))
|
||||
assert_equal(n1[net]['proxy_randomize_credentials'], False)
|
||||
assert_equal(n1['onion']['proxy'], '%s:%i' % (self.conf2.addr))
|
||||
assert_equal(n1['onion']['proxy_randomize_credentials'], False)
|
||||
assert_equal(n1['onion']['reachable'], True)
|
||||
|
||||
n2 = networks_dict(self.nodes[2].getnetworkinfo())
|
||||
for net in ['ipv4','ipv6','onion']:
|
||||
assert_equal(n2[net]['proxy'], '%s:%i' % (self.conf2.addr))
|
||||
assert_equal(n2[net]['proxy_randomize_credentials'], True)
|
||||
assert_equal(n2['onion']['reachable'], True)
|
||||
|
||||
n3 = networks_dict(self.nodes[3].getnetworkinfo())
|
||||
for net in ['ipv4','ipv6']:
|
||||
assert_equal(n3[net]['proxy'], '[%s]:%i' % (self.conf3.addr))
|
||||
assert_equal(n3[net]['proxy_randomize_credentials'], False)
|
||||
assert_equal(n3['onion']['reachable'], False)
|
||||
|
||||
if __name__ == '__main__':
|
||||
ProxyTest().main()
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
|
||||
bal = self.nodes[0].getbalance()
|
||||
inputs = [{ "txid" : txId, "vout" : vout['n'], "scriptPubKey" : vout['scriptPubKey']['hex']}]
|
||||
outputs = { self.nodes[0].getnewaddress() : 2.19 }
|
||||
outputs = { self.nodes[0].getnewaddress() : 2.199 }
|
||||
rawTx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
rawTxPartialSigned = self.nodes[1].signrawtransaction(rawTx, inputs)
|
||||
assert_equal(rawTxPartialSigned['complete'], False) #node1 only has one key, can't comp. sign the tx
|
||||
|
@ -139,7 +139,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
self.sync_all()
|
||||
self.nodes[0].generate(1)
|
||||
self.sync_all()
|
||||
assert_equal(self.nodes[0].getbalance(), bal+Decimal('10.00000000')+Decimal('2.19000000')) #block reward + tx
|
||||
assert_equal(self.nodes[0].getbalance(), bal+Decimal('10.00000000')+Decimal('2.19900000')) #block reward + tx
|
||||
|
||||
if __name__ == '__main__':
|
||||
RawTransactionsTest().main()
|
||||
|
|
|
@ -14,6 +14,7 @@ from struct import *
|
|||
import binascii
|
||||
import json
|
||||
import StringIO
|
||||
import decimal
|
||||
|
||||
try:
|
||||
import http.client as httplib
|
||||
|
@ -31,10 +32,20 @@ def deser_uint256(f):
|
|||
r += t << (i * 32)
|
||||
return r
|
||||
|
||||
#allows simple http get calls with a request body
|
||||
def http_get_call(host, port, path, requestdata = '', response_object = 0):
|
||||
#allows simple http get calls
|
||||
def http_get_call(host, port, path, response_object = 0):
|
||||
conn = httplib.HTTPConnection(host, port)
|
||||
conn.request('GET', path, requestdata)
|
||||
conn.request('GET', path)
|
||||
|
||||
if response_object:
|
||||
return conn.getresponse()
|
||||
|
||||
return conn.getresponse().read()
|
||||
|
||||
#allows simple http post calls with a request body
|
||||
def http_post_call(host, port, path, requestdata = '', response_object = 0):
|
||||
conn = httplib.HTTPConnection(host, port)
|
||||
conn.request('POST', path, requestdata)
|
||||
|
||||
if response_object:
|
||||
return conn.getresponse()
|
||||
|
@ -136,7 +147,7 @@ class RESTTest (BitcoinTestFramework):
|
|||
binaryRequest += binascii.unhexlify(vintx);
|
||||
binaryRequest += pack("i", 0);
|
||||
|
||||
bin_response = http_get_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'bin', binaryRequest)
|
||||
bin_response = http_post_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'bin', binaryRequest)
|
||||
output = StringIO.StringIO()
|
||||
output.write(bin_response)
|
||||
output.seek(0)
|
||||
|
@ -174,14 +185,14 @@ class RESTTest (BitcoinTestFramework):
|
|||
|
||||
#do some invalid requests
|
||||
json_request = '{"checkmempool'
|
||||
response = http_get_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'json', json_request, True)
|
||||
response = http_post_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'json', json_request, True)
|
||||
assert_equal(response.status, 500) #must be a 500 because we send a invalid json request
|
||||
|
||||
json_request = '{"checkmempool'
|
||||
response = http_get_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'bin', json_request, True)
|
||||
response = http_post_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'bin', json_request, True)
|
||||
assert_equal(response.status, 500) #must be a 500 because we send a invalid bin request
|
||||
|
||||
response = http_get_call(url.hostname, url.port, '/rest/getutxos/checkmempool'+self.FORMAT_SEPARATOR+'bin', '', True)
|
||||
response = http_post_call(url.hostname, url.port, '/rest/getutxos/checkmempool'+self.FORMAT_SEPARATOR+'bin', '', True)
|
||||
assert_equal(response.status, 500) #must be a 500 because we send a invalid bin request
|
||||
|
||||
#test limits
|
||||
|
@ -189,14 +200,14 @@ class RESTTest (BitcoinTestFramework):
|
|||
for x in range(0, 20):
|
||||
json_request += txid+'-'+str(n)+'/'
|
||||
json_request = json_request.rstrip("/")
|
||||
response = http_get_call(url.hostname, url.port, '/rest/getutxos'+json_request+self.FORMAT_SEPARATOR+'json', '', True)
|
||||
response = http_post_call(url.hostname, url.port, '/rest/getutxos'+json_request+self.FORMAT_SEPARATOR+'json', '', True)
|
||||
assert_equal(response.status, 500) #must be a 500 because we exceeding the limits
|
||||
|
||||
json_request = '/checkmempool/'
|
||||
for x in range(0, 15):
|
||||
json_request += txid+'-'+str(n)+'/'
|
||||
json_request = json_request.rstrip("/");
|
||||
response = http_get_call(url.hostname, url.port, '/rest/getutxos'+json_request+self.FORMAT_SEPARATOR+'json', '', True)
|
||||
response = http_post_call(url.hostname, url.port, '/rest/getutxos'+json_request+self.FORMAT_SEPARATOR+'json', '', True)
|
||||
assert_equal(response.status, 200) #must be a 500 because we exceeding the limits
|
||||
|
||||
self.nodes[0].generate(1) #generate block to not affect upcoming tests
|
||||
|
@ -216,27 +227,27 @@ class RESTTest (BitcoinTestFramework):
|
|||
# this is 32 9-bit indices
|
||||
|
||||
# check binary format
|
||||
response = http_get_call(url.hostname, url.port, '/rest/block/'+bb_hash+self.FORMAT_SEPARATOR+"bin", "", True)
|
||||
response = http_get_call(url.hostname, url.port, '/rest/block/'+bb_hash+self.FORMAT_SEPARATOR+"bin", True)
|
||||
assert_equal(response.status, 200)
|
||||
assert_greater_than(int(response.getheader('content-length')), 177)
|
||||
response_str = response.read()
|
||||
|
||||
# compare with block header
|
||||
response_header = http_get_call(url.hostname, url.port, '/rest/headers/1/'+bb_hash+self.FORMAT_SEPARATOR+"bin", "", True)
|
||||
response_header = http_get_call(url.hostname, url.port, '/rest/headers/1/'+bb_hash+self.FORMAT_SEPARATOR+"bin", True)
|
||||
assert_equal(response_header.status, 200)
|
||||
assert_equal(int(response_header.getheader('content-length')), 177)
|
||||
response_header_str = response_header.read()
|
||||
assert_equal(response_str[0:177], response_header_str)
|
||||
|
||||
# check block hex format
|
||||
response_hex = http_get_call(url.hostname, url.port, '/rest/block/'+bb_hash+self.FORMAT_SEPARATOR+"hex", "", True)
|
||||
response_hex = http_get_call(url.hostname, url.port, '/rest/block/'+bb_hash+self.FORMAT_SEPARATOR+"hex", True)
|
||||
assert_equal(response_hex.status, 200)
|
||||
assert_greater_than(int(response_hex.getheader('content-length')), 354)
|
||||
response_hex_str = response_hex.read()
|
||||
assert_equal(response_str.encode("hex")[0:354], response_hex_str[0:354])
|
||||
|
||||
# compare with hex block header
|
||||
response_header_hex = http_get_call(url.hostname, url.port, '/rest/headers/1/'+bb_hash+self.FORMAT_SEPARATOR+"hex", "", True)
|
||||
response_header_hex = http_get_call(url.hostname, url.port, '/rest/headers/1/'+bb_hash+self.FORMAT_SEPARATOR+"hex", True)
|
||||
assert_equal(response_header_hex.status, 200)
|
||||
assert_greater_than(int(response_header_hex.getheader('content-length')), 354)
|
||||
response_header_hex_str = response_header_hex.read()
|
||||
|
@ -244,18 +255,49 @@ class RESTTest (BitcoinTestFramework):
|
|||
assert_equal(response_header_str.encode("hex")[0:354], response_header_hex_str[0:354])
|
||||
|
||||
# check json format
|
||||
json_string = http_get_call(url.hostname, url.port, '/rest/block/'+bb_hash+self.FORMAT_SEPARATOR+'json')
|
||||
json_obj = json.loads(json_string)
|
||||
assert_equal(json_obj['hash'], bb_hash)
|
||||
block_json_string = http_get_call(url.hostname, url.port, '/rest/block/'+bb_hash+self.FORMAT_SEPARATOR+'json')
|
||||
block_json_obj = json.loads(block_json_string)
|
||||
assert_equal(block_json_obj['hash'], bb_hash)
|
||||
|
||||
# compare with json block header
|
||||
response_header_json = http_get_call(url.hostname, url.port, '/rest/headers/1/'+bb_hash+self.FORMAT_SEPARATOR+"json", True)
|
||||
assert_equal(response_header_json.status, 200)
|
||||
response_header_json_str = response_header_json.read()
|
||||
json_obj = json.loads(response_header_json_str, parse_float=decimal.Decimal)
|
||||
assert_equal(len(json_obj), 1) #ensure that there is one header in the json response
|
||||
assert_equal(json_obj[0]['hash'], bb_hash) #request/response hash should be the same
|
||||
|
||||
#compare with normal RPC block response
|
||||
rpc_block_json = self.nodes[0].getblock(bb_hash)
|
||||
assert_equal(json_obj[0]['hash'], rpc_block_json['hash'])
|
||||
assert_equal(json_obj[0]['confirmations'], rpc_block_json['confirmations'])
|
||||
assert_equal(json_obj[0]['height'], rpc_block_json['height'])
|
||||
assert_equal(json_obj[0]['version'], rpc_block_json['version'])
|
||||
assert_equal(json_obj[0]['merkleroot'], rpc_block_json['merkleroot'])
|
||||
assert_equal(json_obj[0]['time'], rpc_block_json['time'])
|
||||
assert_equal(json_obj[0]['nonce'], rpc_block_json['nonce'])
|
||||
assert_equal(json_obj[0]['bits'], rpc_block_json['bits'])
|
||||
assert_equal(json_obj[0]['difficulty'], rpc_block_json['difficulty'])
|
||||
assert_equal(json_obj[0]['chainwork'], rpc_block_json['chainwork'])
|
||||
assert_equal(json_obj[0]['previousblockhash'], rpc_block_json['previousblockhash'])
|
||||
|
||||
#see if we can get 5 headers in one response
|
||||
self.nodes[1].generate(5)
|
||||
self.sync_all()
|
||||
response_header_json = http_get_call(url.hostname, url.port, '/rest/headers/5/'+bb_hash+self.FORMAT_SEPARATOR+"json", True)
|
||||
assert_equal(response_header_json.status, 200)
|
||||
response_header_json_str = response_header_json.read()
|
||||
json_obj = json.loads(response_header_json_str)
|
||||
assert_equal(len(json_obj), 5) #now we should have 5 header objects
|
||||
|
||||
# do tx test
|
||||
tx_hash = json_obj['tx'][0]['txid'];
|
||||
tx_hash = block_json_obj['tx'][0]['txid'];
|
||||
json_string = http_get_call(url.hostname, url.port, '/rest/tx/'+tx_hash+self.FORMAT_SEPARATOR+"json")
|
||||
json_obj = json.loads(json_string)
|
||||
assert_equal(json_obj['txid'], tx_hash)
|
||||
|
||||
# check hex format response
|
||||
hex_string = http_get_call(url.hostname, url.port, '/rest/tx/'+tx_hash+self.FORMAT_SEPARATOR+"hex", "", True)
|
||||
hex_string = http_get_call(url.hostname, url.port, '/rest/tx/'+tx_hash+self.FORMAT_SEPARATOR+"hex", True)
|
||||
assert_equal(hex_string.status, 200)
|
||||
assert_greater_than(int(response.getheader('content-length')), 10)
|
||||
|
||||
|
@ -269,6 +311,19 @@ class RESTTest (BitcoinTestFramework):
|
|||
txs.append(self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 1))
|
||||
self.sync_all()
|
||||
|
||||
# check that there are exactly 3 transactions in the TX memory pool before generating the block
|
||||
json_string = http_get_call(url.hostname, url.port, '/rest/mempool/info'+self.FORMAT_SEPARATOR+'json')
|
||||
json_obj = json.loads(json_string)
|
||||
assert_equal(json_obj['size'], 3)
|
||||
# the size of the memory pool should be greater than 3x ~100 bytes
|
||||
assert_greater_than(json_obj['bytes'], 300)
|
||||
|
||||
# check that there are our submitted transactions in the TX memory pool
|
||||
json_string = http_get_call(url.hostname, url.port, '/rest/mempool/contents'+self.FORMAT_SEPARATOR+'json')
|
||||
json_obj = json.loads(json_string)
|
||||
for tx in txs:
|
||||
assert_equal(tx in json_obj, True)
|
||||
|
||||
# now mine the transactions
|
||||
newblockhash = self.nodes[1].generate(1)
|
||||
self.sync_all()
|
||||
|
|
|
@ -106,6 +106,32 @@ class AuthServiceProxy(object):
|
|||
name = "%s.%s" % (self.__service_name, name)
|
||||
return AuthServiceProxy(self.__service_url, name, connection=self.__conn)
|
||||
|
||||
def _request(self, method, path, postdata):
|
||||
'''
|
||||
Do a HTTP request, with retry if we get disconnected (e.g. due to a timeout).
|
||||
This is a workaround for https://bugs.python.org/issue3566 which is fixed in Python 3.5.
|
||||
'''
|
||||
headers = {'Host': self.__url.hostname,
|
||||
'User-Agent': USER_AGENT,
|
||||
'Authorization': self.__auth_header,
|
||||
'Content-type': 'application/json'}
|
||||
try:
|
||||
self.__conn.request(method, path, postdata, headers)
|
||||
return self._get_response()
|
||||
except httplib.BadStatusLine as e:
|
||||
if e.line == "''": # if connection was closed, try again
|
||||
self.__conn.close()
|
||||
self.__conn.request(method, path, postdata, headers)
|
||||
return self._get_response()
|
||||
else:
|
||||
raise
|
||||
except (BrokenPipeError,ConnectionResetError):
|
||||
# Python 3.5+ raises BrokenPipeError instead of BadStatusLine when the connection was reset
|
||||
# ConnectionResetError happens on FreeBSD with Python 3.4
|
||||
self.__conn.close()
|
||||
self.__conn.request(method, path, postdata, headers)
|
||||
return self._get_response()
|
||||
|
||||
def __call__(self, *args):
|
||||
AuthServiceProxy.__id_count += 1
|
||||
|
||||
|
@ -115,13 +141,7 @@ class AuthServiceProxy(object):
|
|||
'method': self.__service_name,
|
||||
'params': args,
|
||||
'id': AuthServiceProxy.__id_count}, default=EncodeDecimal)
|
||||
self.__conn.request('POST', self.__url.path, postdata,
|
||||
{'Host': self.__url.hostname,
|
||||
'User-Agent': USER_AGENT,
|
||||
'Authorization': self.__auth_header,
|
||||
'Content-type': 'application/json'})
|
||||
|
||||
response = self._get_response()
|
||||
response = self._request('POST', self.__url.path, postdata)
|
||||
if response['error'] is not None:
|
||||
raise JSONRPCException(response['error'])
|
||||
elif 'result' not in response:
|
||||
|
@ -133,13 +153,7 @@ class AuthServiceProxy(object):
|
|||
def _batch(self, rpc_call_list):
|
||||
postdata = json.dumps(list(rpc_call_list), default=EncodeDecimal)
|
||||
log.debug("--> "+postdata)
|
||||
self.__conn.request('POST', self.__url.path, postdata,
|
||||
{'Host': self.__url.hostname,
|
||||
'User-Agent': USER_AGENT,
|
||||
'Authorization': self.__auth_header,
|
||||
'Content-type': 'application/json'})
|
||||
|
||||
return self._get_response()
|
||||
return self._request('POST', self.__url.path, postdata)
|
||||
|
||||
def _get_response(self):
|
||||
http_response = self.__conn.getresponse()
|
||||
|
|
|
@ -140,8 +140,8 @@ class TestNode(NodeConnCB):
|
|||
# or false, then only the last tx is tested against outcome.)
|
||||
|
||||
class TestInstance(object):
|
||||
def __init__(self, objects=[], sync_every_block=True, sync_every_tx=False):
|
||||
self.blocks_and_transactions = objects
|
||||
def __init__(self, objects=None, sync_every_block=True, sync_every_tx=False):
|
||||
self.blocks_and_transactions = objects if objects else []
|
||||
self.sync_every_block = sync_every_block
|
||||
self.sync_every_tx = sync_every_tx
|
||||
|
||||
|
|
|
@ -37,8 +37,11 @@ MY_SUBVERSION = "/python-mininode-tester:0.0.1/"
|
|||
|
||||
MAX_INV_SZ = 50000
|
||||
|
||||
|
||||
COIN = 100000000 # 1 zec in zatoshis
|
||||
|
||||
# Keep our own socket map for asyncore, so that we can track disconnects
|
||||
# ourselves (to workaround an issue with closing an asyncore socket when
|
||||
# ourselves (to workaround an issue with closing an asyncore socket when
|
||||
# using select)
|
||||
mininode_socket_map = dict()
|
||||
|
||||
|
|
|
@ -83,6 +83,7 @@ def initialize_datadir(dirname, n):
|
|||
f.write("rpcpassword=rt\n");
|
||||
f.write("port="+str(p2p_port(n))+"\n");
|
||||
f.write("rpcport="+str(rpc_port(n))+"\n");
|
||||
f.write("listenonion=0\n");
|
||||
return datadir
|
||||
|
||||
def initialize_chain(test_dir):
|
||||
|
|
|
@ -67,14 +67,14 @@ class WalletTest (BitcoinTestFramework):
|
|||
assert_equal(self.nodes[2].getbalance("*"), 21)
|
||||
|
||||
# Node0 should have three unspent outputs.
|
||||
# Create a couple of transactions to send them to node2, submit them through
|
||||
# node1, and make sure both node0 and node2 pick them up properly:
|
||||
# Create a couple of transactions to send them to node2, submit them through
|
||||
# node1, and make sure both node0 and node2 pick them up properly:
|
||||
node0utxos = self.nodes[0].listunspent(1)
|
||||
assert_equal(len(node0utxos), 3)
|
||||
|
||||
# create both transactions
|
||||
txns_to_send = []
|
||||
for utxo in node0utxos:
|
||||
for utxo in node0utxos:
|
||||
inputs = []
|
||||
outputs = {}
|
||||
inputs.append({ "txid" : utxo["txid"], "vout" : utxo["vout"]})
|
||||
|
@ -159,7 +159,7 @@ class WalletTest (BitcoinTestFramework):
|
|||
|
||||
#check if we can list zero value tx as available coins
|
||||
#1. create rawtx
|
||||
#2. hex-changed one output to 0.0
|
||||
#2. hex-changed one output to 0.0
|
||||
#3. sign and send
|
||||
#4. check if recipient (node0) can list the zero value tx
|
||||
usp = self.nodes[1].listunspent()
|
||||
|
@ -380,5 +380,37 @@ class WalletTest (BitcoinTestFramework):
|
|||
assert_equal(Decimal(self.nodes[2].getbalance()), node2balance)
|
||||
assert_equal(Decimal(self.nodes[2].getbalance("*")), node2balance)
|
||||
|
||||
#send a tx with value in a string (PR#6380 +)
|
||||
txId = self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), "2")
|
||||
txObj = self.nodes[0].gettransaction(txId)
|
||||
assert_equal(txObj['amount'], Decimal('-2.00000000'))
|
||||
|
||||
txId = self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), "0.0001")
|
||||
txObj = self.nodes[0].gettransaction(txId)
|
||||
assert_equal(txObj['amount'], Decimal('-0.00010000'))
|
||||
|
||||
#check if JSON parser can handle scientific notation in strings
|
||||
txId = self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), "1e-4")
|
||||
txObj = self.nodes[0].gettransaction(txId)
|
||||
assert_equal(txObj['amount'], Decimal('-0.00010000'))
|
||||
|
||||
#this should fail
|
||||
errorString = ""
|
||||
try:
|
||||
txId = self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), "1f-4")
|
||||
except JSONRPCException,e:
|
||||
errorString = e.error['message']
|
||||
|
||||
assert_equal("Invalid amount" in errorString, True);
|
||||
|
||||
errorString = ""
|
||||
try:
|
||||
self.nodes[0].generate("2") #use a string to as block amount parameter must fail because it's not interpreted as amount
|
||||
except JSONRPCException,e:
|
||||
errorString = e.error['message']
|
||||
|
||||
assert_equal("not an integer" in errorString, True);
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
WalletTest ().main ()
|
||||
|
|
|
@ -31,6 +31,14 @@ class Wallet1941RegressionTest (BitcoinTestFramework):
|
|||
connect_nodes_bi(self.nodes,0,1)
|
||||
self.sync_all()
|
||||
|
||||
def restart_second_node(self, extra_args=[]):
|
||||
self.nodes[1].stop()
|
||||
bitcoind_processes[1].wait()
|
||||
self.nodes[1] = start_node(1, self.options.tmpdir, extra_args=['-regtestprotectcoinbase','-debug=zrpc'] + extra_args)
|
||||
self.nodes[1].setmocktime(starttime + 9000)
|
||||
connect_nodes_bi(self.nodes, 0, 1)
|
||||
self.sync_all()
|
||||
|
||||
def wait_and_assert_operationid_status(self, myopid, in_status='success', in_errormsg=None):
|
||||
print('waiting for async operation {}'.format(myopid))
|
||||
opids = []
|
||||
|
@ -93,8 +101,17 @@ class Wallet1941RegressionTest (BitcoinTestFramework):
|
|||
self.nodes[1].generate(101)
|
||||
self.sync_all()
|
||||
|
||||
# Import the key on node 1.
|
||||
self.nodes[1].z_importkey(key)
|
||||
# Import the key on node 1, only scanning the last few blocks.
|
||||
# (uses 'true' to test boolean fallback)
|
||||
self.nodes[1].z_importkey(key, 'true', self.nodes[1].getblockchaininfo()['blocks'] - 100)
|
||||
|
||||
# Confirm that the balance on node 1 is zero, as we have not
|
||||
# rescanned over the older transactions
|
||||
resp = self.nodes[1].z_getbalance(myzaddr)
|
||||
assert_equal(Decimal(resp), 0)
|
||||
|
||||
# Re-import the key on node 1, scanning from before the transaction.
|
||||
self.nodes[1].z_importkey(key, 'yes', self.nodes[1].getblockchaininfo()['blocks'] - 110)
|
||||
|
||||
# Confirm that the balance on node 1 is valid now (node 1 must
|
||||
# have rescanned)
|
||||
|
|
|
@ -181,7 +181,7 @@ class WalletProtectCoinbaseTest (BitcoinTestFramework):
|
|||
amount = Decimal('10.0') - Decimal('0.00010000') - Decimal('0.00000001') # this leaves change at 1 zatoshi less than dust threshold
|
||||
recipients.append({"address":self.nodes[0].getnewaddress(), "amount":amount })
|
||||
myopid = self.nodes[0].z_sendmany(mytaddr, recipients)
|
||||
self.wait_and_assert_operationid_status(myopid, "failed", "Insufficient transparent funds, have 10.00, need 0.00000545 more to avoid creating invalid change output 0.00000001 (dust threshold is 0.00000546)")
|
||||
self.wait_and_assert_operationid_status(myopid, "failed", "Insufficient transparent funds, have 10.00, need 0.00000053 more to avoid creating invalid change output 0.00000001 (dust threshold is 0.00000054)")
|
||||
|
||||
# Send will fail because send amount is too big, even when including coinbase utxos
|
||||
errorString = ""
|
||||
|
|
|
@ -24,7 +24,7 @@ class JoinSplitTest(BitcoinTestFramework):
|
|||
|
||||
(total_in, inputs) = gather_inputs(self.nodes[0], 40)
|
||||
protect_tx = self.nodes[0].createrawtransaction(inputs, {})
|
||||
joinsplit_result = self.nodes[0].zcrawjoinsplit(protect_tx, {}, {zcaddress:39.9}, 39.9, 0)
|
||||
joinsplit_result = self.nodes[0].zcrawjoinsplit(protect_tx, {}, {zcaddress:39.99}, 39.99, 0)
|
||||
|
||||
receive_result = self.nodes[0].zcrawreceive(zcsecretkey, joinsplit_result["encryptednote1"])
|
||||
assert_equal(receive_result["exists"], False)
|
||||
|
@ -45,7 +45,7 @@ class JoinSplitTest(BitcoinTestFramework):
|
|||
self.nodes[0].sendtoaddress(addrtest, 0.01);
|
||||
|
||||
joinsplit_tx = self.nodes[0].createrawtransaction([], {})
|
||||
joinsplit_result = self.nodes[0].zcrawjoinsplit(joinsplit_tx, {receive_result["note"] : zcsecretkey}, {zcaddress: 39.8}, 0, 0.1)
|
||||
joinsplit_result = self.nodes[0].zcrawjoinsplit(joinsplit_tx, {receive_result["note"] : zcsecretkey}, {zcaddress: 39.98}, 0, 0.01)
|
||||
|
||||
self.nodes[0].sendrawtransaction(joinsplit_result["rawtxn"])
|
||||
self.nodes[0].generate(1)
|
||||
|
|
|
@ -56,7 +56,7 @@ class JoinSplitTest(BitcoinTestFramework):
|
|||
for i in range(4):
|
||||
(total_in, inputs) = gather_inputs(self.nodes[i], 40)
|
||||
pool[i] = self.nodes[i].createrawtransaction(inputs, {})
|
||||
pool[i] = self.nodes[i].zcrawjoinsplit(pool[i], {}, {zcaddress:39.9}, 39.9, 0)
|
||||
pool[i] = self.nodes[i].zcrawjoinsplit(pool[i], {}, {zcaddress:39.99}, 39.99, 0)
|
||||
signed = self.nodes[i].signrawtransaction(pool[i]["rawtxn"])
|
||||
|
||||
# send the tx to both halves of the network
|
||||
|
@ -90,26 +90,26 @@ class JoinSplitTest(BitcoinTestFramework):
|
|||
# Create joinsplit {A, B}->{*}
|
||||
joinsplit_AB = self.nodes[0].zcrawjoinsplit(blank_tx,
|
||||
{pool[0] : zcsecretkey, pool[1] : zcsecretkey},
|
||||
{zcaddress:(39.9*2)-0.1},
|
||||
0, 0.1)
|
||||
{zcaddress:(39.99*2)-0.01},
|
||||
0, 0.01)
|
||||
|
||||
# Create joinsplit {B, C}->{*}
|
||||
joinsplit_BC = self.nodes[0].zcrawjoinsplit(blank_tx,
|
||||
{pool[1] : zcsecretkey, pool[2] : zcsecretkey},
|
||||
{zcaddress:(39.9*2)-0.1},
|
||||
0, 0.1)
|
||||
{zcaddress:(39.99*2)-0.01},
|
||||
0, 0.01)
|
||||
|
||||
# Create joinsplit {C, D}->{*}
|
||||
joinsplit_CD = self.nodes[0].zcrawjoinsplit(blank_tx,
|
||||
{pool[2] : zcsecretkey, pool[3] : zcsecretkey},
|
||||
{zcaddress:(39.9*2)-0.1},
|
||||
0, 0.1)
|
||||
{zcaddress:(39.99*2)-0.01},
|
||||
0, 0.01)
|
||||
|
||||
# Create joinsplit {A, D}->{*}
|
||||
joinsplit_AD = self.nodes[0].zcrawjoinsplit(blank_tx,
|
||||
{pool[0] : zcsecretkey, pool[3] : zcsecretkey},
|
||||
{zcaddress:(39.9*2)-0.1},
|
||||
0, 0.1)
|
||||
{zcaddress:(39.99*2)-0.01},
|
||||
0, 0.01)
|
||||
|
||||
# (a) Node 0 will spend joinsplit AB, then attempt to
|
||||
# double-spend it with BC. It should fail before and
|
||||
|
|
|
@ -8,6 +8,16 @@ function zcash_rpc {
|
|||
./src/zcash-cli -datadir="$DATADIR" -rpcwait -rpcuser=user -rpcpassword=password -rpcport=5983 "$@"
|
||||
}
|
||||
|
||||
function zcash_rpc_slow {
|
||||
# Timeout of 1 hour
|
||||
./src/zcash-cli -datadir="$DATADIR" -rpcwait -rpcuser=user -rpcpassword=password -rpcport=5983 -rpcclienttimeout=3600 "$@"
|
||||
}
|
||||
|
||||
function zcash_rpc_veryslow {
|
||||
# Timeout of 2.5 hours
|
||||
./src/zcash-cli -datadir="$DATADIR" -rpcwait -rpcuser=user -rpcpassword=password -rpcport=5983 -rpcclienttimeout=9000 "$@"
|
||||
}
|
||||
|
||||
function zcashd_generate {
|
||||
zcash_rpc generate 101 > /dev/null
|
||||
}
|
||||
|
@ -83,7 +93,7 @@ case "$1" in
|
|||
zcash_rpc zcbenchmark verifyjoinsplit 1000 "\"$RAWJOINSPLIT\""
|
||||
;;
|
||||
solveequihash)
|
||||
zcash_rpc zcbenchmark solveequihash 50 "${@:3}"
|
||||
zcash_rpc_slow zcbenchmark solveequihash 50 "${@:3}"
|
||||
;;
|
||||
verifyequihash)
|
||||
zcash_rpc zcbenchmark verifyequihash 1000
|
||||
|
@ -114,13 +124,13 @@ case "$1" in
|
|||
zcash_rpc zcbenchmark parameterloading 1
|
||||
;;
|
||||
createjoinsplit)
|
||||
zcash_rpc zcbenchmark createjoinsplit 1 "${@:3}"
|
||||
zcash_rpc_slow zcbenchmark createjoinsplit 1 "${@:3}"
|
||||
;;
|
||||
verifyjoinsplit)
|
||||
zcash_rpc zcbenchmark verifyjoinsplit 1 "\"$RAWJOINSPLIT\""
|
||||
;;
|
||||
solveequihash)
|
||||
zcash_rpc zcbenchmark solveequihash 1 "${@:3}"
|
||||
zcash_rpc_slow zcbenchmark solveequihash 1 "${@:3}"
|
||||
;;
|
||||
verifyequihash)
|
||||
zcash_rpc zcbenchmark verifyequihash 1
|
||||
|
@ -149,13 +159,13 @@ case "$1" in
|
|||
zcash_rpc zcbenchmark parameterloading 1
|
||||
;;
|
||||
createjoinsplit)
|
||||
zcash_rpc zcbenchmark createjoinsplit 1 "${@:3}"
|
||||
zcash_rpc_veryslow zcbenchmark createjoinsplit 1 "${@:3}"
|
||||
;;
|
||||
verifyjoinsplit)
|
||||
zcash_rpc zcbenchmark verifyjoinsplit 1 "\"$RAWJOINSPLIT\""
|
||||
;;
|
||||
solveequihash)
|
||||
zcash_rpc zcbenchmark solveequihash 1 "${@:3}"
|
||||
zcash_rpc_veryslow zcbenchmark solveequihash 1 "${@:3}"
|
||||
;;
|
||||
verifyequihash)
|
||||
zcash_rpc zcbenchmark verifyequihash 1
|
||||
|
|
|
@ -1,106 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.7.0</string>
|
||||
|
||||
<key>LSArchitecturePriority</key>
|
||||
<array>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>bitcoin.icns</string>
|
||||
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>@CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@, Copyright © 2009-@COPYRIGHT_YEAR@ The Bitcoin Core developers</string>
|
||||
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@</string>
|
||||
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@</string>
|
||||
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Bitcoin-Qt</string>
|
||||
|
||||
<key>CFBundleName</key>
|
||||
<string>Bitcoin-Qt</string>
|
||||
|
||||
<key>LSHasLocalizedDisplayName</key>
|
||||
<true/>
|
||||
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.bitcoinfoundation.Bitcoin-Qt</string>
|
||||
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>org.bitcoin.BitcoinPayment</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>bitcoin</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
|
||||
<key>UTExportedTypeDeclarations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>org.bitcoin.paymentrequest</string>
|
||||
<key>UTTypeDescription</key>
|
||||
<string>Bitcoin payment request</string>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>public.data</string>
|
||||
</array>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>public.mime-type</key>
|
||||
<string>application/x-bitcoin-payment-request</string>
|
||||
<key>public.filename-extension</key>
|
||||
<array>
|
||||
<string>bitcoinpaymentrequest</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>org.bitcoin.paymentrequest</string>
|
||||
</array>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Owner</string>
|
||||
</dict>
|
||||
</array>
|
||||
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<string>True</string>
|
||||
|
||||
<key>LSAppNapIsDisabled</key>
|
||||
<string>True</string>
|
||||
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.finance</string>
|
||||
</dict>
|
||||
</plist>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue