Skip to content

Fix/scan without coin transfer - #12

Merged
longhoangwkm merged 3 commits into
mainfrom
fix/scan-without-coin-transfer
Dec 16, 2025
Merged

Fix/scan without coin transfer#12
longhoangwkm merged 3 commits into
mainfrom
fix/scan-without-coin-transfer

Conversation

@longhoangwkm

Copy link
Copy Markdown
Collaborator

Add network-level coin transfer scanning flag

Problem

Some blockchain networks don't have coin transfer events registered, causing unnecessary trace_block RPC requests and "Coin transfer events not found" errors during block scanning.

Solution

  • Added is_scan_coin_transfers boolean flag to networks table (default: true)
  • Modified ProcessedBlockService to conditionally skip _processCoinTransferEvents() when flag is false
  • Maintained backward compatibility with existing networks (default enabled)

Changes

  • Migration: AddIsScanCoinTransfersToNetworks1734336000000
  • Entity: NetworkEntity.is_scan_coin_transfers
  • Service: Conditional coin transfer processing in scanBlock()
  • Tests: 3 new unit tests covering enabled/disabled/default scenarios

Impact

  • ✅ Reduces unnecessary RPC calls for networks without coin transfers
  • ✅ Eliminates error noise in logs
  • ✅ No breaking changes - defaults to existing behavior

@longhoangwkm
longhoangwkm merged commit bdc946f into main Dec 16, 2025
1 check passed
@longhoangwkm
longhoangwkm deleted the fix/scan-without-coin-transfer branch December 16, 2025 08:11
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