Skip to content

Commit

Permalink
Merge pull request #1779 from CounterpartyXCP/fixreparse
Browse files Browse the repository at this point in the history
Fix hashes when reparsing
  • Loading branch information
adamkrellenstein authored May 7, 2024
2 parents c58d845 + 0524d43 commit 0a37382
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion counterparty-core/counterpartycore/lib/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,16 @@ def reparse(db, block_index=0):
"difficulty": block["difficulty"],
},
)
parse_block(db, block["block_index"], block["block_time"], reparsing=True)
previous_block = ledger.get_block(db, block["block_index"] - 1)
parse_block(
db,
block["block_index"],
block["block_time"],
previous_ledger_hash=previous_block["ledger_hash"],
previous_txlist_hash=previous_block["txlist_hash"],
previous_messages_hash=previous_block["messages_hash"],
reparsing=True,
)
block_parsed_count += 1
message = generate_progression_message(
block,
Expand Down

0 comments on commit 0a37382

Please sign in to comment.