Changeset View
Changeset View
Standalone View
Standalone View
src/test/test_bitcoin.h
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | |||||
struct BasicTestingSetup { | struct BasicTestingSetup { | ||||
ECCVerifyHandle globalVerifyHandle; | ECCVerifyHandle globalVerifyHandle; | ||||
explicit BasicTestingSetup( | explicit BasicTestingSetup( | ||||
const std::string &chainName = CBaseChainParams::MAIN); | const std::string &chainName = CBaseChainParams::MAIN); | ||||
~BasicTestingSetup(); | ~BasicTestingSetup(); | ||||
}; | }; | ||||
/** Testing setup that configures a complete environment. | /** | ||||
* Testing setup that configures a complete environment. | |||||
* Included are data directory, coins database, script check threads setup. | * Included are data directory, coins database, script check threads setup. | ||||
*/ | */ | ||||
class CConnman; | class CConnman; | ||||
class CNode; | class CNode; | ||||
struct CConnmanTest { | struct CConnmanTest { | ||||
static void AddNode(CNode &node); | static void AddNode(CNode &node); | ||||
static void ClearNodes(); | static void ClearNodes(); | ||||
}; | }; | ||||
Show All 25 Lines | struct TestChain100Setup : public TestingSetup { | ||||
// Create a new block with just given transactions, coinbase paying to | // Create a new block with just given transactions, coinbase paying to | ||||
// scriptPubKey, and try to add it to the current chain. | // scriptPubKey, and try to add it to the current chain. | ||||
CBlock CreateAndProcessBlock(const std::vector<CMutableTransaction> &txns, | CBlock CreateAndProcessBlock(const std::vector<CMutableTransaction> &txns, | ||||
const CScript &scriptPubKey); | const CScript &scriptPubKey); | ||||
~TestChain100Setup(); | ~TestChain100Setup(); | ||||
// For convenience, coinbase transactions. | // For convenience, coinbase transactions. | ||||
std::vector<CTransaction> m_coinbase_txns; | std::vector<CTransactionRef> m_coinbase_txns; | ||||
// private/public key needed to spend coinbase transactions. | // private/public key needed to spend coinbase transactions. | ||||
CKey coinbaseKey; | CKey coinbaseKey; | ||||
}; | }; | ||||
class CTxMemPoolEntry; | class CTxMemPoolEntry; | ||||
class CTxMemPool; | class CTxMemPool; | ||||
struct TestMemPoolEntryHelper { | struct TestMemPoolEntryHelper { | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |