aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-02-19 18:02:27 +0800
committerfanquake <fanquake@gmail.com>2021-02-19 18:02:33 +0800
commitf093310b2e18128c4b1c5be360d7c57223891741 (patch)
tree1f27376b939f39261a6562d47c9d0339d1973f64 /src
parent56fe4bb3c52e78aa618fa29b24e8d964475d967c (diff)
parentbedb8d88bcfbfcadcd23e8f3ff4956340fcb028c (diff)
downloadbitcoin-f093310b2e18128c4b1c5be360d7c57223891741.tar.xz
Merge #21228: test: Avoid comparision of integers with different signs
bedb8d88bcfbfcadcd23e8f3ff4956340fcb028c Avoid comparision of integers with different signs (Jonas Schnelli) Pull request description: Fixes an integer comparison of different signs (which errors out on `-Werror,-Wsign-compare`). Introduced in #21121. See https://bitcoinbuilds.org/index.php?ansilog=982c61cf-6969-4001-bebc-dc215e5d29a4.log ACKs for top commit: MarcoFalke: review ACK bedb8d88bcfbfcadcd23e8f3ff4956340fcb028c amitiuttarwar: ACK bedb8d88bcfbfcadcd23e8f3ff4956340fcb028c vasild: ACK bedb8d88bcfbfcadcd23e8f3ff4956340fcb028c Tree-SHA512: cb22a6239a1fc9d0be5573bf6ae4ec379eb7398c88edc8fa2ae4fd721f37f9ca3724896c1ac16de14a5286888a0b631813da32cb62d177ffbf9b2c31e716a7aa
Diffstat (limited to 'src')
-rw-r--r--src/test/miner_tests.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index 9073a5050c..6318eb2e2f 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -123,7 +123,7 @@ void MinerTestingSetup::TestPackageSelection(const CChainParams& chainparams, co
m_node.mempool->addUnchecked(entry.Fee(50000).Time(GetTime()).SpendsCoinbase(false).FromTx(tx));
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[2]->GetHash() == hashHighFeeTx);
BOOST_CHECK(pblocktemplate->block.vtx[3]->GetHash() == hashMediumFeeTx);
@@ -158,7 +158,7 @@ void MinerTestingSetup::TestPackageSelection(const CChainParams& chainparams, co
hashLowFeeTx = tx.GetHash();
m_node.mempool->addUnchecked(entry.Fee(feeToUse+2).FromTx(tx));
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[5]->GetHash() == hashLowFeeTx);
@@ -193,7 +193,7 @@ void MinerTestingSetup::TestPackageSelection(const CChainParams& chainparams, co
tx.vout[0].nValue = 100000000 - 10000; // 10k satoshi fee
m_node.mempool->addUnchecked(entry.Fee(10000).FromTx(tx));
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);
}