Auto merge of #1949 - str4d:1810-fix-disablewallet, r=str4d

Fix --disablewallet

Closes #1810.
This commit is contained in:
zkbot
2017-01-09 17:36:41 +00:00
5 changed files with 10 additions and 2 deletions

View File

@@ -11,7 +11,6 @@ zcash_gtest_SOURCES = \
gtest/json_test_vectors.cpp \ gtest/json_test_vectors.cpp \
gtest/json_test_vectors.h \ gtest/json_test_vectors.h \
gtest/test_foundersreward.cpp \ gtest/test_foundersreward.cpp \
gtest/test_wallet_zkeys.cpp \
gtest/test_jsonspirit.cpp \ gtest/test_jsonspirit.cpp \
gtest/test_tautology.cpp \ gtest/test_tautology.cpp \
gtest/test_equihash.cpp \ gtest/test_equihash.cpp \
@@ -31,7 +30,8 @@ zcash_gtest_SOURCES = \
gtest/test_checkblock.cpp gtest/test_checkblock.cpp
if ENABLE_WALLET if ENABLE_WALLET
zcash_gtest_SOURCES += \ zcash_gtest_SOURCES += \
wallet/gtest/test_wallet.cpp wallet/gtest/test_wallet.cpp \
wallet/gtest/test_wallet_zkeys.cpp
endif endif
zcash_gtest_CPPFLAGS = -DMULTICORE -fopenmp -DBINARY_OUTPUT -DCURVE_ALT_BN128 -DSTATIC zcash_gtest_CPPFLAGS = -DMULTICORE -fopenmp -DBINARY_OUTPUT -DCURVE_ALT_BN128 -DSTATIC

View File

@@ -2,7 +2,9 @@
#include "keystore.h" #include "keystore.h"
#include "random.h" #include "random.h"
#ifdef ENABLE_WALLET
#include "wallet/crypter.h" #include "wallet/crypter.h"
#endif
#include "zcash/Address.hpp" #include "zcash/Address.hpp"
TEST(keystore_tests, store_and_retrieve_spending_key) { TEST(keystore_tests, store_and_retrieve_spending_key) {
@@ -44,6 +46,7 @@ TEST(keystore_tests, store_and_retrieve_note_decryptor) {
EXPECT_EQ(ZCNoteDecryption(sk.viewing_key()), decOut); EXPECT_EQ(ZCNoteDecryption(sk.viewing_key()), decOut);
} }
#ifdef ENABLE_WALLET
class TestCCryptoKeyStore : public CCryptoKeyStore class TestCCryptoKeyStore : public CCryptoKeyStore
{ {
public: public:
@@ -125,3 +128,4 @@ TEST(keystore_tests, store_and_retrieve_spending_key_in_encrypted_store) {
ASSERT_EQ(1, addrs.count(addr)); ASSERT_EQ(1, addrs.count(addr));
ASSERT_EQ(1, addrs.count(addr2)); ASSERT_EQ(1, addrs.count(addr2));
} }
#endif

View File

@@ -401,6 +401,7 @@ static Value BIP22ValidationResult(const CValidationState& state)
return "valid?"; return "valid?";
} }
#ifdef ENABLE_WALLET
Value getblocktemplate(const Array& params, bool fHelp) Value getblocktemplate(const Array& params, bool fHelp)
{ {
if (fHelp || params.size() > 1) if (fHelp || params.size() > 1)
@@ -694,6 +695,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
return result; return result;
} }
#endif
class submitblock_StateCatcher : public CValidationInterface class submitblock_StateCatcher : public CValidationInterface
{ {

View File

@@ -302,7 +302,9 @@ static const CRPCCommand vRPCCommands[] =
{ "blockchain", "verifychain", &verifychain, true }, { "blockchain", "verifychain", &verifychain, true },
/* Mining */ /* Mining */
#ifdef ENABLE_WALLET
{ "mining", "getblocktemplate", &getblocktemplate, true }, { "mining", "getblocktemplate", &getblocktemplate, true },
#endif
{ "mining", "getmininginfo", &getmininginfo, true }, { "mining", "getmininginfo", &getmininginfo, true },
{ "mining", "getlocalsolps", &getlocalsolps, true }, { "mining", "getlocalsolps", &getlocalsolps, true },
{ "mining", "getnetworksolps", &getnetworksolps, true }, { "mining", "getnetworksolps", &getnetworksolps, true },