Define BITCOIN_TX to disable OP_CHECKBLOCKATHEIGHT

This commit is contained in:
joshuayabut 2017-05-06 12:54:33 -04:00
parent cda34be4c6
commit f8b701d381
3 changed files with 4 additions and 6 deletions

View File

@ -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

View File

@ -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)

View File

@ -12,9 +12,7 @@
#include <boost/foreach.hpp>
#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;