From f8b701d381be5ee4ed8049635458955d3d3b0bbe Mon Sep 17 00:00:00 2001 From: joshuayabut Date: Sat, 6 May 2017 12:54:33 -0400 Subject: [PATCH] Define BITCOIN_TX to disable OP_CHECKBLOCKATHEIGHT --- src/Makefile.am | 4 ++-- src/Makefile.gtest.include | 2 +- src/script/standard.cpp | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 9963f285..0c8b1f3f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -426,8 +426,8 @@ zcash_cli_LDADD = \ # # zcash-tx binary # -zcash_tx_SOURCES = bitcoin-tx.cpp -zcash_tx_CPPFLAGS = $(BITCOIN_INCLUDES) +zcash_tx_SOURCES = bitcoin-tx.cpp script/standard.cpp +zcash_tx_CPPFLAGS = $(BITCOIN_INCLUDES) -DBITCOIN_TX zcash_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) if TARGET_WINDOWS diff --git a/src/Makefile.gtest.include b/src/Makefile.gtest.include index e8cb48a8..7bc9679c 100644 --- a/src/Makefile.gtest.include +++ b/src/Makefile.gtest.include @@ -40,7 +40,7 @@ zcash_gtest_SOURCES += \ wallet/gtest/test_wallet.cpp endif -zcash_gtest_CPPFLAGS = -DMULTICORE -fopenmp -DBINARY_OUTPUT -DCURVE_ALT_BN128 -DSTATIC $(BITCOIN_INCLUDES) +zcash_gtest_CPPFLAGS = -DMULTICORE -fopenmp -DBINARY_OUTPUT -DCURVE_ALT_BN128 -DSTATIC $(BITCOIN_INCLUDES) -DBITCOIN_TX zcash_gtest_LDADD = -lgtest -lgmock $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \ $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1) diff --git a/src/script/standard.cpp b/src/script/standard.cpp index 24544b0f..f9e4649e 100644 --- a/src/script/standard.cpp +++ b/src/script/standard.cpp @@ -12,9 +12,7 @@ #include -#if defined(BITCOIN_ZCASHCONSENSUS_H) #include "main.h" -#endif using namespace std; @@ -309,7 +307,7 @@ public: return false; } -#ifndef BITCOIN_ZCASHCONSENSUS_H // zen-tx does not have access to chain state so no replay protection is possible +#ifdef BITCOIN_TX // zen-tx does not have access to chain state so no replay protection is possible bool operator()(const CKeyID &keyID) const { script->clear(); *script << OP_DUP << OP_HASH160 << ToByteVector(keyID) << OP_EQUALVERIFY << OP_CHECKSIG;