mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-07 21:50:12 +02:00
Avoid comparision of integers with different signs
This commit is contained in:
parent
b805dbb0b9
commit
bedb8d88bc
@ -123,7 +123,7 @@ void MinerTestingSetup::TestPackageSelection(const CChainParams& chainparams, co
|
|||||||
m_node.mempool->addUnchecked(entry.Fee(50000).Time(GetTime()).SpendsCoinbase(false).FromTx(tx));
|
m_node.mempool->addUnchecked(entry.Fee(50000).Time(GetTime()).SpendsCoinbase(false).FromTx(tx));
|
||||||
|
|
||||||
std::unique_ptr<CBlockTemplate> pblocktemplate = AssemblerForTest(chainparams).CreateNewBlock(scriptPubKey);
|
std::unique_ptr<CBlockTemplate> pblocktemplate = AssemblerForTest(chainparams).CreateNewBlock(scriptPubKey);
|
||||||
BOOST_REQUIRE_EQUAL(pblocktemplate->block.vtx.size(), 4);
|
BOOST_REQUIRE_EQUAL(pblocktemplate->block.vtx.size(), 4U);
|
||||||
BOOST_CHECK(pblocktemplate->block.vtx[1]->GetHash() == hashParentTx);
|
BOOST_CHECK(pblocktemplate->block.vtx[1]->GetHash() == hashParentTx);
|
||||||
BOOST_CHECK(pblocktemplate->block.vtx[2]->GetHash() == hashHighFeeTx);
|
BOOST_CHECK(pblocktemplate->block.vtx[2]->GetHash() == hashHighFeeTx);
|
||||||
BOOST_CHECK(pblocktemplate->block.vtx[3]->GetHash() == hashMediumFeeTx);
|
BOOST_CHECK(pblocktemplate->block.vtx[3]->GetHash() == hashMediumFeeTx);
|
||||||
@ -158,7 +158,7 @@ void MinerTestingSetup::TestPackageSelection(const CChainParams& chainparams, co
|
|||||||
hashLowFeeTx = tx.GetHash();
|
hashLowFeeTx = tx.GetHash();
|
||||||
m_node.mempool->addUnchecked(entry.Fee(feeToUse+2).FromTx(tx));
|
m_node.mempool->addUnchecked(entry.Fee(feeToUse+2).FromTx(tx));
|
||||||
pblocktemplate = AssemblerForTest(chainparams).CreateNewBlock(scriptPubKey);
|
pblocktemplate = AssemblerForTest(chainparams).CreateNewBlock(scriptPubKey);
|
||||||
BOOST_REQUIRE_EQUAL(pblocktemplate->block.vtx.size(), 6);
|
BOOST_REQUIRE_EQUAL(pblocktemplate->block.vtx.size(), 6U);
|
||||||
BOOST_CHECK(pblocktemplate->block.vtx[4]->GetHash() == hashFreeTx);
|
BOOST_CHECK(pblocktemplate->block.vtx[4]->GetHash() == hashFreeTx);
|
||||||
BOOST_CHECK(pblocktemplate->block.vtx[5]->GetHash() == hashLowFeeTx);
|
BOOST_CHECK(pblocktemplate->block.vtx[5]->GetHash() == hashLowFeeTx);
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ void MinerTestingSetup::TestPackageSelection(const CChainParams& chainparams, co
|
|||||||
tx.vout[0].nValue = 100000000 - 10000; // 10k satoshi fee
|
tx.vout[0].nValue = 100000000 - 10000; // 10k satoshi fee
|
||||||
m_node.mempool->addUnchecked(entry.Fee(10000).FromTx(tx));
|
m_node.mempool->addUnchecked(entry.Fee(10000).FromTx(tx));
|
||||||
pblocktemplate = AssemblerForTest(chainparams).CreateNewBlock(scriptPubKey);
|
pblocktemplate = AssemblerForTest(chainparams).CreateNewBlock(scriptPubKey);
|
||||||
BOOST_REQUIRE_EQUAL(pblocktemplate->block.vtx.size(), 9);
|
BOOST_REQUIRE_EQUAL(pblocktemplate->block.vtx.size(), 9U);
|
||||||
BOOST_CHECK(pblocktemplate->block.vtx[8]->GetHash() == hashLowFeeTx2);
|
BOOST_CHECK(pblocktemplate->block.vtx[8]->GetHash() == hashLowFeeTx2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user