Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions chia/full_node/full_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -2903,7 +2903,7 @@ async def broadcast_removed_tx(self, mempool_removals: list[MempoolRemoveInfo])
removals_to_send: dict[bytes32, list[RemovedMempoolItem]] = dict()

for removal_info in mempool_removals:
for internal_mempool_item in removal_info.items:
for transaction_id, internal_mempool_item in removal_info.items.items():
conds = internal_mempool_item.conds
assert conds is not None

Expand All @@ -2915,8 +2915,6 @@ async def broadcast_removed_tx(self, mempool_removals: list[MempoolRemoveInfo])
if len(peer_ids) == 0:
continue

transaction_id = internal_mempool_item.spend_bundle.name()

self.log.debug(f"Broadcasting removed transaction {transaction_id} to wallet peers {peer_ids}")

for peer_id in peer_ids:
Expand Down
6 changes: 3 additions & 3 deletions chia/full_node/mempool.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

@dataclass
class MempoolRemoveInfo:
items: list[InternalMempoolItem]
items: dict[bytes32, InternalMempoolItem]
reason: MempoolRemoveReason


Expand Down Expand Up @@ -340,7 +340,7 @@ def remove_from_pool(self, items: list[bytes32], reason: MempoolRemoveReason) ->
Removes an item from the mempool.
"""
if items == []:
return MempoolRemoveInfo([], reason)
return MempoolRemoveInfo({}, reason)

removed_items: list[MempoolItemInfo] = []
if reason != MempoolRemoveReason.BLOCK_INCLUSION:
Expand All @@ -356,7 +356,7 @@ def remove_from_pool(self, items: list[bytes32], reason: MempoolRemoveReason) ->
item = MempoolItemInfo(int(row[1]), int(row[2]), internal_item.height_added_to_mempool)
removed_items.append(item)

removed_internal_items = [self._items.pop(name) for name in items]
removed_internal_items = {name: self._items.pop(name) for name in items}

for batch in to_batches(items, SQLITE_MAX_VARIABLE_NUMBER):
args = ",".join(["?"] * len(batch.entries))
Expand Down
Loading