Skip to content

Commit 26ecf96

Browse files
committed
workaround for first_block metadata
1 parent 00253b4 commit 26ecf96

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

hathor/p2p/sync_v2/streamers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,11 @@ def send_next(self) -> None:
276276
self.sync_agent.send_transactions_end(StreamEnd.TX_NOT_CONFIRMED)
277277
return
278278

279-
# Check if tx is confirmed by `self.current_block`.
279+
# Check if tx is confirmed by the `self.current_block` or any next block.
280280
assert cur_metadata.first_block is not None
281281
assert self.current_block is not None
282-
if cur_metadata.first_block != self.current_block.hash:
282+
first_block = self.tx_storage.get_transaction(cur_metadata.first_block)
283+
if first_block.get_metadata().height < self.current_block.get_metadata().height:
283284
self.log.debug('skipping tx: out of current block')
284285
self.bfs.skip_neighbors(cur)
285286
self.schedule_if_needed()

0 commit comments

Comments
 (0)