|
|
@ -260,7 +260,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
tx.vout[0].nValue -= LOWFEE;
|
|
|
|
tx.vout[0].nValue -= LOWFEE;
|
|
|
|
hash = tx.GetHash();
|
|
|
|
hash = tx.GetHash();
|
|
|
|
bool spendsCoinbase = (i == 0) ? true : false; // only first tx spends coinbase
|
|
|
|
bool spendsCoinbase = i == 0; // only first tx spends coinbase
|
|
|
|
// If we don't set the # of sig ops in the CTxMemPoolEntry, template creation fails
|
|
|
|
// If we don't set the # of sig ops in the CTxMemPoolEntry, template creation fails
|
|
|
|
mempool.addUnchecked(hash, entry.Fee(LOWFEE).Time(GetTime()).SpendsCoinbase(spendsCoinbase).FromTx(tx));
|
|
|
|
mempool.addUnchecked(hash, entry.Fee(LOWFEE).Time(GetTime()).SpendsCoinbase(spendsCoinbase).FromTx(tx));
|
|
|
|
tx.vin[0].prevout.hash = hash;
|
|
|
|
tx.vin[0].prevout.hash = hash;
|
|
|
@ -274,7 +274,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
tx.vout[0].nValue -= LOWFEE;
|
|
|
|
tx.vout[0].nValue -= LOWFEE;
|
|
|
|
hash = tx.GetHash();
|
|
|
|
hash = tx.GetHash();
|
|
|
|
bool spendsCoinbase = (i == 0) ? true : false; // only first tx spends coinbase
|
|
|
|
bool spendsCoinbase = i == 0; // only first tx spends coinbase
|
|
|
|
// If we do set the # of sig ops in the CTxMemPoolEntry, template creation passes
|
|
|
|
// If we do set the # of sig ops in the CTxMemPoolEntry, template creation passes
|
|
|
|
mempool.addUnchecked(hash, entry.Fee(LOWFEE).Time(GetTime()).SpendsCoinbase(spendsCoinbase).SigOpsCost(80).FromTx(tx));
|
|
|
|
mempool.addUnchecked(hash, entry.Fee(LOWFEE).Time(GetTime()).SpendsCoinbase(spendsCoinbase).SigOpsCost(80).FromTx(tx));
|
|
|
|
tx.vin[0].prevout.hash = hash;
|
|
|
|
tx.vin[0].prevout.hash = hash;
|
|
|
@ -295,7 +295,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
tx.vout[0].nValue -= LOWFEE;
|
|
|
|
tx.vout[0].nValue -= LOWFEE;
|
|
|
|
hash = tx.GetHash();
|
|
|
|
hash = tx.GetHash();
|
|
|
|
bool spendsCoinbase = (i == 0) ? true : false; // only first tx spends coinbase
|
|
|
|
bool spendsCoinbase = i == 0; // only first tx spends coinbase
|
|
|
|
mempool.addUnchecked(hash, entry.Fee(LOWFEE).Time(GetTime()).SpendsCoinbase(spendsCoinbase).FromTx(tx));
|
|
|
|
mempool.addUnchecked(hash, entry.Fee(LOWFEE).Time(GetTime()).SpendsCoinbase(spendsCoinbase).FromTx(tx));
|
|
|
|
tx.vin[0].prevout.hash = hash;
|
|
|
|
tx.vin[0].prevout.hash = hash;
|
|
|
|
}
|
|
|
|
}
|
|
|
|