Changeset View
Changeset View
Standalone View
Standalone View
src/test/test_bitcoin.cpp
Show First 20 Lines • Show All 197 Lines • ▼ Show 20 Lines | |||||
CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CMutableTransaction &tx, | CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CMutableTransaction &tx, | ||||
CTxMemPool *pool) { | CTxMemPool *pool) { | ||||
return FromTx(MakeTransactionRef(tx), pool); | return FromTx(MakeTransactionRef(tx), pool); | ||||
} | } | ||||
CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CTransactionRef &tx, | CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CTransactionRef &tx, | ||||
CTxMemPool *pool) { | CTxMemPool *pool) { | ||||
// Hack to assume either it's completely dependent on other mempool txs or | return CTxMemPoolEntry(tx, nFee, nTime, nHeight, spendsCoinbase, sigOpCost, | ||||
// not at all. | lp); | ||||
Amount inChainValue = | |||||
pool && pool->HasNoInputsOf(*tx) ? tx->GetValueOut() : Amount::zero(); | |||||
return CTxMemPoolEntry(tx, nFee, nTime, dPriority, nHeight, inChainValue, | |||||
spendsCoinbase, sigOpCost, lp); | |||||
} | } | ||||
/** | /** | ||||
* @returns a real block | * @returns a real block | ||||
* (0000000000013b8ab2cd513b0261a14096412195a72a0c4827d229dcc7e0f7af) with 9 | * (0000000000013b8ab2cd513b0261a14096412195a72a0c4827d229dcc7e0f7af) with 9 | ||||
* txs. | * txs. | ||||
*/ | */ | ||||
CBlock getBlock13b8a() { | CBlock getBlock13b8a() { | ||||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |