Skip to content

Commit 1990f11

Browse files
MarcoFalkePastaPastaPasta
authored andcommitted
Merge bitcoin#11269: [Mempool] CTxMemPoolEntry::UpdateAncestorState: modifySiagOps param type
203a4aa Fix CTxMemPoolEntry::UpdateAncestorState: modifySigOps param type int -> int64_t (donaloconnor) Pull request description: CTxMemPoolEntry::CTxMemPoolEntry's modifySigOps parameter is int while update_ancestor_state::modifySigOpsCost is int64_t. This issue was raised in bitcoin#11165. It looks like the function paramaters were not changed in commit 72abd2c This will avoid unexpected truncation of int64_t -> int Tree-SHA512: 314c703f217e104336456859066d18fb0d12c4f9f32835e17490a6f29eb05951184095039e4e57edacef8ad35dd75c6d97d9af656a52209dd0c3779b4ffa0914
1 parent a969c8d commit 1990f11

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/txmempool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ void CTxMemPoolEntry::UpdateDescendantState(int64_t modifySize, CAmount modifyFe
319319
assert(int64_t(nCountWithDescendants) > 0);
320320
}
321321

322-
void CTxMemPoolEntry::UpdateAncestorState(int64_t modifySize, CAmount modifyFee, int64_t modifyCount, int modifySigOps)
322+
void CTxMemPoolEntry::UpdateAncestorState(int64_t modifySize, CAmount modifyFee, int64_t modifyCount, int64_t modifySigOps)
323323
{
324324
nSizeWithAncestors += modifySize;
325325
assert(int64_t(nSizeWithAncestors) > 0);

src/txmempool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class CTxMemPoolEntry
113113
// Adjusts the descendant state.
114114
void UpdateDescendantState(int64_t modifySize, CAmount modifyFee, int64_t modifyCount);
115115
// Adjusts the ancestor state
116-
void UpdateAncestorState(int64_t modifySize, CAmount modifyFee, int64_t modifyCount, int modifySigOps);
116+
void UpdateAncestorState(int64_t modifySize, CAmount modifyFee, int64_t modifyCount, int64_t modifySigOps);
117117
// Updates the fee delta used for mining priority score, and the
118118
// modified fees with descendants.
119119
void UpdateFeeDelta(int64_t feeDelta);

0 commit comments

Comments
 (0)