mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
Merge #13294: Fix compiler warnings emitted when compiling under stock OpenBSD 6.3
a426098572
Fix compiler warnings emitted when compiling under stock OpenBSD 6.3 (practicalswift)
Pull request description:
Fix compiler warnings emitted when compiling under stock OpenBSD 6.3 (OpenBSD clang version 5.0.1, based on LLVM 5.0.1):
```
random.cpp:182:13: warning: unused function 'GetDevURandom' [-Wunused-function]
static void GetDevURandom(unsigned char *ent32)
^
txmempool.cpp:707:45: warning: comparison of integers of different signs: 'uint64_t' (aka 'unsigned long long') and 'long long' [-Wsign-compare]
assert(it->GetSizeWithDescendants() >= childSizes + it->GetTxSize());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Tree-SHA512: da2ae86218054b10659ea694179433700ac91de8022e06007348168ed5adc3d8c4ad3b32a3fc5783a2cdf1ca7425aff586b839200dd3b226ebff72a7df15f120
This commit is contained in:
commit
26c93edf1d
1 changed files with 3 additions and 3 deletions
|
@ -693,18 +693,18 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const
|
||||||
// Check children against mapNextTx
|
// Check children against mapNextTx
|
||||||
CTxMemPool::setEntries setChildrenCheck;
|
CTxMemPool::setEntries setChildrenCheck;
|
||||||
auto iter = mapNextTx.lower_bound(COutPoint(it->GetTx().GetHash(), 0));
|
auto iter = mapNextTx.lower_bound(COutPoint(it->GetTx().GetHash(), 0));
|
||||||
int64_t childSizes = 0;
|
uint64_t child_sizes = 0;
|
||||||
for (; iter != mapNextTx.end() && iter->first->hash == it->GetTx().GetHash(); ++iter) {
|
for (; iter != mapNextTx.end() && iter->first->hash == it->GetTx().GetHash(); ++iter) {
|
||||||
txiter childit = mapTx.find(iter->second->GetHash());
|
txiter childit = mapTx.find(iter->second->GetHash());
|
||||||
assert(childit != mapTx.end()); // mapNextTx points to in-mempool transactions
|
assert(childit != mapTx.end()); // mapNextTx points to in-mempool transactions
|
||||||
if (setChildrenCheck.insert(childit).second) {
|
if (setChildrenCheck.insert(childit).second) {
|
||||||
childSizes += childit->GetTxSize();
|
child_sizes += childit->GetTxSize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert(setChildrenCheck == GetMemPoolChildren(it));
|
assert(setChildrenCheck == GetMemPoolChildren(it));
|
||||||
// Also check to make sure size is greater than sum with immediate children.
|
// Also check to make sure size is greater than sum with immediate children.
|
||||||
// just a sanity check, not definitive that this calc is correct...
|
// just a sanity check, not definitive that this calc is correct...
|
||||||
assert(it->GetSizeWithDescendants() >= childSizes + it->GetTxSize());
|
assert(it->GetSizeWithDescendants() >= child_sizes + it->GetTxSize());
|
||||||
|
|
||||||
if (fDependsWait)
|
if (fDependsWait)
|
||||||
waitingOnDependants.push_back(&(*it));
|
waitingOnDependants.push_back(&(*it));
|
||||||
|
|
Loading…
Add table
Reference in a new issue