Skip to content

feat(scoring): expose merged scorer output#3

Draft
ovitrif wants to merge 1 commit into
feat/scorer-diagnosticsfrom
codex/scorer-merge-api
Draft

feat(scoring): expose merged scorer output#3
ovitrif wants to merge 1 commit into
feat/scorer-diagnosticsfrom
codex/scorer-merge-api

Conversation

@ovitrif
Copy link
Copy Markdown
Collaborator

@ovitrif ovitrif commented May 15, 2026

Stacked on #2.

This PR adds the small write/merge surface needed by scorer-devkit-style tooling after the diagnostics API from #2:

  • ChannelLiquidities::merge(...) for offline tools that read multiple serialized scorer files, decay them to a shared timestamp, merge overlapping entries with LDK per-channel semantics, preserve unique entries, and write the resulting ChannelLiquidities back out.
  • CombinedScorer::scores() for callers that use the existing CombinedScorer::merge(...) path and then need to explicitly serialize the in-memory combined scorer state. This intentionally differs from CombinedScorer's Writeable impl, which still persists local-only scores.

This keeps the existing runtime persistence behavior unchanged while exposing enough for an external CLI to build a merged score file.

Test plan

  • cargo test -p lightning --lib routing::scoring::tests::

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