Skip to content

Commit

Permalink
Fix sign-compare warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
timemarkovqtum committed May 9, 2024
1 parent 559867b commit 1a88307
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/bench/wallet_create_tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static void WalletCreateTx(benchmark::Bench& bench, const OutputType output_type
// Check available balance
auto bal = WITH_LOCK(wallet.cs_wallet, return wallet::AvailableCoins(wallet).GetTotalAmount()); // Cache
constexpr size_t coinbaseMaturity = 2000;
assert(bal == 20000 * COIN * (chain_size - coinbaseMaturity));
assert(bal == (int64_t) (20000 * COIN * (chain_size - coinbaseMaturity)));

wallet::CCoinControl coin_control;
coin_control.m_allow_other_inputs = allow_other_inputs;
Expand Down Expand Up @@ -169,7 +169,7 @@ static void AvailableCoins(benchmark::Bench& bench, const std::vector<OutputType
// Check available balance
auto bal = WITH_LOCK(wallet.cs_wallet, return wallet::AvailableCoins(wallet).GetTotalAmount()); // Cache
constexpr size_t coinbaseMaturity = 2000;
assert(bal == 20000 * COIN * (chain_size - coinbaseMaturity));
assert(bal == (int64_t) (20000 * COIN * (chain_size - coinbaseMaturity)));

bench.epochIterations(2).run([&] {
LOCK(wallet.cs_wallet);
Expand Down
4 changes: 2 additions & 2 deletions src/node/miner.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,11 @@ struct CompareModifiedEntry {
// high gas limit but a low gas price which has a child with a low gas limit but a high gas price
// Without this condition that transaction chain would get priority in being included into the block.
// The two next checks are to see if all our ancestors have been added.
if(a.nSizeWithAncestors == a.iter->GetTxSize() && b.nSizeWithAncestors != b.iter->GetTxSize()) {
if((int64_t) a.nSizeWithAncestors == a.iter->GetTxSize() && (int64_t) b.nSizeWithAncestors != b.iter->GetTxSize()) {
return true;
}

if(b.nSizeWithAncestors == b.iter->GetTxSize() && a.nSizeWithAncestors != a.iter->GetTxSize()) {
if((int64_t) b.nSizeWithAncestors == b.iter->GetTxSize() && (int64_t) a.nSizeWithAncestors != a.iter->GetTxSize()) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion src/script/solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ template <typename C> class Span;
//Make sure is always equal or greater than MINIMUM_GAS_LIMIT (which we can't reference here due to insane header dependency chains)
static const uint64_t STANDARD_MINIMUM_GAS_LIMIT = 10000;
//contract executions with a price cheaper than this (in satoshis) are not standard
//TODO this needs to be controlled by DGP and needs to be propogated from consensus parameters
//TODO this needs to be controlled by DGP and needs to be propagated from consensus parameters
static const uint64_t STANDARD_MINIMUM_GAS_PRICE = 1;

enum class TxoutType {
Expand Down

0 comments on commit 1a88307

Please sign in to comment.