wallet_ismine.h → script/ismine.h

Removes conditional dependency of `src/test` on wallet.

Makes multisig and P2SH tests complete without wallet built-in.
This commit is contained in:
Wladimir J. van der Laan
2016-04-18 15:12:46 +02:00
parent f4eae2d910
commit a25a4f5b04
6 changed files with 9 additions and 26 deletions

View File

@@ -9,12 +9,9 @@
#include "script/script.h"
#include "script/script_error.h"
#include "script/sign.h"
#include "script/ismine.h"
#include "test/test_bitcoin.h"
#ifdef ENABLE_WALLET
#include "wallet/wallet_ismine.h"
#endif
#include <vector>
#include <boost/test/unit_test.hpp>
@@ -101,9 +98,7 @@ BOOST_AUTO_TEST_CASE(sign)
txTo[i].vin[0].prevout.n = i;
txTo[i].vin[0].prevout.hash = txFrom.GetHash();
txTo[i].vout[0].nValue = 1;
#ifdef ENABLE_WALLET
BOOST_CHECK_MESSAGE(IsMine(keystore, txFrom.vout[i].scriptPubKey), strprintf("IsMine %d", i));
#endif
}
for (int i = 0; i < 8; i++)
{
@@ -198,9 +193,7 @@ BOOST_AUTO_TEST_CASE(set)
txTo[i].vin[0].prevout.hash = txFrom.GetHash();
txTo[i].vout[0].nValue = 1*CENT;
txTo[i].vout[0].scriptPubKey = inner[i];
#ifdef ENABLE_WALLET
BOOST_CHECK_MESSAGE(IsMine(keystore, txFrom.vout[i].scriptPubKey), strprintf("IsMine %d", i));
#endif
}
for (int i = 0; i < 4; i++)
{