Skip to content

feat(chain): add batch outpoints RPC method with fallback - #476

Open
0xnovabyte wants to merge 1 commit into
PelagusWallet:1.0from
0xnovabyte:feature/batch-outpoints-rpc
Open

feat(chain): add batch outpoints RPC method with fallback#476
0xnovabyte wants to merge 1 commit into
PelagusWallet:1.0from
0xnovabyte:feature/batch-outpoints-rpc

Conversation

@0xnovabyte

Copy link
Copy Markdown

Add getOutpointsForQiAddresses() method that:

  • Uses batch RPC (quai_getOutpointsByAddresses) when available
  • Falls back to concurrent sequential calls if batch not supported
  • Improves wallet scan performance significantly

This prepares Pelagus to use the batch RPC method once it's available in go-quai, while maintaining backwards compatibility with nodes that don't have the batch method yet.

Performance improvement:

  • With batch RPC: 1 round-trip for N addresses
  • Fallback mode: N/5 round-trips (5 concurrent requests)
  • Previous: N sequential round-trips

Add getOutpointsForQiAddresses() method that:
- Uses batch RPC (quai_getOutpointsByAddresses) when available
- Falls back to concurrent sequential calls if batch not supported
- Improves wallet scan performance significantly

This prepares Pelagus to use the batch RPC method once it's available
in go-quai, while maintaining backwards compatibility with nodes that
don't have the batch method yet.

Performance improvement:
- With batch RPC: 1 round-trip for N addresses
- Fallback mode: N/5 round-trips (5 concurrent requests)
- Previous: N sequential round-trips
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