Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Conflicting Block Entry Resolution #64

Merged
merged 1 commit into from
Dec 6, 2021
Merged

Conversation

itzmeanjan
Copy link
Owner

@itzmeanjan itzmeanjan commented Sep 28, 2021

Why ?

I noticed, sometimes when re-organisations happen, already put block entries need to be updated with latest one found from full node ( via RPC/ WS ), which involves first deleting all packed transactions/ events in that block ( along with self ) & then putting new block entry in database again.

I decided to simplify the flow by introducing cascaded deletion, which requires only calling single function for deleting block entry ( identified using block number ), deletes all transactions/ events previously included in block. Finally call another function to create new block entry, then put transactions/ events.

…tries first perform cascaded deletion of block entry, then create new entry
@itzmeanjan itzmeanjan merged commit 6b2891d into main Dec 6, 2021
@itzmeanjan itzmeanjan deleted the fix-block-insertion branch December 6, 2021 16:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant