@@ -155,12 +155,12 @@ void CTxMemPool::UpdateTransactionsFromBlock(const std::vector<uint256>& vHashes
155
155
}
156
156
157
157
util::Result<CTxMemPool::setEntries> CTxMemPool::CalculateAncestorsAndCheckLimits (
158
- size_t entry_size,
158
+ int64_t entry_size,
159
159
size_t entry_count,
160
160
CTxMemPoolEntry::Parents& staged_ancestors,
161
161
const Limits& limits) const
162
162
{
163
- size_t totalSizeWithAncestors = entry_size;
163
+ int64_t totalSizeWithAncestors = entry_size;
164
164
setEntries ancestors;
165
165
166
166
while (!staged_ancestors.empty ()) {
@@ -171,11 +171,11 @@ util::Result<CTxMemPool::setEntries> CTxMemPool::CalculateAncestorsAndCheckLimit
171
171
staged_ancestors.erase (stage);
172
172
totalSizeWithAncestors += stageit->GetTxSize ();
173
173
174
- if (stageit->GetSizeWithDescendants () + entry_size > static_cast < uint64_t >( limits.descendant_size_vbytes ) ) {
174
+ if (stageit->GetSizeWithDescendants () + entry_size > limits.descendant_size_vbytes ) {
175
175
return util::Error{Untranslated (strprintf (" exceeds descendant size limit for tx %s [limit: %u]" , stageit->GetTx ().GetHash ().ToString (), limits.descendant_size_vbytes ))};
176
176
} else if (stageit->GetCountWithDescendants () + entry_count > static_cast <uint64_t >(limits.descendant_count )) {
177
177
return util::Error{Untranslated (strprintf (" too many descendants for tx %s [limit: %u]" , stageit->GetTx ().GetHash ().ToString (), limits.descendant_count ))};
178
- } else if (totalSizeWithAncestors > static_cast < uint64_t >( limits.ancestor_size_vbytes ) ) {
178
+ } else if (totalSizeWithAncestors > limits.ancestor_size_vbytes ) {
179
179
return util::Error{Untranslated (strprintf (" exceeds ancestor size limit [limit: %u]" , limits.ancestor_size_vbytes ))};
180
180
}
181
181
@@ -201,7 +201,7 @@ bool CTxMemPool::CheckPackageLimits(const Package& package,
201
201
std::string &errString) const
202
202
{
203
203
CTxMemPoolEntry::Parents staged_ancestors;
204
- size_t total_size = 0 ;
204
+ int64_t total_size = 0 ;
205
205
for (const auto & tx : package) {
206
206
total_size += GetVirtualTransactionSize (*tx);
207
207
for (const auto & input : tx->vin ) {
0 commit comments