summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO8
-rw-r--r--0001-rename-libbitcoinconsensus-to-libmonacoinconsensus.patch595
-rw-r--r--PKGBUILD7
3 files changed, 5 insertions, 605 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fd3e676dec42..f576500c6757 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = monacoin-qt
pkgdesc = peer-to-peer network based digital currency - Qt GUI
- pkgver = 0.15.1
+ pkgver = 0.17.1
pkgrel = 1
url = https://monacoin.org/en/index.html
install = monacoin.install
@@ -26,11 +26,9 @@ pkgbase = monacoin-qt
provides = monacoin-qt
provides = monacoind
provides = monacoin-tx
- source = https://github.com/monacoinproject/monacoin/archive/monacoin-0.15.1.tar.gz
- source = 0001-rename-libbitcoinconsensus-to-libmonacoinconsensus.patch
+ source = https://github.com/monacoinproject/monacoin/archive/monacoin-0.17.1.tar.gz
source = monacoin-qt.desktop
- sha256sums = ceadfafc4721226521171188d8842858af0ea8527e559182f38a2491e177667b
- sha256sums = 458444ae19977bacb20842f26a8662a9d80d6aaa52b0df91ecf9bc83dac22ec0
+ sha256sums = f3fbbd0014abcbf1993a59ac4742dc6b77dc2caaeee7956f1177a450833e278b
sha256sums = 4af25bac0076c6d2060832b66819741d3e049a71d6ad5f1a26a2700415d23cfc
pkgname = monacoin-qt
diff --git a/0001-rename-libbitcoinconsensus-to-libmonacoinconsensus.patch b/0001-rename-libbitcoinconsensus-to-libmonacoinconsensus.patch
deleted file mode 100644
index b9935dfea91b..000000000000
--- a/0001-rename-libbitcoinconsensus-to-libmonacoinconsensus.patch
+++ /dev/null
@@ -1,595 +0,0 @@
-0001-rename-libbitcoinconsensus-to-libmonacoinconsensus.patch
-:00 2001
-From: Musee Ullah <lae@lae.is>
-Date: Fri, 2 Mar 2018 03:55:35 +0900
-Subject: [PATCH] rename libbitcoinconsensus to libmonacoinconsensus
-
----
- .gitignore | 2 +-
- Makefile.am | 2 +-
- configure.ac | 2 +-
- ...inconsensus.pc.in => libmonacoinconsensus.pc.in | 4 +-
- src/Makefile.am | 36 +++++-----
- src/Makefile.bench.include | 2 +-
- src/Makefile.qt.include | 4 +-
- src/Makefile.qttest.include | 2 +-
- src/Makefile.test.include | 6 +-
- src/bench/verify_script.cpp | 4 +-
- src/script/bitcoinconsensus.h | 83 ----------------------
- ...{bitcoinconsensus.cpp => monacoinconsensus.cpp} | 34 ++++-----
- src/script/monacoinconsensus.h | 83 ++++++++++++++++++++++
- src/test/script_tests.cpp | 12 ++--
- 14 files changed, 138 insertions(+), 138 deletions(-)
- rename libbitcoinconsensus.pc.in => libmonacoinconsensus.pc.in (67%)
- delete mode 100644 src/script/bitcoinconsensus.h
- rename src/script/{bitcoinconsensus.cpp => monacoinconsensus.cpp} (75%)
- create mode 100644 src/script/monacoinconsensus.h
-
-diff --git a/.gitignore b/.gitignore
-index 8e66176..df7bd69 100644
---- a/.gitignore
-+++ b/.gitignore
-@@ -107,5 +107,5 @@ test/cache/*
-
- /doc/doxygen/
-
--libbitcoinconsensus.pc
-+libmonacoinconsensus.pc
- contrib/devtools/split-debug.sh
-diff --git a/Makefile.am b/Makefile.am
-index b3c9b2f..7959280 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -14,7 +14,7 @@ export PYTHONPATH
-
- if BUILD_BITCOIN_LIBS
- pkgconfigdir = $(libdir)/pkgconfig
--pkgconfig_DATA = libbitcoinconsensus.pc
-+pkgconfig_DATA = libmonacoinconsensus.pc
- endif
-
- BITCOIND_BIN=$(top_builddir)/src/$(BITCOIN_DAEMON_NAME)$(EXEEXT)
-diff --git a/configure.ac b/configure.ac
-index a7f5a08..fa9e6e9 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1050,7 +1050,7 @@ AC_MSG_CHECKING([whether to build libraries])
- AM_CONDITIONAL([BUILD_BITCOIN_LIBS], [test x$build_bitcoin_libs = xyes])
- if test x$build_bitcoin_libs = xyes; then
- AC_DEFINE(HAVE_CONSENSUS_LIB, 1, [Define this symbol if the consensus lib has been built])
-- AC_CONFIG_FILES([libbitcoinconsensus.pc:libbitcoinconsensus.pc.in])
-+ AC_CONFIG_FILES([libmonacoinconsensus.pc:libmonacoinconsensus.pc.in])
- fi
- AC_MSG_RESULT($build_bitcoin_libs)
-
-diff --git a/libbitcoinconsensus.pc.in b/libmonacoinconsensus.pc.in
-similarity index 67%
-rename from libbitcoinconsensus.pc.in
-rename to libmonacoinconsensus.pc.in
-index eb920c4..47960d2 100644
---- a/libbitcoinconsensus.pc.in
-+++ b/libmonacoinconsensus.pc.in
-@@ -4,8 +4,8 @@ libdir=@libdir@
- includedir=@includedir@
-
- Name: @PACKAGE_NAME@ consensus library
--Description: Library for the Bitcoin consensus protocol.
-+Description: Library for the Monacoin consensus protocol.
- Version: @PACKAGE_VERSION@
--Libs: -L${libdir} -lbitcoinconsensus
-+Libs: -L${libdir} -lmonacoinconsensus
- Cflags: -I${includedir}
- Requires.private: libcrypto
-diff --git a/src/Makefile.am b/src/Makefile.am
-index f4799d8..30f1b64 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -26,7 +26,7 @@ BITCOIN_INCLUDES += $(UNIVALUE_CFLAGS)
-
- LIBBITCOIN_SERVER=libbitcoin_server.a
- LIBBITCOIN_COMMON=libbitcoin_common.a
--LIBBITCOIN_CONSENSUS=libbitcoin_consensus.a
-+LIBMONACOIN_CONSENSUS=libmonacoin_consensus.a
- LIBBITCOIN_CLI=libbitcoin_cli.a
- LIBBITCOIN_UTIL=libbitcoin_util.a
- LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
-@@ -37,7 +37,7 @@ if ENABLE_ZMQ
- LIBBITCOIN_ZMQ=libbitcoin_zmq.a
- endif
- if BUILD_BITCOIN_LIBS
--LIBBITCOINCONSENSUS=libbitcoinconsensus.la
-+LIBMONACOINCONSENSUS=libmonacoinconsensus.la
- endif
- if ENABLE_WALLET
- LIBBITCOIN_WALLET=libbitcoin_wallet.a
-@@ -52,13 +52,13 @@ EXTRA_LIBRARIES += \
- $(LIBBITCOIN_CRYPTO) \
- $(LIBBITCOIN_UTIL) \
- $(LIBBITCOIN_COMMON) \
-- $(LIBBITCOIN_CONSENSUS) \
-+ $(LIBMONACOIN_CONSENSUS) \
- $(LIBBITCOIN_SERVER) \
- $(LIBBITCOIN_CLI) \
- $(LIBBITCOIN_WALLET) \
- $(LIBBITCOIN_ZMQ)
-
--lib_LTLIBRARIES = $(LIBBITCOINCONSENSUS)
-+lib_LTLIBRARIES = $(LIBMONACOINCONSENSUS)
-
- bin_PROGRAMS =
- noinst_PROGRAMS =
-@@ -278,9 +278,9 @@ crypto_libbitcoin_crypto_a_SOURCES += crypto/sha256_sse4.cpp
- endif
-
- # consensus: shared between all executables that validate any consensus rules.
--libbitcoin_consensus_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
--libbitcoin_consensus_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
--libbitcoin_consensus_a_SOURCES = \
-+libmonacoin_consensus_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
-+libmonacoin_consensus_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
-+libmonacoin_consensus_a_SOURCES = \
- amount.h \
- arith_uint256.cpp \
- arith_uint256.h \
-@@ -297,7 +297,7 @@ libbitcoin_consensus_a_SOURCES = \
- primitives/transaction.h \
- pubkey.cpp \
- pubkey.h \
-- script/bitcoinconsensus.cpp \
-+ script/monacoinconsensus.cpp \
- script/interpreter.cpp \
- script/interpreter.h \
- script/script.cpp \
-@@ -409,7 +409,7 @@ monacoind_LDADD = \
- $(LIBBITCOIN_UTIL) \
- $(LIBBITCOIN_WALLET) \
- $(LIBBITCOIN_ZMQ) \
-- $(LIBBITCOIN_CONSENSUS) \
-+ $(LIBMONACOIN_CONSENSUS) \
- $(LIBBITCOIN_CRYPTO) \
- $(LIBLEVELDB) \
- $(LIBLEVELDB_SSE42) \
-@@ -451,26 +451,26 @@ monacoin_tx_LDADD = \
- $(LIBUNIVALUE) \
- $(LIBBITCOIN_COMMON) \
- $(LIBBITCOIN_UTIL) \
-- $(LIBBITCOIN_CONSENSUS) \
-+ $(LIBMONACOIN_CONSENSUS) \
- $(LIBBITCOIN_CRYPTO) \
- $(LIBSECP256K1)
-
- monacoin_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS)
- #
-
--# bitcoinconsensus library #
-+# monacoinconsensus library #
- if BUILD_BITCOIN_LIBS
--include_HEADERS = script/bitcoinconsensus.h
--libbitcoinconsensus_la_SOURCES = $(crypto_libbitcoin_crypto_a_SOURCES) $(libbitcoin_consensus_a_SOURCES)
-+include_HEADERS = script/monacoinconsensus.h
-+libmonacoinconsensus_la_SOURCES = $(crypto_libbitcoin_crypto_a_SOURCES) $(libmonacoin_consensus_a_SOURCES)
-
- if GLIBC_BACK_COMPAT
-- libbitcoinconsensus_la_SOURCES += compat/glibc_compat.cpp
-+ libmonacoinconsensus_la_SOURCES += compat/glibc_compat.cpp
- endif
-
--libbitcoinconsensus_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS)
--libbitcoinconsensus_la_LIBADD = $(LIBSECP256K1) $(CRYPTO_LIBS)
--libbitcoinconsensus_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include -DBUILD_BITCOIN_INTERNAL $(SSL_CFLAGS)
--libbitcoinconsensus_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
-+libmonacoinconsensus_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS)
-+libmonacoinconsensus_la_LIBADD = $(LIBSECP256K1) $(CRYPTO_LIBS)
-+libmonacoinconsensus_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include -DBUILD_BITCOIN_INTERNAL $(SSL_CFLAGS)
-+libmonacoinconsensus_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
-
- endif
- #
-diff --git a/src/Makefile.bench.include b/src/Makefile.bench.include
-index 0b2060d..84a9410 100644
---- a/src/Makefile.bench.include
-+++ b/src/Makefile.bench.include
-@@ -36,7 +36,7 @@ bench_bench_monacoin_LDADD = \
- $(LIBBITCOIN_SERVER) \
- $(LIBBITCOIN_COMMON) \
- $(LIBBITCOIN_UTIL) \
-- $(LIBBITCOIN_CONSENSUS) \
-+ $(LIBMONACOIN_CONSENSUS) \
- $(LIBBITCOIN_CRYPTO) \
- $(LIBLEVELDB) \
- $(LIBLEVELDB_SSE42) \
-diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
-index cd5a40f..0c68320 100644
---- a/src/Makefile.qt.include
-+++ b/src/Makefile.qt.include
-@@ -423,7 +423,7 @@ endif
- if ENABLE_ZMQ
- qt_monacoin_qt_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS)
- endif
--qt_monacoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) $(LIBLEVELDB_SSE42) $(LIBMEMENV) \
-+qt_monacoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBMONACOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) $(LIBLEVELDB_SSE42) $(LIBMEMENV) \
- $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1) \
- $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS)
- qt_monacoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
-@@ -434,7 +434,7 @@ QT_QM=$(QT_TS:.ts=.qm)
-
- SECONDARY: $(QT_QM)
-
--$(srcdir)/qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_wallet_a_SOURCES) $(libbitcoin_common_a_SOURCES) $(libbitcoin_zmq_a_SOURCES) $(libbitcoin_consensus_a_SOURCES) $(libbitcoin_util_a_SOURCES)
-+$(srcdir)/qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_wallet_a_SOURCES) $(libbitcoin_common_a_SOURCES) $(libbitcoin_zmq_a_SOURCES) $(libmonacoin_consensus_a_SOURCES) $(libbitcoin_util_a_SOURCES)
- @test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
- $(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) PACKAGE_NAME="$(PACKAGE_NAME)" COPYRIGHT_HOLDERS="$(COPYRIGHT_HOLDERS)" COPYRIGHT_HOLDERS_SUBSTITUTION="$(COPYRIGHT_HOLDERS_SUBSTITUTION)" $(PYTHON) ../share/qt/extract_strings_qt.py $^
-
-diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
-index 50a09c4..a50b26d 100644
---- a/src/Makefile.qttest.include
-+++ b/src/Makefile.qttest.include
-@@ -57,7 +57,7 @@ endif
- if ENABLE_ZMQ
- qt_test_test_monacoin_qt_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS)
- endif
--qt_test_test_monacoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) \
-+qt_test_test_monacoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBMONACOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) \
- $(LIBLEVELDB_SSE42) $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
- $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1) \
- $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS)
-diff --git a/src/Makefile.test.include b/src/Makefile.test.include
-index 46fc660..70fac57 100644
---- a/src/Makefile.test.include
-+++ b/src/Makefile.test.include
-@@ -99,11 +99,11 @@ test_test_monacoin_LDADD =
- if ENABLE_WALLET
- test_test_monacoin_LDADD += $(LIBBITCOIN_WALLET)
- endif
--test_test_monacoin_LDADD += $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) \
-+test_test_monacoin_LDADD += $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBMONACOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) \
- $(LIBLEVELDB) $(LIBLEVELDB_SSE42) $(LIBMEMENV) $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1) $(EVENT_LIBS) $(EVENT_PTHREADS_LIBS)
- test_test_monacoin_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
-
--test_test_monacoin_LDADD += $(LIBBITCOIN_CONSENSUS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
-+test_test_monacoin_LDADD += $(LIBMONACOIN_CONSENSUS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
- test_test_monacoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static
-
- if ENABLE_ZMQ
-@@ -122,7 +122,7 @@ test_test_monacoin_fuzzy_LDADD = \
- $(LIBBITCOIN_SERVER) \
- $(LIBBITCOIN_COMMON) \
- $(LIBBITCOIN_UTIL) \
-- $(LIBBITCOIN_CONSENSUS) \
-+ $(LIBMONACOIN_CONSENSUS) \
- $(LIBBITCOIN_CRYPTO) \
- $(LIBSECP256K1)
-
-diff --git a/src/bench/verify_script.cpp b/src/bench/verify_script.cpp
-index ef7381c..e9924c6 100644
---- a/src/bench/verify_script.cpp
-+++ b/src/bench/verify_script.cpp
-@@ -5,7 +5,7 @@
- #include "bench.h"
- #include "key.h"
- #if defined(HAVE_CONSENSUS_LIB)
--#include "script/bitcoinconsensus.h"
-+#include "script/monacoinconsensus.h"
- #endif
- #include "script/script.h"
- #include "script/sign.h"
-@@ -95,7 +95,7 @@ static void VerifyScriptBench(benchmark::State& state)
- #if defined(HAVE_CONSENSUS_LIB)
- CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
- stream << txSpend;
-- int csuccess = bitcoinconsensus_verify_script_with_amount(
-+ int csuccess = monacoinconsensus_verify_script_with_amount(
- txCredit.vout[0].scriptPubKey.data(),
- txCredit.vout[0].scriptPubKey.size(),
- txCredit.vout[0].nValue,
-diff --git a/src/script/bitcoinconsensus.h b/src/script/bitcoinconsensus.h
-deleted file mode 100644
-index 33bf80e..0000000
---- a/src/script/bitcoinconsensus.h
-+++ /dev/null
-@@ -1,83 +0,0 @@
--// Copyright (c) 2009-2010 Satoshi Nakamoto
--// Copyright (c) 2009-2016 The Bitcoin Core developers
--// Distributed under the MIT software license, see the accompanying
--// file COPYING or http://www.opensource.org/licenses/mit-license.php.
--
--#ifndef BITCOIN_BITCOINCONSENSUS_H
--#define BITCOIN_BITCOINCONSENSUS_H
--
--#include <stdint.h>
--
--#if defined(BUILD_BITCOIN_INTERNAL) && defined(HAVE_CONFIG_H)
--#include "config/bitcoin-config.h"
-- #if defined(_WIN32)
-- #if defined(DLL_EXPORT)
-- #if defined(HAVE_FUNC_ATTRIBUTE_DLLEXPORT)
-- #define EXPORT_SYMBOL __declspec(dllexport)
-- #else
-- #define EXPORT_SYMBOL
-- #endif
-- #endif
-- #elif defined(HAVE_FUNC_ATTRIBUTE_VISIBILITY)
-- #define EXPORT_SYMBOL __attribute__ ((visibility ("default")))
-- #endif
--#elif defined(MSC_VER) && !defined(STATIC_LIBBITCOINCONSENSUS)
-- #define EXPORT_SYMBOL __declspec(dllimport)
--#endif
--
--#ifndef EXPORT_SYMBOL
-- #define EXPORT_SYMBOL
--#endif
--
--#ifdef __cplusplus
--extern "C" {
--#endif
--
--#define BITCOINCONSENSUS_API_VER 1
--
--typedef enum bitcoinconsensus_error_t
--{
-- bitcoinconsensus_ERR_OK = 0,
-- bitcoinconsensus_ERR_TX_INDEX,
-- bitcoinconsensus_ERR_TX_SIZE_MISMATCH,
-- bitcoinconsensus_ERR_TX_DESERIALIZE,
-- bitcoinconsensus_ERR_AMOUNT_REQUIRED,
-- bitcoinconsensus_ERR_INVALID_FLAGS,
--} bitcoinconsensus_error;
--
--/** Script verification flags */
--enum
--{
-- bitcoinconsensus_SCRIPT_FLAGS_VERIFY_NONE = 0,
-- bitcoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH = (1U << 0), // evaluate P2SH (BIP16) subscripts
-- bitcoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG = (1U << 2), // enforce strict DER (BIP66) compliance
-- bitcoinconsensus_SCRIPT_FLAGS_VERIFY_NULLDUMMY = (1U << 4), // enforce NULLDUMMY (BIP147)
-- bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY = (1U << 9), // enable CHECKLOCKTIMEVERIFY (BIP65)
-- bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY = (1U << 10), // enable CHECKSEQUENCEVERIFY (BIP112)
-- bitcoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS = (1U << 11), // enable WITNESS (BIP141)
-- bitcoinconsensus_SCRIPT_FLAGS_VERIFY_ALL = bitcoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH | bitcoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG |
-- bitcoinconsensus_SCRIPT_FLAGS_VERIFY_NULLDUMMY | bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY |
-- bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY | bitcoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS
--};
--
--/// Returns 1 if the input nIn of the serialized transaction pointed to by
--/// txTo correctly spends the scriptPubKey pointed to by scriptPubKey under
--/// the additional constraints specified by flags.
--/// If not nullptr, err will contain an error/success code for the operation
--EXPORT_SYMBOL int bitcoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen,
-- const unsigned char *txTo , unsigned int txToLen,
-- unsigned int nIn, unsigned int flags, bitcoinconsensus_error* err);
--
--EXPORT_SYMBOL int bitcoinconsensus_verify_script_with_amount(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, int64_t amount,
-- const unsigned char *txTo , unsigned int txToLen,
-- unsigned int nIn, unsigned int flags, bitcoinconsensus_error* err);
--
--EXPORT_SYMBOL unsigned int bitcoinconsensus_version();
--
--#ifdef __cplusplus
--} // extern "C"
--#endif
--
--#undef EXPORT_SYMBOL
--
--#endif // BITCOIN_BITCOINCONSENSUS_H
-diff --git a/src/script/bitcoinconsensus.cpp b/src/script/monacoinconsensus.cpp
-similarity index 75%
-rename from src/script/bitcoinconsensus.cpp
-rename to src/script/monacoinconsensus.cpp
-index 0312891..b6164e8 100644
---- a/src/script/bitcoinconsensus.cpp
-+++ b/src/script/monacoinconsensus.cpp
-@@ -3,7 +3,7 @@
- // Distributed under the MIT software license, see the accompanying
- // file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
--#include "bitcoinconsensus.h"
-+#include "monacoinconsensus.h"
-
- #include "primitives/transaction.h"
- #include "pubkey.h"
-@@ -55,7 +55,7 @@ private:
- size_t m_remaining;
- };
-
--inline int set_error(bitcoinconsensus_error* ret, bitcoinconsensus_error serror)
-+inline int set_error(monacoinconsensus_error* ret, monacoinconsensus_error serror)
- {
- if (ret)
- *ret = serror;
-@@ -73,57 +73,57 @@ ECCryptoClosure instance_of_eccryptoclosure;
- /** Check that all specified flags are part of the libconsensus interface. */
- static bool verify_flags(unsigned int flags)
- {
-- return (flags & ~(bitcoinconsensus_SCRIPT_FLAGS_VERIFY_ALL)) == 0;
-+ return (flags & ~(monacoinconsensus_SCRIPT_FLAGS_VERIFY_ALL)) == 0;
- }
-
- static int verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, CAmount amount,
- const unsigned char *txTo , unsigned int txToLen,
-- unsigned int nIn, unsigned int flags, bitcoinconsensus_error* err)
-+ unsigned int nIn, unsigned int flags, monacoinconsensus_error* err)
- {
- if (!verify_flags(flags)) {
-- return bitcoinconsensus_ERR_INVALID_FLAGS;
-+ return monacoinconsensus_ERR_INVALID_FLAGS;
- }
- try {
- TxInputStream stream(SER_NETWORK, PROTOCOL_VERSION, txTo, txToLen);
- CTransaction tx(deserialize, stream);
- if (nIn >= tx.vin.size())
-- return set_error(err, bitcoinconsensus_ERR_TX_INDEX);
-+ return set_error(err, monacoinconsensus_ERR_TX_INDEX);
- if (GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION) != txToLen)
-- return set_error(err, bitcoinconsensus_ERR_TX_SIZE_MISMATCH);
-+ return set_error(err, monacoinconsensus_ERR_TX_SIZE_MISMATCH);
-
- // Regardless of the verification result, the tx did not error.
-- set_error(err, bitcoinconsensus_ERR_OK);
-+ set_error(err, monacoinconsensus_ERR_OK);
-
- PrecomputedTransactionData txdata(tx);
- return VerifyScript(tx.vin[nIn].scriptSig, CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen), &tx.vin[nIn].scriptWitness, flags, TransactionSignatureChecker(&tx, nIn, amount, txdata), nullptr);
- } catch (const std::exception&) {
-- return set_error(err, bitcoinconsensus_ERR_TX_DESERIALIZE); // Error deserializing
-+ return set_error(err, monacoinconsensus_ERR_TX_DESERIALIZE); // Error deserializing
- }
- }
-
--int bitcoinconsensus_verify_script_with_amount(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, int64_t amount,
-+int monacoinconsensus_verify_script_with_amount(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, int64_t amount,
- const unsigned char *txTo , unsigned int txToLen,
-- unsigned int nIn, unsigned int flags, bitcoinconsensus_error* err)
-+ unsigned int nIn, unsigned int flags, monacoinconsensus_error* err)
- {
- CAmount am(amount);
- return ::verify_script(scriptPubKey, scriptPubKeyLen, am, txTo, txToLen, nIn, flags, err);
- }
-
-
--int bitcoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen,
-+int monacoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen,
- const unsigned char *txTo , unsigned int txToLen,
-- unsigned int nIn, unsigned int flags, bitcoinconsensus_error* err)
-+ unsigned int nIn, unsigned int flags, monacoinconsensus_error* err)
- {
-- if (flags & bitcoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS) {
-- return set_error(err, bitcoinconsensus_ERR_AMOUNT_REQUIRED);
-+ if (flags & monacoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS) {
-+ return set_error(err, monacoinconsensus_ERR_AMOUNT_REQUIRED);
- }
-
- CAmount am(0);
- return ::verify_script(scriptPubKey, scriptPubKeyLen, am, txTo, txToLen, nIn, flags, err);
- }
-
--unsigned int bitcoinconsensus_version()
-+unsigned int monacoinconsensus_version()
- {
- // Just use the API version for now
-- return BITCOINCONSENSUS_API_VER;
-+ return MONACOINCONSENSUS_API_VER;
- }
-diff --git a/src/script/monacoinconsensus.h b/src/script/monacoinconsensus.h
-new file mode 100644
-index 0000000..6616af1
---- /dev/null
-+++ b/src/script/monacoinconsensus.h
-@@ -0,0 +1,83 @@
-+// Copyright (c) 2009-2010 Satoshi Nakamoto
-+// Copyright (c) 2009-2016 The Bitcoin Core developers
-+// Distributed under the MIT software license, see the accompanying
-+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-+
-+#ifndef BITCOIN_MONACOINCONSENSUS_H
-+#define BITCOIN_MONACOINCONSENSUS_H
-+
-+#include <stdint.h>
-+
-+#if defined(BUILD_BITCOIN_INTERNAL) && defined(HAVE_CONFIG_H)
-+#include "config/bitcoin-config.h"
-+ #if defined(_WIN32)
-+ #if defined(DLL_EXPORT)
-+ #if defined(HAVE_FUNC_ATTRIBUTE_DLLEXPORT)
-+ #define EXPORT_SYMBOL __declspec(dllexport)
-+ #else
-+ #define EXPORT_SYMBOL
-+ #endif
-+ #endif
-+ #elif defined(HAVE_FUNC_ATTRIBUTE_VISIBILITY)
-+ #define EXPORT_SYMBOL __attribute__ ((visibility ("default")))
-+ #endif
-+#elif defined(MSC_VER) && !defined(STATIC_LIBMONACOINCONSENSUS)
-+ #define EXPORT_SYMBOL __declspec(dllimport)
-+#endif
-+
-+#ifndef EXPORT_SYMBOL
-+ #define EXPORT_SYMBOL
-+#endif
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+#define MONACOINCONSENSUS_API_VER 1
-+
-+typedef enum monacoinconsensus_error_t
-+{
-+ monacoinconsensus_ERR_OK = 0,
-+ monacoinconsensus_ERR_TX_INDEX,
-+ monacoinconsensus_ERR_TX_SIZE_MISMATCH,
-+ monacoinconsensus_ERR_TX_DESERIALIZE,
-+ monacoinconsensus_ERR_AMOUNT_REQUIRED,
-+ monacoinconsensus_ERR_INVALID_FLAGS,
-+} monacoinconsensus_error;
-+
-+/** Script verification flags */
-+enum
-+{
-+ monacoinconsensus_SCRIPT_FLAGS_VERIFY_NONE = 0,
-+ monacoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH = (1U << 0), // evaluate P2SH (BIP16) subscripts
-+ monacoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG = (1U << 2), // enforce strict DER (BIP66) compliance
-+ monacoinconsensus_SCRIPT_FLAGS_VERIFY_NULLDUMMY = (1U << 4), // enforce NULLDUMMY (BIP147)
-+ monacoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY = (1U << 9), // enable CHECKLOCKTIMEVERIFY (BIP65)
-+ monacoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY = (1U << 10), // enable CHECKSEQUENCEVERIFY (BIP112)
-+ monacoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS = (1U << 11), // enable WITNESS (BIP141)
-+ monacoinconsensus_SCRIPT_FLAGS_VERIFY_ALL = monacoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH | monacoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG |
-+ monacoinconsensus_SCRIPT_FLAGS_VERIFY_NULLDUMMY | monacoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY |
-+ monacoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY | monacoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS
-+};
-+
-+/// Returns 1 if the input nIn of the serialized transaction pointed to by
-+/// txTo correctly spends the scriptPubKey pointed to by scriptPubKey under
-+/// the additional constraints specified by flags.
-+/// If not nullptr, err will contain an error/success code for the operation
-+EXPORT_SYMBOL int monacoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen,
-+ const unsigned char *txTo , unsigned int txToLen,
-+ unsigned int nIn, unsigned int flags, monacoinconsensus_error* err);
-+
-+EXPORT_SYMBOL int monacoinconsensus_verify_script_with_amount(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, int64_t amount,
-+ const unsigned char *txTo , unsigned int txToLen,
-+ unsigned int nIn, unsigned int flags, monacoinconsensus_error* err);
-+
-+EXPORT_SYMBOL unsigned int monacoinconsensus_version();
-+
-+#ifdef __cplusplus
-+} // extern "C"
-+#endif
-+
-+#undef EXPORT_SYMBOL
-+
-+#endif // BITCOIN_MONACOINCONSENSUS_H
-diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
-index 06b8274..e913b89 100644
---- a/src/test/script_tests.cpp
-+++ b/src/test/script_tests.cpp
-@@ -16,7 +16,7 @@
- #include "rpc/server.h"
-
- #if defined(HAVE_CONSENSUS_LIB)
--#include "script/bitcoinconsensus.h"
-+#include "script/monacoinconsensus.h"
- #endif
-
- #include <fstream>
-@@ -169,13 +169,13 @@ void DoTest(const CScript& scriptPubKey, const CScript& scriptSig, const CScript
- #if defined(HAVE_CONSENSUS_LIB)
- CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
- stream << tx2;
-- int libconsensus_flags = flags & bitcoinconsensus_SCRIPT_FLAGS_VERIFY_ALL;
-+ int libconsensus_flags = flags & monacoinconsensus_SCRIPT_FLAGS_VERIFY_ALL;
- if (libconsensus_flags == flags) {
-- if (flags & bitcoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS) {
-- BOOST_CHECK_MESSAGE(bitcoinconsensus_verify_script_with_amount(scriptPubKey.data(), scriptPubKey.size(), txCredit.vout[0].nValue, (const unsigned char*)&stream[0], stream.size(), 0, libconsensus_flags, nullptr) == expect, message);
-+ if (flags & monacoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS) {
-+ BOOST_CHECK_MESSAGE(monacoinconsensus_verify_script_with_amount(scriptPubKey.data(), scriptPubKey.size(), txCredit.vout[0].nValue, (const unsigned char*)&stream[0], stream.size(), 0, libconsensus_flags, nullptr) == expect, message);
- } else {
-- BOOST_CHECK_MESSAGE(bitcoinconsensus_verify_script_with_amount(scriptPubKey.data(), scriptPubKey.size(), 0, (const unsigned char*)&stream[0], stream.size(), 0, libconsensus_flags, nullptr) == expect, message);
-- BOOST_CHECK_MESSAGE(bitcoinconsensus_verify_script(scriptPubKey.data(), scriptPubKey.size(), (const unsigned char*)&stream[0], stream.size(), 0, libconsensus_flags, nullptr) == expect,message);
-+ BOOST_CHECK_MESSAGE(monacoinconsensus_verify_script_with_amount(scriptPubKey.data(), scriptPubKey.size(), 0, (const unsigned char*)&stream[0], stream.size(), 0, libconsensus_flags, nullptr) == expect, message);
-+ BOOST_CHECK_MESSAGE(monacoinconsensus_verify_script(scriptPubKey.data(), scriptPubKey.size(), (const unsigned char*)&stream[0], stream.size(), 0, libconsensus_flags, nullptr) == expect,message);
- }
- }
- #endif
---
-2.16.2
-
diff --git a/PKGBUILD b/PKGBUILD
index c193d8fec0d3..f97487ce8b30 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=monacoin-qt
_coinname=monacoin
-pkgver=0.15.1
+pkgver=0.17.1
pkgrel=1
pkgdesc="peer-to-peer network based digital currency - Qt GUI"
arch=('i686' 'x86_64')
@@ -13,17 +13,14 @@ depends=('openssl-1.0' 'boost-libs' 'libevent' 'db4.8' 'qt5-base' 'protobuf')
makedepends=('git' 'pkg-config' 'boost' 'gcc' 'make' 'autoconf' 'automake' 'libtool')
optdepends=('qrencode: for generating QR codes within the GUI' 'zeromq: send notifications via zeromq')
source=("https://github.com/monacoinproject/${_coinname}/archive/${_coinname}-${pkgver}.tar.gz"
- "0001-rename-libbitcoinconsensus-to-libmonacoinconsensus.patch"
"monacoin-qt.desktop")
-sha256sums=('ceadfafc4721226521171188d8842858af0ea8527e559182f38a2491e177667b'
- '458444ae19977bacb20842f26a8662a9d80d6aaa52b0df91ecf9bc83dac22ec0'
+sha256sums=('f3fbbd0014abcbf1993a59ac4742dc6b77dc2caaeee7956f1177a450833e278b'
'4af25bac0076c6d2060832b66819741d3e049a71d6ad5f1a26a2700415d23cfc')
install=monacoin.install
prepare() {
mv "${srcdir}/monacoin-monacoin-${pkgver}" "${srcdir}/${_coinname}-${pkgver}"
cd "${srcdir}/${_coinname}-${pkgver}"
- patch -p1 <"${srcdir}/0001-rename-libbitcoinconsensus-to-libmonacoinconsensus.patch"
}
build() {