2015-03-03 07:49:12 -08:00
|
|
|
#ifndef BITCOIN_TEST_TEST_BITCOIN_H
|
|
|
|
#define BITCOIN_TEST_TEST_BITCOIN_H
|
|
|
|
|
2015-07-28 11:11:20 -07:00
|
|
|
#include "pubkey.h"
|
2015-03-03 07:49:12 -08:00
|
|
|
#include "txdb.h"
|
|
|
|
|
|
|
|
#include <boost/filesystem.hpp>
|
|
|
|
#include <boost/thread.hpp>
|
|
|
|
|
2015-03-12 01:34:42 -07:00
|
|
|
/** Basic testing setup.
|
|
|
|
* This just configures logging and chain parameters.
|
|
|
|
*/
|
|
|
|
struct BasicTestingSetup {
|
2015-07-28 11:11:20 -07:00
|
|
|
ECCVerifyHandle globalVerifyHandle;
|
|
|
|
|
2015-07-28 11:15:46 -07:00
|
|
|
BasicTestingSetup();
|
2015-03-12 01:34:42 -07:00
|
|
|
~BasicTestingSetup();
|
|
|
|
};
|
|
|
|
|
2017-11-05 09:02:21 -08:00
|
|
|
// Setup w.r.t. zk-SNARK API
|
|
|
|
struct JoinSplitTestingSetup: public BasicTestingSetup {
|
|
|
|
JoinSplitTestingSetup();
|
|
|
|
~JoinSplitTestingSetup();
|
|
|
|
};
|
|
|
|
|
2015-03-12 01:34:42 -07:00
|
|
|
/** Testing setup that configures a complete environment.
|
|
|
|
* Included are data directory, coins database, script check threads
|
|
|
|
* and wallet (if enabled) setup.
|
|
|
|
*/
|
2017-11-05 09:02:21 -08:00
|
|
|
struct TestingSetup: public JoinSplitTestingSetup {
|
2015-03-03 07:49:12 -08:00
|
|
|
CCoinsViewDB *pcoinsdbview;
|
|
|
|
boost::filesystem::path pathTemp;
|
|
|
|
boost::thread_group threadGroup;
|
|
|
|
|
2015-07-28 11:15:46 -07:00
|
|
|
TestingSetup();
|
2015-03-03 07:49:12 -08:00
|
|
|
~TestingSetup();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|