Balance is not updated after receive

Open
#243 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust

Research direction

Start by tracing the stream_incoming handling and the subsequent list_peers balance calculation. Reproduce a paid invoice and compare the first and second list_peers responses to identify why the spendable amount is delayed. Done means the balance reflects the received payment without requiring caller-side polling.

Written by the indexing model from the issue text.

Description

In order to calculate the balance we are summing the spendable amount of all opened channels that return from the list_peers gRPC endpoint.
When we get the a paid invoice via the stream_incoming API we immediately call list_peers and the channels spendable amount is not changed.
This requires us to poll for that and usually in the second attempt the balance is updated.

Dominant language
Rust
Stars
148
Forks
49
Avg merge
4d 5h
Merged PRs (30d)
9

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Blockstream/greenlight

All issues in Blockstream/greenlight

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.