mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Change branding from bitcoin to elements
This commit is contained in:
parent
ade539cbb4
commit
e1cd00cc6c
39 changed files with 220 additions and 215 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
|
@ -1,10 +1,10 @@
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
|
|
||||||
*.exe
|
*.exe
|
||||||
src/bitcoin
|
src/elements
|
||||||
src/bitcoind
|
src/elementsd
|
||||||
src/bitcoin-cli
|
src/elements-cli
|
||||||
src/bitcoin-tx
|
src/elements-tx
|
||||||
src/test/test_bitcoin
|
src/test/test_bitcoin
|
||||||
src/test/test_bitcoin_fuzzy
|
src/test/test_bitcoin_fuzzy
|
||||||
src/qt/test/test_bitcoin-qt
|
src/qt/test/test_bitcoin-qt
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ test/lint/check-doc.py
|
||||||
test/lint/check-rpc-mappings.py .
|
test/lint/check-rpc-mappings.py .
|
||||||
test/lint/lint-all.sh
|
test/lint/lint-all.sh
|
||||||
|
|
||||||
if [ "$TRAVIS_REPO_SLUG" = "bitcoin/bitcoin" -a "$TRAVIS_EVENT_TYPE" = "cron" ]; then
|
if [ "$TRAVIS_REPO_SLUG" = "ElementsProject/elements" -a "$TRAVIS_EVENT_TYPE" = "cron" ]; then
|
||||||
while read -r LINE; do travis_retry gpg --keyserver hkp://subset.pool.sks-keyservers.net --recv-keys $LINE; done < contrib/verify-commits/trusted-keys &&
|
while read -r LINE; do travis_retry gpg --keyserver hkp://subset.pool.sks-keyservers.net --recv-keys $LINE; done < contrib/verify-commits/trusted-keys &&
|
||||||
travis_wait 50 contrib/verify-commits/verify-commits.py;
|
travis_wait 50 contrib/verify-commits/verify-commits.py;
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
export LC_ALL=C.UTF-8
|
export LC_ALL=C.UTF-8
|
||||||
|
|
||||||
DOCKER_EXEC echo \> \$HOME/.bitcoin # Make sure default datadir does not exist and is never read by creating a dummy file
|
DOCKER_EXEC echo \> \$HOME/.elements # Make sure default datadir does not exist and is never read by creating a dummy file
|
||||||
|
|
||||||
mkdir -p depends/SDKs depends/sdk-sources
|
mkdir -p depends/SDKs depends/sdk-sources
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ BEGIN_FOLD distdir
|
||||||
DOCKER_EXEC make distdir VERSION=$HOST
|
DOCKER_EXEC make distdir VERSION=$HOST
|
||||||
END_FOLD
|
END_FOLD
|
||||||
|
|
||||||
cd "bitcoin-$HOST" || (echo "could not enter distdir bitcoin-$HOST"; exit 1)
|
cd "elements-$HOST" || (echo "could not enter distdir elemenst-$HOST"; exit 1)
|
||||||
|
|
||||||
BEGIN_FOLD configure
|
BEGIN_FOLD configure
|
||||||
DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
|
DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
|
||||||
|
|
|
||||||
10
configure.ac
10
configure.ac
|
|
@ -7,17 +7,17 @@ define(_CLIENT_VERSION_BUILD, 0)
|
||||||
define(_CLIENT_VERSION_IS_RELEASE, true)
|
define(_CLIENT_VERSION_IS_RELEASE, true)
|
||||||
define(_COPYRIGHT_YEAR, 2018)
|
define(_COPYRIGHT_YEAR, 2018)
|
||||||
define(_COPYRIGHT_HOLDERS,[The %s developers])
|
define(_COPYRIGHT_HOLDERS,[The %s developers])
|
||||||
define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitcoin Core]])
|
define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Elements Project]])
|
||||||
AC_INIT([Bitcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/bitcoin/bitcoin/issues],[bitcoin],[https://bitcoincore.org/])
|
AC_INIT([Elements Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/ElementsProject/elements/issues],[elements],[https://elementsproject.org/])
|
||||||
AC_CONFIG_SRCDIR([src/validation.cpp])
|
AC_CONFIG_SRCDIR([src/validation.cpp])
|
||||||
AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
|
AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
|
||||||
AC_CONFIG_AUX_DIR([build-aux])
|
AC_CONFIG_AUX_DIR([build-aux])
|
||||||
AC_CONFIG_MACRO_DIR([build-aux/m4])
|
AC_CONFIG_MACRO_DIR([build-aux/m4])
|
||||||
|
|
||||||
BITCOIN_DAEMON_NAME=bitcoind
|
BITCOIN_DAEMON_NAME=elementsd
|
||||||
BITCOIN_GUI_NAME=bitcoin-qt
|
BITCOIN_GUI_NAME=bitcoin-qt
|
||||||
BITCOIN_CLI_NAME=bitcoin-cli
|
BITCOIN_CLI_NAME=elements-cli
|
||||||
BITCOIN_TX_NAME=bitcoin-tx
|
BITCOIN_TX_NAME=elements-tx
|
||||||
|
|
||||||
dnl Unless the user specified ARFLAGS, force it to be cr
|
dnl Unless the user specified ARFLAGS, force it to be cr
|
||||||
AC_ARG_VAR(ARFLAGS, [Flags for the archiver, defaults to <cr> if not set])
|
AC_ARG_VAR(ARFLAGS, [Flags for the archiver, defaults to <cr> if not set])
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ _bitcoin_cli() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
} &&
|
} &&
|
||||||
complete -F _bitcoin_cli bitcoin-cli
|
complete -F _bitcoin_cli elements-cli
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
# mode: shell-script
|
# mode: shell-script
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ _bitcoin_tx() {
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
} &&
|
} &&
|
||||||
complete -F _bitcoin_tx bitcoin-tx
|
complete -F _bitcoin_tx elements-tx
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
# mode: shell-script
|
# mode: shell-script
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ _bitcoind() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
} &&
|
} &&
|
||||||
complete -F _bitcoind bitcoind bitcoin-qt
|
complete -F _bitcoind elementsd bitcoin-qt
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
# mode: shell-script
|
# mode: shell-script
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,9 @@ BUILDDIR=${BUILDDIR:-$TOPDIR}
|
||||||
BINDIR=${BINDIR:-$BUILDDIR/src}
|
BINDIR=${BINDIR:-$BUILDDIR/src}
|
||||||
MANDIR=${MANDIR:-$TOPDIR/doc/man}
|
MANDIR=${MANDIR:-$TOPDIR/doc/man}
|
||||||
|
|
||||||
BITCOIND=${BITCOIND:-$BINDIR/bitcoind}
|
BITCOIND=${BITCOIND:-$BINDIR/elementsd}
|
||||||
BITCOINCLI=${BITCOINCLI:-$BINDIR/bitcoin-cli}
|
BITCOINCLI=${BITCOINCLI:-$BINDIR/elements-cli}
|
||||||
BITCOINTX=${BITCOINTX:-$BINDIR/bitcoin-tx}
|
BITCOINTX=${BITCOINTX:-$BINDIR/elements-tx}
|
||||||
BITCOINQT=${BITCOINQT:-$BINDIR/qt/bitcoin-qt}
|
BITCOINQT=${BITCOINQT:-$BINDIR/qt/bitcoin-qt}
|
||||||
|
|
||||||
[ ! -x $BITCOIND ] && echo "$BITCOIND not found or not executable." && exit 1
|
[ ! -x $BITCOIND ] && echo "$BITCOIND not found or not executable." && exit 1
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
name: "bitcoin-linux-0.18"
|
name: "elements-linux-0.18"
|
||||||
enable_cache: true
|
enable_cache: true
|
||||||
suites:
|
suites:
|
||||||
- "bionic"
|
- "bionic"
|
||||||
|
|
@ -32,8 +32,8 @@ packages:
|
||||||
- "ca-certificates"
|
- "ca-certificates"
|
||||||
- "python"
|
- "python"
|
||||||
remotes:
|
remotes:
|
||||||
- "url": "https://github.com/bitcoin/bitcoin.git"
|
- "url": "https://github.com/ElementsProject/elements.git"
|
||||||
"dir": "bitcoin"
|
"dir": "elements"
|
||||||
files: []
|
files: []
|
||||||
script: |
|
script: |
|
||||||
|
|
||||||
|
|
@ -121,7 +121,7 @@ script: |
|
||||||
chmod +x ${WRAP_DIR}/${prog}
|
chmod +x ${WRAP_DIR}/${prog}
|
||||||
done
|
done
|
||||||
|
|
||||||
cd bitcoin
|
cd elements
|
||||||
BASEPREFIX=`pwd`/depends
|
BASEPREFIX=`pwd`/depends
|
||||||
# Build dependencies for each host
|
# Build dependencies for each host
|
||||||
for i in $HOSTS; do
|
for i in $HOSTS; do
|
||||||
|
|
@ -143,13 +143,13 @@ script: |
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
|
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
|
||||||
make dist
|
make dist
|
||||||
SOURCEDIST=`echo bitcoin-*.tar.gz`
|
SOURCEDIST=`echo elements-*.tar.gz`
|
||||||
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
|
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
|
||||||
# Correct tar file order
|
# Correct tar file order
|
||||||
mkdir -p temp
|
mkdir -p temp
|
||||||
pushd temp
|
pushd temp
|
||||||
tar xf ../$SOURCEDIST
|
tar xf ../$SOURCEDIST
|
||||||
find bitcoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
|
find elements-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Workaround for tarball not building with the bare tag version (prep)
|
# Workaround for tarball not building with the bare tag version (prep)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
name: "bitcoin-osx-0.18"
|
name: "elements-osx-0.18"
|
||||||
enable_cache: true
|
enable_cache: true
|
||||||
suites:
|
suites:
|
||||||
- "bionic"
|
- "bionic"
|
||||||
|
|
@ -28,8 +28,8 @@ packages:
|
||||||
- "python-setuptools"
|
- "python-setuptools"
|
||||||
- "fonts-tuffy"
|
- "fonts-tuffy"
|
||||||
remotes:
|
remotes:
|
||||||
- "url": "https://github.com/bitcoin/bitcoin.git"
|
- "url": "https://github.com/ElementsProject/elements.git"
|
||||||
"dir": "bitcoin"
|
"dir": "elements"
|
||||||
files:
|
files:
|
||||||
- "MacOSX10.11.sdk.tar.gz"
|
- "MacOSX10.11.sdk.tar.gz"
|
||||||
script: |
|
script: |
|
||||||
|
|
@ -84,7 +84,7 @@ script: |
|
||||||
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
|
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
|
||||||
export PATH=${WRAP_DIR}:${PATH}
|
export PATH=${WRAP_DIR}:${PATH}
|
||||||
|
|
||||||
cd bitcoin
|
cd elements
|
||||||
BASEPREFIX=`pwd`/depends
|
BASEPREFIX=`pwd`/depends
|
||||||
|
|
||||||
mkdir -p ${BASEPREFIX}/SDKs
|
mkdir -p ${BASEPREFIX}/SDKs
|
||||||
|
|
@ -105,14 +105,14 @@ script: |
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
|
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
|
||||||
make dist
|
make dist
|
||||||
SOURCEDIST=`echo bitcoin-*.tar.gz`
|
SOURCEDIST=`echo elements-*.tar.gz`
|
||||||
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
|
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
|
||||||
|
|
||||||
# Correct tar file order
|
# Correct tar file order
|
||||||
mkdir -p temp
|
mkdir -p temp
|
||||||
pushd temp
|
pushd temp
|
||||||
tar xf ../$SOURCEDIST
|
tar xf ../$SOURCEDIST
|
||||||
find bitcoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
|
find elements-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Workaround for tarball not building with the bare tag version (prep)
|
# Workaround for tarball not building with the bare tag version (prep)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
name: "bitcoin-win-0.18"
|
name: "elements-win-0.18"
|
||||||
enable_cache: true
|
enable_cache: true
|
||||||
suites:
|
suites:
|
||||||
- "bionic"
|
- "bionic"
|
||||||
|
|
@ -23,8 +23,8 @@ packages:
|
||||||
- "python"
|
- "python"
|
||||||
- "rename"
|
- "rename"
|
||||||
remotes:
|
remotes:
|
||||||
- "url": "https://github.com/bitcoin/bitcoin.git"
|
- "url": "https://github.com/ElementsProject/elements.git"
|
||||||
"dir": "bitcoin"
|
"dir": "elements"
|
||||||
files: []
|
files: []
|
||||||
script: |
|
script: |
|
||||||
WRAP_DIR=$HOME/wrapped
|
WRAP_DIR=$HOME/wrapped
|
||||||
|
|
@ -103,7 +103,7 @@ script: |
|
||||||
create_per-host_linker_wrapper "2000-01-01 12:00:00"
|
create_per-host_linker_wrapper "2000-01-01 12:00:00"
|
||||||
export PATH=${WRAP_DIR}:${PATH}
|
export PATH=${WRAP_DIR}:${PATH}
|
||||||
|
|
||||||
cd bitcoin
|
cd elements
|
||||||
BASEPREFIX=`pwd`/depends
|
BASEPREFIX=`pwd`/depends
|
||||||
# Build dependencies for each host
|
# Build dependencies for each host
|
||||||
for i in $HOSTS; do
|
for i in $HOSTS; do
|
||||||
|
|
@ -121,14 +121,14 @@ script: |
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
|
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
|
||||||
make dist
|
make dist
|
||||||
SOURCEDIST=`echo bitcoin-*.tar.gz`
|
SOURCEDIST=`echo elements-*.tar.gz`
|
||||||
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
|
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
|
||||||
|
|
||||||
# Correct tar file order
|
# Correct tar file order
|
||||||
mkdir -p temp
|
mkdir -p temp
|
||||||
pushd temp
|
pushd temp
|
||||||
tar xf ../$SOURCEDIST
|
tar xf ../$SOURCEDIST
|
||||||
find bitcoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
|
find elements-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
|
||||||
mkdir -p $OUTDIR/src
|
mkdir -p $OUTDIR/src
|
||||||
cp ../$SOURCEDIST $OUTDIR/src
|
cp ../$SOURCEDIST $OUTDIR/src
|
||||||
popd
|
popd
|
||||||
|
|
@ -157,7 +157,7 @@ script: |
|
||||||
make deploy
|
make deploy
|
||||||
make install DESTDIR=${INSTALLPATH}
|
make install DESTDIR=${INSTALLPATH}
|
||||||
rename 's/-setup\.exe$/-setup-unsigned.exe/' *-setup.exe
|
rename 's/-setup\.exe$/-setup-unsigned.exe/' *-setup.exe
|
||||||
cp -f bitcoin-*setup*.exe $OUTDIR/
|
cp -f elements-*setup*.exe $OUTDIR/
|
||||||
cd installed
|
cd installed
|
||||||
mv ${DISTNAME}/bin/*.dll ${DISTNAME}/lib/
|
mv ${DISTNAME}/bin/*.dll ${DISTNAME}/lib/
|
||||||
find . -name "lib*.la" -delete
|
find . -name "lib*.la" -delete
|
||||||
|
|
@ -173,7 +173,7 @@ script: |
|
||||||
cp -rf contrib/windeploy $BUILD_DIR
|
cp -rf contrib/windeploy $BUILD_DIR
|
||||||
cd $BUILD_DIR/windeploy
|
cd $BUILD_DIR/windeploy
|
||||||
mkdir unsigned
|
mkdir unsigned
|
||||||
cp $OUTDIR/bitcoin-*setup-unsigned.exe unsigned/
|
cp $OUTDIR/elements-*setup-unsigned.exe unsigned/
|
||||||
find . | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz
|
find . | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz
|
||||||
mv ${OUTDIR}/${DISTNAME}-x86_64-*-debug.zip ${OUTDIR}/${DISTNAME}-win64-debug.zip
|
mv ${OUTDIR}/${DISTNAME}-x86_64-*-debug.zip ${OUTDIR}/${DISTNAME}-win64-debug.zip
|
||||||
mv ${OUTDIR}/${DISTNAME}-i686-*-debug.zip ${OUTDIR}/${DISTNAME}-win32-debug.zip
|
mv ${OUTDIR}/${DISTNAME}-i686-*-debug.zip ${OUTDIR}/${DISTNAME}-win32-debug.zip
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ The following are some helpful notes on how to run Bitcoin Core on your native p
|
||||||
|
|
||||||
Unpack the files into a directory and run:
|
Unpack the files into a directory and run:
|
||||||
|
|
||||||
- `bin/bitcoin-qt` (GUI) or
|
- `bin/elementsd` (headless)
|
||||||
- `bin/bitcoind` (headless)
|
- `bin/elements-qt` (GUI) (currently not provided)
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ Mining is also possible in disable-wallet mode using the `getblocktemplate` RPC
|
||||||
Running
|
Running
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Bitcoin Core is now available at `./src/bitcoind`
|
Bitcoin Core is now available at `./src/elementsd`
|
||||||
|
|
||||||
Before running, it's recommended that you create an RPC configuration file.
|
Before running, it's recommended that you create an RPC configuration file.
|
||||||
|
|
||||||
|
|
@ -86,7 +86,7 @@ Before running, it's recommended that you create an RPC configuration file.
|
||||||
|
|
||||||
chmod 600 "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
|
chmod 600 "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
|
||||||
|
|
||||||
The first time you run bitcoind, it will start downloading the blockchain. This process could take several hours.
|
The first time you run the daemon, it will start downloading the blockchain. This process could take several hours.
|
||||||
|
|
||||||
You can monitor the download process by looking at the debug.log file:
|
You can monitor the download process by looking at the debug.log file:
|
||||||
|
|
||||||
|
|
@ -95,9 +95,9 @@ You can monitor the download process by looking at the debug.log file:
|
||||||
Other commands:
|
Other commands:
|
||||||
-------
|
-------
|
||||||
|
|
||||||
./src/bitcoind -daemon # Starts the bitcoin daemon.
|
./src/elementsd -daemon # Starts the bitcoin daemon.
|
||||||
./src/bitcoin-cli --help # Outputs a list of command-line options.
|
./src/elements-cli --help # Outputs a list of command-line options.
|
||||||
./src/bitcoin-cli help # Outputs a list of RPC commands when the daemon is running.
|
./src/elements-cli help # Outputs a list of RPC commands when the daemon is running.
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
-----
|
-----
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ libqrencode (optional) can be installed with:
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
-----
|
-----
|
||||||
The release is built with GCC and then "strip bitcoind" to strip the debug
|
The release is built with GCC and then "strip elementsd" to strip the debug
|
||||||
symbols, which reduces the executable size by about 90%.
|
symbols, which reduces the executable size by about 90%.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ if ENABLE_ZMQ
|
||||||
LIBBITCOIN_ZMQ=libbitcoin_zmq.a
|
LIBBITCOIN_ZMQ=libbitcoin_zmq.a
|
||||||
endif
|
endif
|
||||||
if BUILD_BITCOIN_LIBS
|
if BUILD_BITCOIN_LIBS
|
||||||
LIBBITCOINCONSENSUS=libbitcoinconsensus.la
|
LIBBITCOINCONSENSUS=libelementsconsensus.la
|
||||||
endif
|
endif
|
||||||
if ENABLE_WALLET
|
if ENABLE_WALLET
|
||||||
LIBBITCOIN_WALLET=libbitcoin_wallet.a
|
LIBBITCOIN_WALLET=libbitcoin_wallet.a
|
||||||
|
|
@ -80,11 +80,11 @@ TESTS =
|
||||||
BENCHMARKS =
|
BENCHMARKS =
|
||||||
|
|
||||||
if BUILD_BITCOIND
|
if BUILD_BITCOIND
|
||||||
bin_PROGRAMS += bitcoind
|
bin_PROGRAMS += elementsd
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if BUILD_BITCOIN_UTILS
|
if BUILD_BITCOIN_UTILS
|
||||||
bin_PROGRAMS += bitcoin-cli bitcoin-tx
|
bin_PROGRAMS += elements-cli elements-tx
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: FORCE check-symbols check-security
|
.PHONY: FORCE check-symbols check-security
|
||||||
|
|
@ -480,16 +480,16 @@ nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
|
||||||
#
|
#
|
||||||
|
|
||||||
# bitcoind binary #
|
# bitcoind binary #
|
||||||
bitcoind_SOURCES = bitcoind.cpp
|
elementsd_SOURCES = bitcoind.cpp
|
||||||
bitcoind_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
elementsd_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
||||||
bitcoind_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
elementsd_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
||||||
bitcoind_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
elementsd_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
||||||
|
|
||||||
if TARGET_WINDOWS
|
if TARGET_WINDOWS
|
||||||
bitcoind_SOURCES += bitcoind-res.rc
|
elementsd_SOURCES += bitcoind-res.rc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
bitcoind_LDADD = \
|
elementsd_LDADD = \
|
||||||
$(LIBBITCOIN_SERVER) \
|
$(LIBBITCOIN_SERVER) \
|
||||||
$(LIBBITCOIN_WALLET) \
|
$(LIBBITCOIN_WALLET) \
|
||||||
$(LIBBITCOIN_COMMON) \
|
$(LIBBITCOIN_COMMON) \
|
||||||
|
|
@ -503,38 +503,38 @@ bitcoind_LDADD = \
|
||||||
$(LIBMEMENV) \
|
$(LIBMEMENV) \
|
||||||
$(LIBSECP256K1)
|
$(LIBSECP256K1)
|
||||||
|
|
||||||
bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(ZMQ_LIBS)
|
elementsd_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(ZMQ_LIBS)
|
||||||
|
|
||||||
# bitcoin-cli binary #
|
# bitcoin-cli binary #
|
||||||
bitcoin_cli_SOURCES = bitcoin-cli.cpp
|
elements_cli_SOURCES = bitcoin-cli.cpp
|
||||||
bitcoin_cli_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS)
|
elements_cli_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS)
|
||||||
bitcoin_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
elements_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
||||||
bitcoin_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
elements_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
||||||
|
|
||||||
if TARGET_WINDOWS
|
if TARGET_WINDOWS
|
||||||
bitcoin_cli_SOURCES += bitcoin-cli-res.rc
|
elements_cli_SOURCES += bitcoin-cli-res.rc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
bitcoin_cli_LDADD = \
|
elements_cli_LDADD = \
|
||||||
$(LIBBITCOIN_CLI) \
|
$(LIBBITCOIN_CLI) \
|
||||||
$(LIBUNIVALUE) \
|
$(LIBUNIVALUE) \
|
||||||
$(LIBBITCOIN_UTIL) \
|
$(LIBBITCOIN_UTIL) \
|
||||||
$(LIBBITCOIN_CRYPTO)
|
$(LIBBITCOIN_CRYPTO)
|
||||||
|
|
||||||
bitcoin_cli_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS) $(EVENT_LIBS)
|
elements_cli_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS) $(EVENT_LIBS)
|
||||||
#
|
#
|
||||||
|
|
||||||
# bitcoin-tx binary #
|
# bitcoin-tx binary #
|
||||||
bitcoin_tx_SOURCES = bitcoin-tx.cpp
|
elements_tx_SOURCES = bitcoin-tx.cpp
|
||||||
bitcoin_tx_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
elements_tx_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
||||||
bitcoin_tx_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
elements_tx_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
||||||
bitcoin_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
elements_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
||||||
|
|
||||||
if TARGET_WINDOWS
|
if TARGET_WINDOWS
|
||||||
bitcoin_tx_SOURCES += bitcoin-tx-res.rc
|
elements_tx_SOURCES += bitcoin-tx-res.rc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
bitcoin_tx_LDADD = \
|
elements_tx_LDADD = \
|
||||||
$(LIBUNIVALUE) \
|
$(LIBUNIVALUE) \
|
||||||
$(LIBBITCOIN_COMMON) \
|
$(LIBBITCOIN_COMMON) \
|
||||||
$(LIBBITCOIN_UTIL) \
|
$(LIBBITCOIN_UTIL) \
|
||||||
|
|
@ -542,22 +542,22 @@ bitcoin_tx_LDADD = \
|
||||||
$(LIBBITCOIN_CRYPTO) \
|
$(LIBBITCOIN_CRYPTO) \
|
||||||
$(LIBSECP256K1)
|
$(LIBSECP256K1)
|
||||||
|
|
||||||
bitcoin_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS)
|
elements_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS)
|
||||||
#
|
#
|
||||||
|
|
||||||
# bitcoinconsensus library #
|
# bitcoinconsensus library #
|
||||||
if BUILD_BITCOIN_LIBS
|
if BUILD_BITCOIN_LIBS
|
||||||
include_HEADERS = script/bitcoinconsensus.h
|
include_HEADERS = script/bitcoinconsensus.h
|
||||||
libbitcoinconsensus_la_SOURCES = $(crypto_libbitcoin_crypto_base_a_SOURCES) $(libbitcoin_consensus_a_SOURCES)
|
libelementsconsensus_la_SOURCES = $(crypto_libbitcoin_crypto_base_a_SOURCES) $(libbitcoin_consensus_a_SOURCES)
|
||||||
|
|
||||||
if GLIBC_BACK_COMPAT
|
if GLIBC_BACK_COMPAT
|
||||||
libbitcoinconsensus_la_SOURCES += compat/glibc_compat.cpp
|
libelementsconsensus_la_SOURCES += compat/glibc_compat.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libbitcoinconsensus_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS)
|
libelementsconsensus_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS)
|
||||||
libbitcoinconsensus_la_LIBADD = $(LIBSECP256K1)
|
libelementsconsensus_la_LIBADD = $(LIBSECP256K1)
|
||||||
libbitcoinconsensus_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include -DBUILD_BITCOIN_INTERNAL
|
libelementsconsensus_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include -DBUILD_BITCOIN_INTERNAL
|
||||||
libbitcoinconsensus_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
libelementsconsensus_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,14 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "040904E4" // U.S. English - multilingual (hex)
|
BLOCK "040904E4" // U.S. English - multilingual (hex)
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Bitcoin"
|
VALUE "CompanyName", "Elements Project"
|
||||||
VALUE "FileDescription", "bitcoin-cli (JSON-RPC client for " PACKAGE_NAME ")"
|
VALUE "FileDescription", "elements-cli (JSON-RPC client for " PACKAGE_NAME ")"
|
||||||
VALUE "FileVersion", VER_FILEVERSION_STR
|
VALUE "FileVersion", VER_FILEVERSION_STR
|
||||||
VALUE "InternalName", "bitcoin-cli"
|
VALUE "InternalName", "elements-cli"
|
||||||
VALUE "LegalCopyright", COPYRIGHT_STR
|
VALUE "LegalCopyright", COPYRIGHT_STR
|
||||||
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
|
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
|
||||||
VALUE "OriginalFilename", "bitcoin-cli.exe"
|
VALUE "OriginalFilename", "elements-cli.exe"
|
||||||
VALUE "ProductName", "bitcoin-cli"
|
VALUE "ProductName", "elements-cli"
|
||||||
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
|
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ static void SetupCliArgs()
|
||||||
gArgs.AddArg("-rpcport=<port>", strprintf("Connect to JSON-RPC on <port> (default: %u, testnet: %u, regtest: %u)", defaultBaseParams->RPCPort(), testnetBaseParams->RPCPort(), regtestBaseParams->RPCPort()), false, OptionsCategory::OPTIONS);
|
gArgs.AddArg("-rpcport=<port>", strprintf("Connect to JSON-RPC on <port> (default: %u, testnet: %u, regtest: %u)", defaultBaseParams->RPCPort(), testnetBaseParams->RPCPort(), regtestBaseParams->RPCPort()), false, OptionsCategory::OPTIONS);
|
||||||
gArgs.AddArg("-rpcuser=<user>", "Username for JSON-RPC connections", false, OptionsCategory::OPTIONS);
|
gArgs.AddArg("-rpcuser=<user>", "Username for JSON-RPC connections", false, OptionsCategory::OPTIONS);
|
||||||
gArgs.AddArg("-rpcwait", "Wait for RPC server to start", false, OptionsCategory::OPTIONS);
|
gArgs.AddArg("-rpcwait", "Wait for RPC server to start", false, OptionsCategory::OPTIONS);
|
||||||
gArgs.AddArg("-rpcwallet=<walletname>", "Send RPC for non-default wallet on RPC server (needs to exactly match corresponding -wallet option passed to bitcoind)", false, OptionsCategory::OPTIONS);
|
gArgs.AddArg("-rpcwallet=<walletname>", "Send RPC for non-default wallet on RPC server (needs to exactly match corresponding -wallet option passed to the daemon)", false, OptionsCategory::OPTIONS);
|
||||||
gArgs.AddArg("-stdin", "Read extra arguments from standard input, one per line until EOF/Ctrl-D (recommended for sensitive information such as passphrases). When combined with -stdinrpcpass, the first line from standard input is used for the RPC password.", false, OptionsCategory::OPTIONS);
|
gArgs.AddArg("-stdin", "Read extra arguments from standard input, one per line until EOF/Ctrl-D (recommended for sensitive information such as passphrases). When combined with -stdinrpcpass, the first line from standard input is used for the RPC password.", false, OptionsCategory::OPTIONS);
|
||||||
gArgs.AddArg("-stdinrpcpass", "Read RPC password from standard input as a single line. When combined with -stdin, the first line from standard input is used for the RPC password.", false, OptionsCategory::OPTIONS);
|
gArgs.AddArg("-stdinrpcpass", "Read RPC password from standard input as a single line. When combined with -stdin, the first line from standard input is used for the RPC password.", false, OptionsCategory::OPTIONS);
|
||||||
|
|
||||||
|
|
@ -110,10 +110,10 @@ static int AppInitRPC(int argc, char* argv[])
|
||||||
std::string strUsage = PACKAGE_NAME " RPC client version " + FormatFullVersion() + "\n";
|
std::string strUsage = PACKAGE_NAME " RPC client version " + FormatFullVersion() + "\n";
|
||||||
if (!gArgs.IsArgSet("-version")) {
|
if (!gArgs.IsArgSet("-version")) {
|
||||||
strUsage += "\n"
|
strUsage += "\n"
|
||||||
"Usage: bitcoin-cli [options] <command> [params] Send command to " PACKAGE_NAME "\n"
|
"Usage: elements-cli [options] <command> [params] Send command to " PACKAGE_NAME "\n"
|
||||||
"or: bitcoin-cli [options] -named <command> [name=value]... Send command to " PACKAGE_NAME " (with named arguments)\n"
|
"or: elements-cli [options] -named <command> [name=value]... Send command to " PACKAGE_NAME " (with named arguments)\n"
|
||||||
"or: bitcoin-cli [options] help List commands\n"
|
"or: elements-cli [options] help List commands\n"
|
||||||
"or: bitcoin-cli [options] help <command> Get help for a command\n";
|
"or: elements-cli [options] help <command> Get help for a command\n";
|
||||||
strUsage += "\n" + gArgs.GetHelpMessage();
|
strUsage += "\n" + gArgs.GetHelpMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -382,7 +382,7 @@ static UniValue CallRPC(BaseRequestHandler *rh, const std::string& strMethod, co
|
||||||
if (response.error != -1) {
|
if (response.error != -1) {
|
||||||
responseErrorMessage = strprintf(" (error code %d - \"%s\")", response.error, http_errorstring(response.error));
|
responseErrorMessage = strprintf(" (error code %d - \"%s\")", response.error, http_errorstring(response.error));
|
||||||
}
|
}
|
||||||
throw CConnectionFailed(strprintf("Could not connect to the server %s:%d%s\n\nMake sure the bitcoind server is running and that you are connecting to the correct RPC port.", host, port, responseErrorMessage));
|
throw CConnectionFailed(strprintf("Could not connect to the server %s:%d%s\n\nMake sure the daemon server is running and that you are connecting to the correct RPC port.", host, port, responseErrorMessage));
|
||||||
} else if (response.status == HTTP_UNAUTHORIZED) {
|
} else if (response.status == HTTP_UNAUTHORIZED) {
|
||||||
if (failedToGetAuthCookie) {
|
if (failedToGetAuthCookie) {
|
||||||
throw std::runtime_error(strprintf(
|
throw std::runtime_error(strprintf(
|
||||||
|
|
@ -473,7 +473,7 @@ static int CommandLineRPC(int argc, char *argv[])
|
||||||
strPrint += "error message:\n"+errMsg.get_str();
|
strPrint += "error message:\n"+errMsg.get_str();
|
||||||
|
|
||||||
if (errCode.isNum() && errCode.get_int() == RPC_WALLET_NOT_SPECIFIED) {
|
if (errCode.isNum() && errCode.get_int() == RPC_WALLET_NOT_SPECIFIED) {
|
||||||
strPrint += "\nTry adding \"-rpcwallet=<filename>\" option to bitcoin-cli command line.";
|
strPrint += "\nTry adding \"-rpcwallet=<filename>\" option to elements-cli command line.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "040904E4" // U.S. English - multilingual (hex)
|
BLOCK "040904E4" // U.S. English - multilingual (hex)
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Bitcoin"
|
VALUE "CompanyName", "Elements Project"
|
||||||
VALUE "FileDescription", "bitcoin-tx (CLI Bitcoin transaction editor utility)"
|
VALUE "FileDescription", "bitcoin-tx (CLI Elements transaction editor utility)"
|
||||||
VALUE "FileVersion", VER_FILEVERSION_STR
|
VALUE "FileVersion", VER_FILEVERSION_STR
|
||||||
VALUE "InternalName", "bitcoin-tx"
|
VALUE "InternalName", "bitcoin-tx"
|
||||||
VALUE "LegalCopyright", COPYRIGHT_STR
|
VALUE "LegalCopyright", COPYRIGHT_STR
|
||||||
|
|
|
||||||
|
|
@ -103,9 +103,9 @@ static int AppInitRawTx(int argc, char* argv[])
|
||||||
|
|
||||||
if (argc < 2 || HelpRequested(gArgs)) {
|
if (argc < 2 || HelpRequested(gArgs)) {
|
||||||
// First part of help message is specific to this utility
|
// First part of help message is specific to this utility
|
||||||
std::string strUsage = PACKAGE_NAME " bitcoin-tx utility version " + FormatFullVersion() + "\n\n" +
|
std::string strUsage = PACKAGE_NAME " elements-tx utility version " + FormatFullVersion() + "\n\n" +
|
||||||
"Usage: bitcoin-tx [options] <hex-tx> [commands] Update hex-encoded bitcoin transaction\n" +
|
"Usage: elements-tx [options] <hex-tx> [commands] Update hex-encoded bitcoin transaction\n" +
|
||||||
"or: bitcoin-tx [options] -create [commands] Create hex-encoded bitcoin transaction\n" +
|
"or: elements-tx [options] -create [commands] Create hex-encoded bitcoin transaction\n" +
|
||||||
"\n";
|
"\n";
|
||||||
strUsage += gArgs.GetHelpMessage();
|
strUsage += gArgs.GetHelpMessage();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,14 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "040904E4" // U.S. English - multilingual (hex)
|
BLOCK "040904E4" // U.S. English - multilingual (hex)
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Bitcoin"
|
VALUE "CompanyName", "Elements Project"
|
||||||
VALUE "FileDescription", "bitcoind (Bitcoin node with a JSON-RPC server)"
|
VALUE "FileDescription", "elementsd (Elements node with a JSON-RPC server)"
|
||||||
VALUE "FileVersion", VER_FILEVERSION_STR
|
VALUE "FileVersion", VER_FILEVERSION_STR
|
||||||
VALUE "InternalName", "bitcoind"
|
VALUE "InternalName", "elementsd"
|
||||||
VALUE "LegalCopyright", COPYRIGHT_STR
|
VALUE "LegalCopyright", COPYRIGHT_STR
|
||||||
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
|
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
|
||||||
VALUE "OriginalFilename", "bitcoind.exe"
|
VALUE "OriginalFilename", "elementsd.exe"
|
||||||
VALUE "ProductName", "bitcoind"
|
VALUE "ProductName", "elementsd"
|
||||||
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
|
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ static bool AppInit(int argc, char* argv[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strUsage += "\nUsage: bitcoind [options] Start " PACKAGE_NAME " Daemon\n";
|
strUsage += "\nUsage: elementsd [options] Start " PACKAGE_NAME " Daemon\n";
|
||||||
strUsage += "\n" + gArgs.GetHelpMessage();
|
strUsage += "\n" + gArgs.GetHelpMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -111,7 +111,7 @@ static bool AppInit(int argc, char* argv[])
|
||||||
// Error out when loose non-argument tokens are encountered on command line
|
// Error out when loose non-argument tokens are encountered on command line
|
||||||
for (int i = 1; i < argc; i++) {
|
for (int i = 1; i < argc; i++) {
|
||||||
if (!IsSwitchChar(argv[i][0])) {
|
if (!IsSwitchChar(argv[i][0])) {
|
||||||
fprintf(stderr, "Error: Command line contains unexpected token '%s', see bitcoind -h for a list of options.\n", argv[i]);
|
fprintf(stderr, "Error: Command line contains unexpected token '%s', see elementsd -h for a list of options.\n", argv[i]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -444,7 +444,7 @@ static UniValue echo(const JSONRPCRequest& request)
|
||||||
"echo|echojson \"message\" ...\n"
|
"echo|echojson \"message\" ...\n"
|
||||||
"\nSimply echo back the input arguments. This command is for testing.\n"
|
"\nSimply echo back the input arguments. This command is for testing.\n"
|
||||||
"\nThe difference between echo and echojson is that echojson has argument conversion enabled in the client-side table in"
|
"\nThe difference between echo and echojson is that echojson has argument conversion enabled in the client-side table in"
|
||||||
"bitcoin-cli and the GUI. There is no server-side difference."
|
"the CLI and the GUI. There is no server-side difference."
|
||||||
);
|
);
|
||||||
|
|
||||||
return request.params;
|
return request.params;
|
||||||
|
|
|
||||||
|
|
@ -1034,7 +1034,7 @@ static UniValue signrawtransactionwithkey(const JSONRPCRequest& request)
|
||||||
" }\n"
|
" }\n"
|
||||||
" ,...\n"
|
" ,...\n"
|
||||||
" ]\n"
|
" ]\n"
|
||||||
" \"warning\" : \"text\" (string) Warning that a peg-in input signed may be immature. This could mean lack of connectivity to or misconfiguration of the bitcoind."
|
" \"warning\" : \"text\" (string) Warning that a peg-in input signed may be immature. This could mean lack of connectivity to or misconfiguration of the daemon."
|
||||||
"}\n"
|
"}\n"
|
||||||
|
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
|
|
|
||||||
|
|
@ -514,7 +514,7 @@ std::vector<std::string> CRPCTable::listCommands() const
|
||||||
|
|
||||||
std::string HelpExampleCli(const std::string& methodname, const std::string& args)
|
std::string HelpExampleCli(const std::string& methodname, const std::string& args)
|
||||||
{
|
{
|
||||||
return "> bitcoin-cli " + methodname + " " + args + "\n";
|
return "> elements-cli " + methodname + " " + args + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string HelpExampleRpc(const std::string& methodname, const std::string& args)
|
std::string HelpExampleRpc(const std::string& methodname, const std::string& args)
|
||||||
|
|
|
||||||
10
src/util.cpp
10
src/util.cpp
|
|
@ -81,8 +81,8 @@
|
||||||
// Application startup time (used for uptime calculation)
|
// Application startup time (used for uptime calculation)
|
||||||
const int64_t nStartupTime = GetTime();
|
const int64_t nStartupTime = GetTime();
|
||||||
|
|
||||||
const char * const BITCOIN_CONF_FILENAME = "bitcoin.conf";
|
const char * const BITCOIN_CONF_FILENAME = "elements.conf";
|
||||||
const char * const BITCOIN_PID_FILENAME = "bitcoind.pid";
|
const char * const BITCOIN_PID_FILENAME = "elementsd.pid";
|
||||||
|
|
||||||
ArgsManager gArgs;
|
ArgsManager gArgs;
|
||||||
|
|
||||||
|
|
@ -712,7 +712,7 @@ fs::path GetDefaultDataDir()
|
||||||
// Unix: ~/.bitcoin
|
// Unix: ~/.bitcoin
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
// Windows
|
// Windows
|
||||||
return GetSpecialFolderPath(CSIDL_APPDATA) / "Bitcoin";
|
return GetSpecialFolderPath(CSIDL_APPDATA) / "Elements";
|
||||||
#else
|
#else
|
||||||
fs::path pathRet;
|
fs::path pathRet;
|
||||||
char* pszHome = getenv("HOME");
|
char* pszHome = getenv("HOME");
|
||||||
|
|
@ -722,10 +722,10 @@ fs::path GetDefaultDataDir()
|
||||||
pathRet = fs::path(pszHome);
|
pathRet = fs::path(pszHome);
|
||||||
#ifdef MAC_OSX
|
#ifdef MAC_OSX
|
||||||
// Mac
|
// Mac
|
||||||
return pathRet / "Library/Application Support/Bitcoin";
|
return pathRet / "Library/Application Support/Elements";
|
||||||
#else
|
#else
|
||||||
// Unix
|
// Unix
|
||||||
return pathRet / ".bitcoin";
|
return pathRet / ".elements";
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -695,7 +695,7 @@ UniValue dumpwallet(const JSONRPCRequest& request)
|
||||||
"Note that if your wallet contains keys which are not derived from your HD seed (e.g. imported keys), these are not covered by\n"
|
"Note that if your wallet contains keys which are not derived from your HD seed (e.g. imported keys), these are not covered by\n"
|
||||||
"only backing up the seed itself, and must be backed up too (e.g. ensure you back up the whole dumpfile).\n"
|
"only backing up the seed itself, and must be backed up too (e.g. ensure you back up the whole dumpfile).\n"
|
||||||
"\nArguments:\n"
|
"\nArguments:\n"
|
||||||
"1. \"filename\" (string, required) The filename with path (either absolute or relative to bitcoind)\n"
|
"1. \"filename\" (string, required) The filename with path (either absolute or relative to the daemon)\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"{ (json object)\n"
|
"{ (json object)\n"
|
||||||
" \"filename\" : { (string) The filename with full absolute path\n"
|
" \"filename\" : { (string) The filename with full absolute path\n"
|
||||||
|
|
@ -1262,7 +1262,7 @@ UniValue importmulti(const JSONRPCRequest& mainRequest)
|
||||||
"block from time %d, which is after or within %d seconds of key creation, and "
|
"block from time %d, which is after or within %d seconds of key creation, and "
|
||||||
"could contain transactions pertaining to the key. As a result, transactions "
|
"could contain transactions pertaining to the key. As a result, transactions "
|
||||||
"and coins using this key may not appear in the wallet. This error could be "
|
"and coins using this key may not appear in the wallet. This error could be "
|
||||||
"caused by pruning or data corruption (see bitcoind log for details) and could "
|
"caused by pruning or data corruption (see daemon log for details) and could "
|
||||||
"be dealt with by downloading and rescanning the relevant blocks (see -reindex "
|
"be dealt with by downloading and rescanning the relevant blocks (see -reindex "
|
||||||
"and -rescan options).",
|
"and -rescan options).",
|
||||||
GetImportTimestamp(request, now), scannedTime - TIMESTAMP_WINDOW - 1, TIMESTAMP_WINDOW)));
|
GetImportTimestamp(request, now), scannedTime - TIMESTAMP_WINDOW - 1, TIMESTAMP_WINDOW)));
|
||||||
|
|
|
||||||
|
|
@ -1214,7 +1214,7 @@ static UniValue addwitnessaddress(const JSONRPCRequest& request)
|
||||||
|
|
||||||
if (!IsDeprecatedRPCEnabled("addwitnessaddress")) {
|
if (!IsDeprecatedRPCEnabled("addwitnessaddress")) {
|
||||||
throw JSONRPCError(RPC_METHOD_DEPRECATED, "addwitnessaddress is deprecated and will be fully removed in v0.17. "
|
throw JSONRPCError(RPC_METHOD_DEPRECATED, "addwitnessaddress is deprecated and will be fully removed in v0.17. "
|
||||||
"To use addwitnessaddress in v0.16, restart bitcoind with -deprecatedrpc=addwitnessaddress.\n"
|
"To use addwitnessaddress in v0.16, restart the daemon with -deprecatedrpc=addwitnessaddress.\n"
|
||||||
"Projects should transition to using the address_type argument of getnewaddress, or option -addresstype=[bech32|p2sh-segwit] instead.\n");
|
"Projects should transition to using the address_type argument of getnewaddress, or option -addresstype=[bech32|p2sh-segwit] instead.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2673,7 +2673,7 @@ static UniValue loadwallet(const JSONRPCRequest& request)
|
||||||
throw std::runtime_error(
|
throw std::runtime_error(
|
||||||
"loadwallet \"filename\"\n"
|
"loadwallet \"filename\"\n"
|
||||||
"\nLoads a wallet from a wallet file or directory."
|
"\nLoads a wallet from a wallet file or directory."
|
||||||
"\nNote that all wallet command-line options used when starting bitcoind will be"
|
"\nNote that all wallet command-line options used when starting the daemon will be"
|
||||||
"\napplied to the new wallet (eg -zapwallettxes, upgradewallet, rescan, etc).\n"
|
"\napplied to the new wallet (eg -zapwallettxes, upgradewallet, rescan, etc).\n"
|
||||||
"\nArguments:\n"
|
"\nArguments:\n"
|
||||||
"1. \"filename\" (string, required) The wallet directory or .dat file.\n"
|
"1. \"filename\" (string, required) The wallet directory or .dat file.\n"
|
||||||
|
|
@ -3347,7 +3347,7 @@ UniValue signrawtransactionwithwallet(const JSONRPCRequest& request)
|
||||||
" }\n"
|
" }\n"
|
||||||
" ,...\n"
|
" ,...\n"
|
||||||
" ]\n"
|
" ]\n"
|
||||||
" \"warning\" : \"text\" (string) Warning that a peg-in input signed may be immature. This could mean lack of connectivity to or misconfiguration of the bitcoind."
|
" \"warning\" : \"text\" (string) Warning that a peg-in input signed may be immature. This could mean lack of connectivity to or misconfiguration of the daemon."
|
||||||
"}\n"
|
"}\n"
|
||||||
|
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ BOOST_FIXTURE_TEST_CASE(rescan, TestChain100Setup)
|
||||||
"timestamp %d. There was an error reading a block from time %d, which is after or within %d "
|
"timestamp %d. There was an error reading a block from time %d, which is after or within %d "
|
||||||
"seconds of key creation, and could contain transactions pertaining to the key. As a result, "
|
"seconds of key creation, and could contain transactions pertaining to the key. As a result, "
|
||||||
"transactions and coins using this key may not appear in the wallet. This error could be caused "
|
"transactions and coins using this key may not appear in the wallet. This error could be caused "
|
||||||
"by pruning or data corruption (see bitcoind log for details) and could be dealt with by "
|
"by pruning or data corruption (see daemon log for details) and could be dealt with by "
|
||||||
"downloading and rescanning the relevant blocks (see -reindex and -rescan "
|
"downloading and rescanning the relevant blocks (see -reindex and -rescan "
|
||||||
"options).\"}},{\"success\":true}]",
|
"options).\"}},{\"success\":true}]",
|
||||||
0, oldTip->GetBlockTimeMax(), TIMESTAMP_WINDOW));
|
0, oldTip->GetBlockTimeMax(), TIMESTAMP_WINDOW));
|
||||||
|
|
|
||||||
|
|
@ -138,8 +138,8 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||||
|
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config.read_file(open(self.options.configfile))
|
config.read_file(open(self.options.configfile))
|
||||||
self.options.bitcoind = os.getenv("BITCOIND", default=config["environment"]["BUILDDIR"] + '/src/bitcoind' + config["environment"]["EXEEXT"])
|
self.options.bitcoind = os.getenv("BITCOIND", default=config["environment"]["BUILDDIR"] + '/src/elementsd' + config["environment"]["EXEEXT"])
|
||||||
self.options.bitcoincli = os.getenv("BITCOINCLI", default=config["environment"]["BUILDDIR"] + '/src/bitcoin-cli' + config["environment"]["EXEEXT"])
|
self.options.bitcoincli = os.getenv("BITCOINCLI", default=config["environment"]["BUILDDIR"] + '/src/elements-cli' + config["environment"]["EXEEXT"])
|
||||||
|
|
||||||
os.environ['PATH'] = os.pathsep.join([
|
os.environ['PATH'] = os.pathsep.join([
|
||||||
os.path.join(config['environment']['BUILDDIR'], 'src'),
|
os.path.join(config['environment']['BUILDDIR'], 'src'),
|
||||||
|
|
|
||||||
|
|
@ -292,7 +292,7 @@ def initialize_datadir(dirname, n, chain):
|
||||||
datadir = get_datadir_path(dirname, n)
|
datadir = get_datadir_path(dirname, n)
|
||||||
if not os.path.isdir(datadir):
|
if not os.path.isdir(datadir):
|
||||||
os.makedirs(datadir)
|
os.makedirs(datadir)
|
||||||
with open(os.path.join(datadir, "bitcoin.conf"), 'w', encoding='utf8') as f:
|
with open(os.path.join(datadir, "elements.conf"), 'w', encoding='utf8') as f:
|
||||||
f.write("chain=%s\n" % chain)
|
f.write("chain=%s\n" % chain)
|
||||||
f.write("[%s]\n" % chain)
|
f.write("[%s]\n" % chain)
|
||||||
f.write("port=" + str(p2p_port(n)) + "\n")
|
f.write("port=" + str(p2p_port(n)) + "\n")
|
||||||
|
|
@ -327,15 +327,15 @@ def get_datadir_path(dirname, n):
|
||||||
return os.path.join(dirname, "node" + str(n))
|
return os.path.join(dirname, "node" + str(n))
|
||||||
|
|
||||||
def append_config(datadir, options):
|
def append_config(datadir, options):
|
||||||
with open(os.path.join(datadir, "bitcoin.conf"), 'a', encoding='utf8') as f:
|
with open(os.path.join(datadir, "elements.conf"), 'a', encoding='utf8') as f:
|
||||||
for option in options:
|
for option in options:
|
||||||
f.write(option + "\n")
|
f.write(option + "\n")
|
||||||
|
|
||||||
def get_auth_cookie(datadir, chain):
|
def get_auth_cookie(datadir, chain):
|
||||||
user = None
|
user = None
|
||||||
password = None
|
password = None
|
||||||
if os.path.isfile(os.path.join(datadir, "bitcoin.conf")):
|
if os.path.isfile(os.path.join(datadir, "elements.conf")):
|
||||||
with open(os.path.join(datadir, "bitcoin.conf"), 'r', encoding='utf8') as f:
|
with open(os.path.join(datadir, "elements.conf"), 'r', encoding='utf8') as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
if line.startswith("rpcuser="):
|
if line.startswith("rpcuser="):
|
||||||
assert user is None # Ensure that there is only one rpcuser line
|
assert user is None # Ensure that there is only one rpcuser line
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,8 @@ BASE_SCRIPTS = [
|
||||||
# vv Tests less than 30s vv
|
# vv Tests less than 30s vv
|
||||||
'wallet_keypool_topup.py',
|
'wallet_keypool_topup.py',
|
||||||
'interface_zmq.py',
|
'interface_zmq.py',
|
||||||
'interface_bitcoin_cli.py',
|
# ELEMENTS:
|
||||||
|
#'interface_bitcoin_cli.py',
|
||||||
'mempool_resurrect.py',
|
'mempool_resurrect.py',
|
||||||
'wallet_txn_doublespend.py --mineblock',
|
'wallet_txn_doublespend.py --mineblock',
|
||||||
'wallet_txn_clone.py',
|
'wallet_txn_clone.py',
|
||||||
|
|
@ -108,7 +109,8 @@ BASE_SCRIPTS = [
|
||||||
'wallet_disableprivatekeys.py --usecli',
|
'wallet_disableprivatekeys.py --usecli',
|
||||||
'interface_http.py',
|
'interface_http.py',
|
||||||
'rpc_psbt.py',
|
'rpc_psbt.py',
|
||||||
'rpc_users.py',
|
# ELEMENTS:
|
||||||
|
#'rpc_users.py',
|
||||||
'feature_proxy.py',
|
'feature_proxy.py',
|
||||||
'rpc_signrawtransaction.py',
|
'rpc_signrawtransaction.py',
|
||||||
'wallet_groups.py',
|
'wallet_groups.py',
|
||||||
|
|
@ -160,12 +162,14 @@ BASE_SCRIPTS = [
|
||||||
'p2p_fingerprint.py',
|
'p2p_fingerprint.py',
|
||||||
'feature_uacomment.py',
|
'feature_uacomment.py',
|
||||||
'p2p_unrequested_blocks.py',
|
'p2p_unrequested_blocks.py',
|
||||||
'feature_includeconf.py',
|
# ELEMENTS:
|
||||||
|
#'feature_includeconf.py',
|
||||||
'rpc_scantxoutset.py',
|
'rpc_scantxoutset.py',
|
||||||
'feature_logging.py',
|
'feature_logging.py',
|
||||||
'p2p_node_network_limited.py',
|
'p2p_node_network_limited.py',
|
||||||
'feature_blocksdir.py',
|
'feature_blocksdir.py',
|
||||||
'feature_config_args.py',
|
# ELEMENTS:
|
||||||
|
#'feature_config_args.py',
|
||||||
'rpc_help.py',
|
'rpc_help.py',
|
||||||
'feature_help.py',
|
'feature_help.py',
|
||||||
# Don't append tests at the end to avoid merge conflicts
|
# Don't append tests at the end to avoid merge conflicts
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ class ConfArgsTest(BitcoinTestFramework):
|
||||||
# Assume node is stopped
|
# Assume node is stopped
|
||||||
|
|
||||||
inc_conf_file_path = os.path.join(self.nodes[0].datadir, 'include.conf')
|
inc_conf_file_path = os.path.join(self.nodes[0].datadir, 'include.conf')
|
||||||
with open(os.path.join(self.nodes[0].datadir, 'bitcoin.conf'), 'a', encoding='utf-8') as conf:
|
with open(os.path.join(self.nodes[0].datadir, 'elements.conf'), 'a', encoding='utf-8') as conf:
|
||||||
conf.write('includeconf={}\n'.format(inc_conf_file_path))
|
conf.write('includeconf={}\n'.format(inc_conf_file_path))
|
||||||
|
|
||||||
with open(inc_conf_file_path, 'w', encoding='utf-8') as conf:
|
with open(inc_conf_file_path, 'w', encoding='utf-8') as conf:
|
||||||
|
|
@ -52,7 +52,7 @@ class ConfArgsTest(BitcoinTestFramework):
|
||||||
self.nodes[0].assert_start_raises_init_error(['-datadir=' + new_data_dir], 'Error: Specified data directory "' + new_data_dir + '" does not exist.')
|
self.nodes[0].assert_start_raises_init_error(['-datadir=' + new_data_dir], 'Error: Specified data directory "' + new_data_dir + '" does not exist.')
|
||||||
|
|
||||||
# Check that using non-existent datadir in conf file fails
|
# Check that using non-existent datadir in conf file fails
|
||||||
conf_file = os.path.join(default_data_dir, "bitcoin.conf")
|
conf_file = os.path.join(default_data_dir, "elements.conf")
|
||||||
|
|
||||||
# datadir needs to be set before [regtest] section
|
# datadir needs to be set before [regtest] section
|
||||||
conf_file_contents = open(conf_file, encoding='utf8').read()
|
conf_file_contents = open(conf_file, encoding='utf8').read()
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ from test_framework.test_framework import BitcoinTestFramework
|
||||||
|
|
||||||
class IncludeConfTest(BitcoinTestFramework):
|
class IncludeConfTest(BitcoinTestFramework):
|
||||||
def set_test_params(self):
|
def set_test_params(self):
|
||||||
self.setup_clean_chain = False
|
self.setup_clean_chain = True
|
||||||
self.num_nodes = 1
|
self.num_nodes = 1
|
||||||
|
|
||||||
def setup_chain(self):
|
def setup_chain(self):
|
||||||
|
|
@ -32,7 +32,7 @@ class IncludeConfTest(BitcoinTestFramework):
|
||||||
# - tmpdir/node0/relative2.conf
|
# - tmpdir/node0/relative2.conf
|
||||||
with open(os.path.join(self.options.tmpdir, "node0", "relative2.conf"), "w", encoding="utf8") as f:
|
with open(os.path.join(self.options.tmpdir, "node0", "relative2.conf"), "w", encoding="utf8") as f:
|
||||||
f.write("uacomment=relative2\n")
|
f.write("uacomment=relative2\n")
|
||||||
with open(os.path.join(self.options.tmpdir, "node0", "bitcoin.conf"), "a", encoding='utf8') as f:
|
with open(os.path.join(self.options.tmpdir, "node0", "elements.conf"), "a", encoding='utf8') as f:
|
||||||
f.write("uacomment=main\nincludeconf=relative.conf\n")
|
f.write("uacomment=main\nincludeconf=relative.conf\n")
|
||||||
|
|
||||||
def run_test(self):
|
def run_test(self):
|
||||||
|
|
@ -70,7 +70,7 @@ class IncludeConfTest(BitcoinTestFramework):
|
||||||
# Restore initial file contents
|
# Restore initial file contents
|
||||||
f.write("uacomment=relative\n")
|
f.write("uacomment=relative\n")
|
||||||
|
|
||||||
with open(os.path.join(self.options.tmpdir, "node0", "bitcoin.conf"), "a", encoding='utf8') as f:
|
with open(os.path.join(self.options.tmpdir, "node0", "elements.conf"), "a", encoding='utf8') as f:
|
||||||
f.write("includeconf=relative2.conf\n")
|
f.write("includeconf=relative2.conf\n")
|
||||||
|
|
||||||
self.start_node(0)
|
self.start_node(0)
|
||||||
|
|
|
||||||
|
|
@ -19,14 +19,14 @@ class TestBitcoinCli(BitcoinTestFramework):
|
||||||
"""Main test logic"""
|
"""Main test logic"""
|
||||||
|
|
||||||
cli_response = self.nodes[0].cli("-version").send_cli()
|
cli_response = self.nodes[0].cli("-version").send_cli()
|
||||||
assert("Bitcoin Core RPC client version" in cli_response)
|
assert("Elements Core RPC client version" in cli_response)
|
||||||
|
|
||||||
self.log.info("Compare responses from gewalletinfo RPC and `bitcoin-cli getwalletinfo`")
|
self.log.info("Compare responses from gewalletinfo RPC and `elements-cli getwalletinfo`")
|
||||||
cli_response = self.nodes[0].cli.getwalletinfo()
|
cli_response = self.nodes[0].cli.getwalletinfo()
|
||||||
rpc_response = self.nodes[0].getwalletinfo()
|
rpc_response = self.nodes[0].getwalletinfo()
|
||||||
assert_equal(cli_response, rpc_response)
|
assert_equal(cli_response, rpc_response)
|
||||||
|
|
||||||
self.log.info("Compare responses from getblockchaininfo RPC and `bitcoin-cli getblockchaininfo`")
|
self.log.info("Compare responses from getblockchaininfo RPC and `elements-cli getblockchaininfo`")
|
||||||
cli_response = self.nodes[0].cli.getblockchaininfo()
|
cli_response = self.nodes[0].cli.getblockchaininfo()
|
||||||
rpc_response = self.nodes[0].getblockchaininfo()
|
rpc_response = self.nodes[0].getblockchaininfo()
|
||||||
assert_equal(cli_response, rpc_response)
|
assert_equal(cli_response, rpc_response)
|
||||||
|
|
@ -50,7 +50,7 @@ class TestBitcoinCli(BitcoinTestFramework):
|
||||||
self.log.info("Make sure that -getinfo with arguments fails")
|
self.log.info("Make sure that -getinfo with arguments fails")
|
||||||
assert_raises_process_error(1, "-getinfo takes no arguments", self.nodes[0].cli('-getinfo').help)
|
assert_raises_process_error(1, "-getinfo takes no arguments", self.nodes[0].cli('-getinfo').help)
|
||||||
|
|
||||||
self.log.info("Compare responses from `bitcoin-cli -getinfo` and the RPCs data is retrieved from.")
|
self.log.info("Compare responses from `elements-cli -getinfo` and the RPCs data is retrieved from.")
|
||||||
cli_get_info = self.nodes[0].cli('-getinfo').send_cli()
|
cli_get_info = self.nodes[0].cli('-getinfo').send_cli()
|
||||||
wallet_info = self.nodes[0].getwalletinfo()
|
wallet_info = self.nodes[0].getwalletinfo()
|
||||||
network_info = self.nodes[0].getnetworkinfo()
|
network_info = self.nodes[0].getnetworkinfo()
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ import sys
|
||||||
|
|
||||||
class HTTPBasicsTest(BitcoinTestFramework):
|
class HTTPBasicsTest(BitcoinTestFramework):
|
||||||
def set_test_params(self):
|
def set_test_params(self):
|
||||||
|
self.setup_clean_chain = True
|
||||||
self.num_nodes = 2
|
self.num_nodes = 2
|
||||||
|
|
||||||
def setup_chain(self):
|
def setup_chain(self):
|
||||||
|
|
@ -42,11 +43,11 @@ class HTTPBasicsTest(BitcoinTestFramework):
|
||||||
rpcauth3 = lines[1]
|
rpcauth3 = lines[1]
|
||||||
self.password = lines[3]
|
self.password = lines[3]
|
||||||
|
|
||||||
with open(os.path.join(get_datadir_path(self.options.tmpdir, 0), "bitcoin.conf"), 'a', encoding='utf8') as f:
|
with open(os.path.join(get_datadir_path(self.options.tmpdir, 0), "elements.conf"), 'a', encoding='utf8') as f:
|
||||||
f.write(rpcauth+"\n")
|
f.write(rpcauth+"\n")
|
||||||
f.write(rpcauth2+"\n")
|
f.write(rpcauth2+"\n")
|
||||||
f.write(rpcauth3+"\n")
|
f.write(rpcauth3+"\n")
|
||||||
with open(os.path.join(get_datadir_path(self.options.tmpdir, 1), "bitcoin.conf"), 'a', encoding='utf8') as f:
|
with open(os.path.join(get_datadir_path(self.options.tmpdir, 1), "elements.conf"), 'a', encoding='utf8') as f:
|
||||||
f.write(rpcuser+"\n")
|
f.write(rpcuser+"\n")
|
||||||
f.write(rpcpassword+"\n")
|
f.write(rpcpassword+"\n")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -138,8 +138,8 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||||
|
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config.read_file(open(self.options.configfile))
|
config.read_file(open(self.options.configfile))
|
||||||
self.options.bitcoind = os.getenv("BITCOIND", default=config["environment"]["BUILDDIR"] + '/src/bitcoind' + config["environment"]["EXEEXT"])
|
self.options.bitcoind = os.getenv("BITCOIND", default=config["environment"]["BUILDDIR"] + '/src/elementsd' + config["environment"]["EXEEXT"])
|
||||||
self.options.bitcoincli = os.getenv("BITCOINCLI", default=config["environment"]["BUILDDIR"] + '/src/bitcoin-cli' + config["environment"]["EXEEXT"])
|
self.options.bitcoincli = os.getenv("BITCOINCLI", default=config["environment"]["BUILDDIR"] + '/src/elements-cli' + config["environment"]["EXEEXT"])
|
||||||
|
|
||||||
os.environ['PATH'] = os.pathsep.join([
|
os.environ['PATH'] = os.pathsep.join([
|
||||||
os.path.join(config['environment']['BUILDDIR'], 'src'),
|
os.path.join(config['environment']['BUILDDIR'], 'src'),
|
||||||
|
|
|
||||||
|
|
@ -308,7 +308,7 @@ def initialize_datadir(dirname, n, chain):
|
||||||
datadir = get_datadir_path(dirname, n)
|
datadir = get_datadir_path(dirname, n)
|
||||||
if not os.path.isdir(datadir):
|
if not os.path.isdir(datadir):
|
||||||
os.makedirs(datadir)
|
os.makedirs(datadir)
|
||||||
with open(os.path.join(datadir, "bitcoin.conf"), 'w', encoding='utf8') as f:
|
with open(os.path.join(datadir, "elements.conf"), 'w', encoding='utf8') as f:
|
||||||
f.write("chain=%s\n" % chain)
|
f.write("chain=%s\n" % chain)
|
||||||
f.write("[%s]\n" % chain)
|
f.write("[%s]\n" % chain)
|
||||||
f.write("port=" + str(p2p_port(n)) + "\n")
|
f.write("port=" + str(p2p_port(n)) + "\n")
|
||||||
|
|
@ -335,15 +335,15 @@ def initialize_datadir(dirname, n, chain):
|
||||||
return datadir
|
return datadir
|
||||||
|
|
||||||
def append_config(datadir, options):
|
def append_config(datadir, options):
|
||||||
with open(os.path.join(datadir, "bitcoin.conf"), 'a', encoding='utf8') as f:
|
with open(os.path.join(datadir, "elements.conf"), 'a', encoding='utf8') as f:
|
||||||
for option in options:
|
for option in options:
|
||||||
f.write(option + "\n")
|
f.write(option + "\n")
|
||||||
|
|
||||||
def get_auth_cookie(datadir, chain):
|
def get_auth_cookie(datadir, chain):
|
||||||
user = None
|
user = None
|
||||||
password = None
|
password = None
|
||||||
if os.path.isfile(os.path.join(datadir, "bitcoin.conf")):
|
if os.path.isfile(os.path.join(datadir, "elements.conf")):
|
||||||
with open(os.path.join(datadir, "bitcoin.conf"), 'r', encoding='utf8') as f:
|
with open(os.path.join(datadir, "elements.conf"), 'r', encoding='utf8') as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
if line.startswith("rpcuser="):
|
if line.startswith("rpcuser="):
|
||||||
assert user is None # Ensure that there is only one rpcuser line
|
assert user is None # Ensure that there is only one rpcuser line
|
||||||
|
|
|
||||||
|
|
@ -1,108 +1,108 @@
|
||||||
[
|
[
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "nversion=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "nversion=1"],
|
||||||
"output_cmp": "blanktxv1.hex",
|
"output_cmp": "blanktxv1.hex",
|
||||||
"description": "Creates a blank v1 transaction"
|
"description": "Creates a blank v1 transaction"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-json","-create", "nversion=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-json","-create", "nversion=1"],
|
||||||
"output_cmp": "blanktxv1.json",
|
"output_cmp": "blanktxv1.json",
|
||||||
"description": "Creates a blank v1 transaction (output in json)"
|
"description": "Creates a blank v1 transaction (output in json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-"],
|
||||||
"input": "blanktxv2.hex",
|
"input": "blanktxv2.hex",
|
||||||
"output_cmp": "blanktxv2.hex",
|
"output_cmp": "blanktxv2.hex",
|
||||||
"description": "Creates a blank transaction when nothing is piped into bitcoin-tx"
|
"description": "Creates a blank transaction when nothing is piped into elements-tx"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-json","-create"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-json","-create"],
|
||||||
"output_cmp": "blanktxv2.json",
|
"output_cmp": "blanktxv2.json",
|
||||||
"description": "Creates a blank transaction (output in json)"
|
"description": "Creates a blank transaction (output in json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-json","-"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-json","-"],
|
||||||
"input": "blanktxv2.hex",
|
"input": "blanktxv2.hex",
|
||||||
"output_cmp": "blanktxv2.json",
|
"output_cmp": "blanktxv2.json",
|
||||||
"description": "Creates a blank transaction when nothing is piped into bitcoin-tx (output in json)"
|
"description": "Creates a blank transaction when nothing is piped into elements-tx (output in json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "nversion=1foo"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "nversion=1foo"],
|
||||||
"return_code": 1,
|
"return_code": 1,
|
||||||
"error_txt": "error: Invalid TX version requested",
|
"error_txt": "error: Invalid TX version requested",
|
||||||
"description": "Tests the check for invalid nversion value"
|
"description": "Tests the check for invalid nversion value"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-", "delin=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-", "delin=1"],
|
||||||
"input": "tx394b54bb.hex",
|
"input": "tx394b54bb.hex",
|
||||||
"output_cmp": "tt-delin1-out.hex",
|
"output_cmp": "tt-delin1-out.hex",
|
||||||
"description": "Deletes a single input from a transaction"
|
"description": "Deletes a single input from a transaction"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-", "delin=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-", "delin=1"],
|
||||||
"input": "tx394b54bb.hex",
|
"input": "tx394b54bb.hex",
|
||||||
"output_cmp": "tt-delin1-out.json",
|
"output_cmp": "tt-delin1-out.json",
|
||||||
"description": "Deletes a single input from a transaction (output in json)"
|
"description": "Deletes a single input from a transaction (output in json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-", "delin=31"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-", "delin=31"],
|
||||||
"input": "tx394b54bb.hex",
|
"input": "tx394b54bb.hex",
|
||||||
"return_code": 1,
|
"return_code": 1,
|
||||||
"error_txt": "error: Invalid TX input index '31'",
|
"error_txt": "error: Invalid TX input index '31'",
|
||||||
"description": "Attempts to delete an input with a bad index from a transaction. Expected to fail."
|
"description": "Attempts to delete an input with a bad index from a transaction. Expected to fail."
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-", "delin=1foo"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-", "delin=1foo"],
|
||||||
"input": "tx394b54bb.hex",
|
"input": "tx394b54bb.hex",
|
||||||
"return_code": 1,
|
"return_code": 1,
|
||||||
"error_txt": "error: Invalid TX input index",
|
"error_txt": "error: Invalid TX input index",
|
||||||
"description": "Tests the check for an invalid input index with delin"
|
"description": "Tests the check for an invalid input index with delin"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-", "delout=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-", "delout=1"],
|
||||||
"input": "tx394b54bb.hex",
|
"input": "tx394b54bb.hex",
|
||||||
"output_cmp": "tt-delout1-out.hex",
|
"output_cmp": "tt-delout1-out.hex",
|
||||||
"description": "Deletes a single output from a transaction"
|
"description": "Deletes a single output from a transaction"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-", "delout=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-", "delout=1"],
|
||||||
"input": "tx394b54bb.hex",
|
"input": "tx394b54bb.hex",
|
||||||
"output_cmp": "tt-delout1-out.json",
|
"output_cmp": "tt-delout1-out.json",
|
||||||
"description": "Deletes a single output from a transaction (output in json)"
|
"description": "Deletes a single output from a transaction (output in json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-", "delout=2"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-", "delout=2"],
|
||||||
"input": "tx394b54bb.hex",
|
"input": "tx394b54bb.hex",
|
||||||
"return_code": 1,
|
"return_code": 1,
|
||||||
"error_txt": "error: Invalid TX output index '2'",
|
"error_txt": "error: Invalid TX output index '2'",
|
||||||
"description": "Attempts to delete an output with a bad index from a transaction. Expected to fail."
|
"description": "Attempts to delete an output with a bad index from a transaction. Expected to fail."
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-", "delout=1foo"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-", "delout=1foo"],
|
||||||
"input": "tx394b54bb.hex",
|
"input": "tx394b54bb.hex",
|
||||||
"return_code": 1,
|
"return_code": 1,
|
||||||
"error_txt": "error: Invalid TX output index",
|
"error_txt": "error: Invalid TX output index",
|
||||||
"description": "Tests the check for an invalid output index with delout"
|
"description": "Tests the check for an invalid output index with delout"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-", "locktime=317000"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-", "locktime=317000"],
|
||||||
"input": "tx394b54bb.hex",
|
"input": "tx394b54bb.hex",
|
||||||
"output_cmp": "tt-locktime317000-out.hex",
|
"output_cmp": "tt-locktime317000-out.hex",
|
||||||
"description": "Adds an nlocktime to a transaction"
|
"description": "Adds an nlocktime to a transaction"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-", "locktime=317000"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-", "locktime=317000"],
|
||||||
"input": "tx394b54bb.hex",
|
"input": "tx394b54bb.hex",
|
||||||
"output_cmp": "tt-locktime317000-out.json",
|
"output_cmp": "tt-locktime317000-out.json",
|
||||||
"description": "Adds an nlocktime to a transaction (output in json)"
|
"description": "Adds an nlocktime to a transaction (output in json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "locktime=317000foo"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "locktime=317000foo"],
|
||||||
"return_code": 1,
|
"return_code": 1,
|
||||||
"error_txt": "error: Invalid TX locktime requested",
|
"error_txt": "error: Invalid TX locktime requested",
|
||||||
"description": "Tests the check for invalid locktime value"
|
"description": "Tests the check for invalid locktime value"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-create",
|
["-serialization=BITCOIN", "-chain=main", "-create",
|
||||||
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
|
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
|
||||||
|
|
@ -111,7 +111,7 @@
|
||||||
"error_txt": "error: Invalid TX input index",
|
"error_txt": "error: Invalid TX input index",
|
||||||
"description": "Tests the check for an invalid input index with replaceable"
|
"description": "Tests the check for an invalid input index with replaceable"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-create",
|
["-serialization=BITCOIN", "-chain=main", "-create",
|
||||||
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0x"],
|
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0x"],
|
||||||
|
|
@ -119,7 +119,7 @@
|
||||||
"error_txt": "error: invalid TX input vout",
|
"error_txt": "error: invalid TX input vout",
|
||||||
"description": "Tests the check for an invalid vout value when adding an input"
|
"description": "Tests the check for an invalid vout value when adding an input"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-create",
|
["-serialization=BITCOIN", "-chain=main", "-create",
|
||||||
"outaddr=1"],
|
"outaddr=1"],
|
||||||
|
|
@ -127,7 +127,7 @@
|
||||||
"error_txt": "error: TX output missing or too many separators",
|
"error_txt": "error: TX output missing or too many separators",
|
||||||
"description": "Malformed outaddr argument (no address specified). Expected to fail."
|
"description": "Malformed outaddr argument (no address specified). Expected to fail."
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-create",
|
["-serialization=BITCOIN", "-chain=main", "-create",
|
||||||
"outaddr=1:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o:garbage"],
|
"outaddr=1:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o:garbage"],
|
||||||
|
|
@ -135,7 +135,7 @@
|
||||||
"error_txt": "error: TX output asset type invalid for BITCOIN serialization",
|
"error_txt": "error: TX output asset type invalid for BITCOIN serialization",
|
||||||
"description": "Malformed outaddr argument (asset id for BITCOIN serialization). Expected to fail."
|
"description": "Malformed outaddr argument (asset id for BITCOIN serialization). Expected to fail."
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-create",
|
["-serialization=BITCOIN", "-chain=main", "-create",
|
||||||
"outpubkey=0"],
|
"outpubkey=0"],
|
||||||
|
|
@ -143,7 +143,7 @@
|
||||||
"error_txt": "error: TX output missing or too many separators",
|
"error_txt": "error: TX output missing or too many separators",
|
||||||
"description": "Malformed outpubkey argument (no pubkey specified). Expected to fail."
|
"description": "Malformed outpubkey argument (no pubkey specified). Expected to fail."
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-create",
|
["-serialization=BITCOIN", "-chain=main", "-create",
|
||||||
"outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W:non53nse"],
|
"outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W:non53nse"],
|
||||||
|
|
@ -151,7 +151,7 @@
|
||||||
"error_txt": "error: TX output missing or too many separators",
|
"error_txt": "error: TX output missing or too many separators",
|
||||||
"description": "Malformed outpubkey argument (too many separators). Expected to fail."
|
"description": "Malformed outpubkey argument (too many separators). Expected to fail."
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-create",
|
["-serialization=BITCOIN", "-chain=main", "-create",
|
||||||
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
|
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
|
||||||
|
|
@ -162,7 +162,7 @@
|
||||||
"output_cmp": "txcreate1.hex",
|
"output_cmp": "txcreate1.hex",
|
||||||
"description": "Creates a new transaction with three inputs and two outputs"
|
"description": "Creates a new transaction with three inputs and two outputs"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-json",
|
["-serialization=BITCOIN", "-chain=main", "-json",
|
||||||
"-create",
|
"-create",
|
||||||
|
|
@ -174,67 +174,67 @@
|
||||||
"output_cmp": "txcreate1.json",
|
"output_cmp": "txcreate1.json",
|
||||||
"description": "Creates a new transaction with three inputs and two outputs (output in json)"
|
"description": "Creates a new transaction with three inputs and two outputs (output in json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outscript=0:"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outscript=0:"],
|
||||||
"output_cmp": "txcreate2.hex",
|
"output_cmp": "txcreate2.hex",
|
||||||
"description": "Creates a new transaction with a single empty output script"
|
"description": "Creates a new transaction with a single empty output script"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outscript=0:"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outscript=0:"],
|
||||||
"output_cmp": "txcreate2.json",
|
"output_cmp": "txcreate2.json",
|
||||||
"description": "Creates a new transaction with a single empty output script (output in json)"
|
"description": "Creates a new transaction with a single empty output script (output in json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "02000000000100000000000000000000000000"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "02000000000100000000000000000000000000"],
|
||||||
"output_cmp": "txcreate2.hex",
|
"output_cmp": "txcreate2.hex",
|
||||||
"description": "Parses a transaction with no inputs and a single output script"
|
"description": "Parses a transaction with no inputs and a single output script"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "02000000000100000000000000000000000000"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "02000000000100000000000000000000000000"],
|
||||||
"output_cmp": "txcreate2.json",
|
"output_cmp": "txcreate2.json",
|
||||||
"description": "Parses a transaction with no inputs and a single output script (output in json)"
|
"description": "Parses a transaction with no inputs and a single output script (output in json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outscript=0:OP_DROP", "nversion=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outscript=0:OP_DROP", "nversion=1"],
|
||||||
"output_cmp": "txcreatescript1.hex",
|
"output_cmp": "txcreatescript1.hex",
|
||||||
"description": "Create a new transaction with a single output script (OP_DROP)"
|
"description": "Create a new transaction with a single output script (OP_DROP)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outscript=0:OP_DROP", "nversion=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outscript=0:OP_DROP", "nversion=1"],
|
||||||
"output_cmp": "txcreatescript1.json",
|
"output_cmp": "txcreatescript1.json",
|
||||||
"description": "Create a new transaction with a single output script (OP_DROP) (output as json)"
|
"description": "Create a new transaction with a single output script (OP_DROP) (output as json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outscript=0:OP_DROP:S", "nversion=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outscript=0:OP_DROP:S", "nversion=1"],
|
||||||
"output_cmp": "txcreatescript2.hex",
|
"output_cmp": "txcreatescript2.hex",
|
||||||
"description": "Create a new transaction with a single output script (OP_DROP) in a P2SH"
|
"description": "Create a new transaction with a single output script (OP_DROP) in a P2SH"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outscript=0:OP_DROP:S", "nversion=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outscript=0:OP_DROP:S", "nversion=1"],
|
||||||
"output_cmp": "txcreatescript2.json",
|
"output_cmp": "txcreatescript2.json",
|
||||||
"description": "Create a new transaction with a single output script (OP_DROP) in a P2SH (output as json)"
|
"description": "Create a new transaction with a single output script (OP_DROP) in a P2SH (output as json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outscript=0:OP_DROP:W", "nversion=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outscript=0:OP_DROP:W", "nversion=1"],
|
||||||
"output_cmp": "txcreatescript3.hex",
|
"output_cmp": "txcreatescript3.hex",
|
||||||
"description": "Create a new transaction with a single output script (OP_DROP) in a P2WSH"
|
"description": "Create a new transaction with a single output script (OP_DROP) in a P2WSH"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outscript=0:OP_DROP:W", "nversion=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outscript=0:OP_DROP:W", "nversion=1"],
|
||||||
"output_cmp": "txcreatescript3.json",
|
"output_cmp": "txcreatescript3.json",
|
||||||
"description": "Create a new transaction with a single output script (OP_DROP) in a P2WSH (output as json)"
|
"description": "Create a new transaction with a single output script (OP_DROP) in a P2WSH (output as json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outscript=0:OP_DROP:WS", "nversion=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outscript=0:OP_DROP:WS", "nversion=1"],
|
||||||
"output_cmp": "txcreatescript4.hex",
|
"output_cmp": "txcreatescript4.hex",
|
||||||
"description": "Create a new transaction with a single output script (OP_DROP) in a P2WSH, wrapped in a P2SH"
|
"description": "Create a new transaction with a single output script (OP_DROP) in a P2WSH, wrapped in a P2SH"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outscript=0:OP_DROP:WS", "nversion=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outscript=0:OP_DROP:WS", "nversion=1"],
|
||||||
"output_cmp": "txcreatescript4.json",
|
"output_cmp": "txcreatescript4.json",
|
||||||
"description": "Create a new transaction with a single output script (OP_DROP) in a P2SH, wrapped in a P2SH (output as json)"
|
"description": "Create a new transaction with a single output script (OP_DROP) in a P2SH, wrapped in a P2SH (output as json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-create", "nversion=1",
|
["-serialization=BITCOIN", "-chain=main", "-create", "nversion=1",
|
||||||
"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
|
"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
|
||||||
|
|
@ -245,7 +245,7 @@
|
||||||
"output_cmp": "txcreatesignv1.hex",
|
"output_cmp": "txcreatesignv1.hex",
|
||||||
"description": "Creates a new v1 transaction with a single input and a single output, and then signs the transaction"
|
"description": "Creates a new v1 transaction with a single input and a single output, and then signs the transaction"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-json",
|
["-serialization=BITCOIN", "-chain=main", "-json",
|
||||||
"-create", "nversion=1",
|
"-create", "nversion=1",
|
||||||
|
|
@ -257,7 +257,7 @@
|
||||||
"output_cmp": "txcreatesignv1.json",
|
"output_cmp": "txcreatesignv1.json",
|
||||||
"description": "Creates a new v1 transaction with a single input and a single output, and then signs the transaction (output in json)"
|
"description": "Creates a new v1 transaction with a single input and a single output, and then signs the transaction (output in json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-create",
|
["-serialization=BITCOIN", "-chain=main", "-create",
|
||||||
"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
|
"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
|
||||||
|
|
@ -268,7 +268,7 @@
|
||||||
"output_cmp": "txcreatesignv2.hex",
|
"output_cmp": "txcreatesignv2.hex",
|
||||||
"description": "Creates a new transaction with a single input and a single output, and then signs the transaction"
|
"description": "Creates a new transaction with a single input and a single output, and then signs the transaction"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-create",
|
["-serialization=BITCOIN", "-chain=main", "-create",
|
||||||
"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
|
"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
|
||||||
|
|
@ -280,50 +280,50 @@
|
||||||
"error_txt": "error: prevtxs internal object typecheck fail",
|
"error_txt": "error: prevtxs internal object typecheck fail",
|
||||||
"description": "Tests the check for invalid vout index in prevtxs for sign"
|
"description": "Tests the check for invalid vout index in prevtxs for sign"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397", "nversion=1"],
|
["-serialization=BITCOIN", "-chain=main", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397", "nversion=1"],
|
||||||
"output_cmp": "txcreateoutpubkey1.hex",
|
"output_cmp": "txcreateoutpubkey1.hex",
|
||||||
"description": "Creates a new transaction with a single pay-to-pubkey output"
|
"description": "Creates a new transaction with a single pay-to-pubkey output"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397", "nversion=1"],
|
["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397", "nversion=1"],
|
||||||
"output_cmp": "txcreateoutpubkey1.json",
|
"output_cmp": "txcreateoutpubkey1.json",
|
||||||
"description": "Creates a new transaction with a single pay-to-pubkey output (output as json)"
|
"description": "Creates a new transaction with a single pay-to-pubkey output (output as json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W", "nversion=1"],
|
["-serialization=BITCOIN", "-chain=main", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W", "nversion=1"],
|
||||||
"output_cmp": "txcreateoutpubkey2.hex",
|
"output_cmp": "txcreateoutpubkey2.hex",
|
||||||
"description": "Creates a new transaction with a single pay-to-witness-pubkey output"
|
"description": "Creates a new transaction with a single pay-to-witness-pubkey output"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W", "nversion=1"],
|
["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W", "nversion=1"],
|
||||||
"output_cmp": "txcreateoutpubkey2.json",
|
"output_cmp": "txcreateoutpubkey2.json",
|
||||||
"description": "Creates a new transaction with a single pay-to-witness-pubkey output (output as json)"
|
"description": "Creates a new transaction with a single pay-to-witness-pubkey output (output as json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:WS", "nversion=1"],
|
["-serialization=BITCOIN", "-chain=main", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:WS", "nversion=1"],
|
||||||
"output_cmp": "txcreateoutpubkey3.hex",
|
"output_cmp": "txcreateoutpubkey3.hex",
|
||||||
"description": "Creates a new transaction with a single pay-to-witness-pubkey, wrapped in P2SH output"
|
"description": "Creates a new transaction with a single pay-to-witness-pubkey, wrapped in P2SH output"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:WS", "nversion=1"],
|
["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:WS", "nversion=1"],
|
||||||
"output_cmp": "txcreateoutpubkey3.json",
|
"output_cmp": "txcreateoutpubkey3.json",
|
||||||
"description": "Creates a new transaction with a single pay-to-pub-key output, wrapped in P2SH (output as json)"
|
"description": "Creates a new transaction with a single pay-to-pub-key output, wrapped in P2SH (output as json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outpubkey=0:047d1368ba7ae01c94bc32293efd70bd7e3be7aa7912d07d0b1c659c1008d179b8642f5fb90f47580feb29f045e216ff5a4716d3a0fed36da414d332046303c44a:WS", "nversion=1"],
|
["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outpubkey=0:047d1368ba7ae01c94bc32293efd70bd7e3be7aa7912d07d0b1c659c1008d179b8642f5fb90f47580feb29f045e216ff5a4716d3a0fed36da414d332046303c44a:WS", "nversion=1"],
|
||||||
"return_code": 1,
|
"return_code": 1,
|
||||||
"error_txt": "error: Uncompressed pubkeys are not useable for SegWit outputs",
|
"error_txt": "error: Uncompressed pubkeys are not useable for SegWit outputs",
|
||||||
"description": "Creates a new transaction with a single pay-to-pub-key output, wrapped in P2SH (output as json)"
|
"description": "Creates a new transaction with a single pay-to-pub-key output, wrapped in P2SH (output as json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-create",
|
["-serialization=BITCOIN", "-chain=main", "-create",
|
||||||
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
|
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
|
||||||
|
|
@ -332,7 +332,7 @@
|
||||||
"error_txt": "error: invalid TX output data",
|
"error_txt": "error: invalid TX output data",
|
||||||
"description": "Attempts to create a new transaction with one input and an output with malformed hex data. Expected to fail"
|
"description": "Attempts to create a new transaction with one input and an output with malformed hex data. Expected to fail"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-create",
|
["-serialization=BITCOIN", "-chain=main", "-create",
|
||||||
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
|
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
|
||||||
|
|
@ -341,7 +341,7 @@
|
||||||
"error_txt": "error: invalid TX output data",
|
"error_txt": "error: invalid TX output data",
|
||||||
"description": "Attempts to create a new transaction with one input and an output with no value and malformed hex data. Expected to fail"
|
"description": "Attempts to create a new transaction with one input and an output with no value and malformed hex data. Expected to fail"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-create",
|
["-serialization=BITCOIN", "-chain=main", "-create",
|
||||||
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
|
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
|
||||||
|
|
@ -350,7 +350,7 @@
|
||||||
"output_cmp": "txcreatedata1.hex",
|
"output_cmp": "txcreatedata1.hex",
|
||||||
"description": "Creates a new transaction with one input, one address output and one data output"
|
"description": "Creates a new transaction with one input, one address output and one data output"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-json",
|
["-serialization=BITCOIN", "-chain=main", "-json",
|
||||||
"-create", "nversion=1",
|
"-create", "nversion=1",
|
||||||
|
|
@ -360,7 +360,7 @@
|
||||||
"output_cmp": "txcreatedata1.json",
|
"output_cmp": "txcreatedata1.json",
|
||||||
"description": "Creates a new v1 transaction with one input, one address output and one data output (output in json)"
|
"description": "Creates a new v1 transaction with one input, one address output and one data output (output in json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-create",
|
["-serialization=BITCOIN", "-chain=main", "-create",
|
||||||
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
|
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
|
||||||
|
|
@ -369,7 +369,7 @@
|
||||||
"output_cmp": "txcreatedata2.hex",
|
"output_cmp": "txcreatedata2.hex",
|
||||||
"description": "Creates a new transaction with one input, one address output and one data (zero value) output"
|
"description": "Creates a new transaction with one input, one address output and one data (zero value) output"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-json",
|
["-serialization=BITCOIN", "-chain=main", "-json",
|
||||||
"-create",
|
"-create",
|
||||||
|
|
@ -379,7 +379,7 @@
|
||||||
"output_cmp": "txcreatedata2.json",
|
"output_cmp": "txcreatedata2.json",
|
||||||
"description": "Creates a new transaction with one input, one address output and one data (zero value) output (output in json)"
|
"description": "Creates a new transaction with one input, one address output and one data (zero value) output (output in json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-create",
|
["-serialization=BITCOIN", "-chain=main", "-create",
|
||||||
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:4294967293",
|
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:4294967293",
|
||||||
|
|
@ -387,7 +387,7 @@
|
||||||
"output_cmp": "txcreatedata_seq0.hex",
|
"output_cmp": "txcreatedata_seq0.hex",
|
||||||
"description": "Creates a new transaction with one input with sequence number and one address output"
|
"description": "Creates a new transaction with one input with sequence number and one address output"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-json",
|
["-serialization=BITCOIN", "-chain=main", "-json",
|
||||||
"-create",
|
"-create",
|
||||||
|
|
@ -396,14 +396,14 @@
|
||||||
"output_cmp": "txcreatedata_seq0.json",
|
"output_cmp": "txcreatedata_seq0.json",
|
||||||
"description": "Creates a new transaction with one input with sequence number and one address output (output in json)"
|
"description": "Creates a new transaction with one input with sequence number and one address output (output in json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac00000000",
|
["-serialization=BITCOIN", "-chain=main", "01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac00000000",
|
||||||
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:1"],
|
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:1"],
|
||||||
"output_cmp": "txcreatedata_seq1.hex",
|
"output_cmp": "txcreatedata_seq1.hex",
|
||||||
"description": "Adds a new input with sequence number to a transaction"
|
"description": "Adds a new input with sequence number to a transaction"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-serialization=BITCOIN", "-chain=main", "-json",
|
["-serialization=BITCOIN", "-chain=main", "-json",
|
||||||
"01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac00000000",
|
"01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac00000000",
|
||||||
|
|
@ -411,68 +411,68 @@
|
||||||
"output_cmp": "txcreatedata_seq1.json",
|
"output_cmp": "txcreatedata_seq1.json",
|
||||||
"description": "Adds a new input with sequence number to a transaction (output in json)"
|
"description": "Adds a new input with sequence number to a transaction (output in json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485", "nversion=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485", "nversion=1"],
|
||||||
"output_cmp": "txcreatemultisig1.hex",
|
"output_cmp": "txcreatemultisig1.hex",
|
||||||
"description": "Creates a new transaction with a single 2-of-3 multisig output"
|
"description": "Creates a new transaction with a single 2-of-3 multisig output"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485", "nversion=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485", "nversion=1"],
|
||||||
"output_cmp": "txcreatemultisig1.json",
|
"output_cmp": "txcreatemultisig1.json",
|
||||||
"description": "Creates a new transaction with a single 2-of-3 multisig output (output in json)"
|
"description": "Creates a new transaction with a single 2-of-3 multisig output (output in json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:S", "nversion=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:S", "nversion=1"],
|
||||||
"output_cmp": "txcreatemultisig2.hex",
|
"output_cmp": "txcreatemultisig2.hex",
|
||||||
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2SH output"
|
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2SH output"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:S", "nversion=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:S", "nversion=1"],
|
||||||
"output_cmp": "txcreatemultisig2.json",
|
"output_cmp": "txcreatemultisig2.json",
|
||||||
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2SH output (output in json)"
|
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2SH output (output in json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:W", "nversion=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:W", "nversion=1"],
|
||||||
"output_cmp": "txcreatemultisig3.hex",
|
"output_cmp": "txcreatemultisig3.hex",
|
||||||
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output"
|
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:W", "nversion=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:W", "nversion=1"],
|
||||||
"output_cmp": "txcreatemultisig3.json",
|
"output_cmp": "txcreatemultisig3.json",
|
||||||
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output (output in json)"
|
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output (output in json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
|
||||||
"output_cmp": "txcreatemultisig4.hex",
|
"output_cmp": "txcreatemultisig4.hex",
|
||||||
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH"
|
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
|
||||||
"output_cmp": "txcreatemultisig4.json",
|
"output_cmp": "txcreatemultisig4.json",
|
||||||
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH (output in json)"
|
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH (output in json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:047d1368ba7ae01c94bc32293efd70bd7e3be7aa7912d07d0b1c659c1008d179b8642f5fb90f47580feb29f045e216ff5a4716d3a0fed36da414d332046303c44a:S"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:047d1368ba7ae01c94bc32293efd70bd7e3be7aa7912d07d0b1c659c1008d179b8642f5fb90f47580feb29f045e216ff5a4716d3a0fed36da414d332046303c44a:S"],
|
||||||
"output_cmp": "txcreatemultisig5.json",
|
"output_cmp": "txcreatemultisig5.json",
|
||||||
"description": "Uncompressed pubkeys should work just fine for non-witness outputs"
|
"description": "Uncompressed pubkeys should work just fine for non-witness outputs"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:047d1368ba7ae01c94bc32293efd70bd7e3be7aa7912d07d0b1c659c1008d179b8642f5fb90f47580feb29f045e216ff5a4716d3a0fed36da414d332046303c44a:WS"],
|
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:047d1368ba7ae01c94bc32293efd70bd7e3be7aa7912d07d0b1c659c1008d179b8642f5fb90f47580feb29f045e216ff5a4716d3a0fed36da414d332046303c44a:WS"],
|
||||||
"return_code": 1,
|
"return_code": 1,
|
||||||
"error_txt": "error: Uncompressed pubkeys are not useable for SegWit outputs",
|
"error_txt": "error: Uncompressed pubkeys are not useable for SegWit outputs",
|
||||||
"description": "Ensure adding witness outputs with uncompressed pubkeys fails"
|
"description": "Ensure adding witness outputs with uncompressed pubkeys fails"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-serialization=ELEMENTS", "-chain=main", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
|
"args": ["-serialization=ELEMENTS", "-chain=main", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
|
||||||
"output_cmp": "txcreatemultisig4_elements.hex",
|
"output_cmp": "txcreatemultisig4_elements.hex",
|
||||||
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH. Elements serialization."
|
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH. Elements serialization."
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-create", "-chain=main", "-json", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
|
"args": ["-create", "-chain=main", "-json", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
|
||||||
"output_cmp": "txcreatemultisig4_elements.json",
|
"output_cmp": "txcreatemultisig4_elements.json",
|
||||||
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH. Elements serialization, without serialization arg. (output in json)"
|
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH. Elements serialization, without serialization arg. (output in json)"
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args":
|
"args":
|
||||||
["-create", "-chain=main",
|
["-create", "-chain=main",
|
||||||
"outaddr=1:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o:garbage"],
|
"outaddr=1:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o:garbage"],
|
||||||
|
|
@ -480,7 +480,7 @@
|
||||||
"error_txt": "error: invalid TX output asset type",
|
"error_txt": "error: invalid TX output asset type",
|
||||||
"description": "Malformed outaddr argument (bad asset id). Expected to fail."
|
"description": "Malformed outaddr argument (bad asset id). Expected to fail."
|
||||||
},
|
},
|
||||||
{ "exec": "./bitcoin-tx",
|
{ "exec": "./elements-tx",
|
||||||
"args": ["-create", "-chain=main", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
|
"args": ["-create", "-chain=main", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
|
||||||
"output_cmp": "txcreatemultisig4_elements.hex",
|
"output_cmp": "txcreatemultisig4_elements.hex",
|
||||||
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH. Elements serialization, without serialization arg."
|
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH. Elements serialization, without serialization arg."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue