Skip to content

fix reorg handling with hot blocks, plus ci and small devops fixes#10

Open
mooncitydev wants to merge 1 commit into
QuantumFusion-network:mainfrom
mooncitydev:fix/hot-blocks-and-ci
Open

fix reorg handling with hot blocks, plus ci and small devops fixes#10
mooncitydev wants to merge 1 commit into
QuantumFusion-network:mainfrom
mooncitydev:fix/hot-blocks-and-ci

Conversation

@mooncitydev

Copy link
Copy Markdown

what changed

  • processor writes: TypeormDatabase runs with supportHotBlocks: true, so the same substrate event ids can be processed again after a chain reorg. Using insert() for transfers, claims, claim creations, and extrinsics can hit duplicate key errors or leave bad rows; these are now upsert() so replays stay idempotent on the primary key (id).

  • npm run build: Replaced rm -rf with npx rimraf so the build works on Windows and matches the pattern already used in commands.json.

  • docker compose: The Postgres healthcheck used -U postgres while POSTGRES_USER comes from DB_USER. If someone changes the user in .env, the db never becomes healthy. The check now uses POSTGRES_USER / POSTGRES_DB inside the container.

  • CI: Added a workflow that runs npm ci and npm run build on pushes and PRs to main, so TypeScript breaks are caught before merge (the existing workflow only runs when Containerfile changes).


made by mooncitydev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant