Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coin_mvt: use the lightning_hrp for *all* coin movement currency #6888

Merged
merged 1 commit into from Dec 6, 2023

Conversation

niftynei
Copy link
Collaborator

We were (dumbly?) using the onchain_hrp for 'chain_mvts' and the lightning_hrp for 'channel_mvts'.

This works fine everywhere except for on a signet, where we use different prefixes.

Since the lightning-hrp set is more diversified (testnet btc

  • signet btc use the same HRP 'onchain'), let's use that.

Should have zero impact on anything other than nodes running on signet.

To preserve your current accounts database without needing to delete, restart, execute the following: (note preferrably when your node isn't running).

UPDATE chain_events SET currency = 'tbs' WHERE currency = 'tb';

Fixes #6534

Changelog-Fixed: bkpr-listbalances would crash for nodes on signet with payments in channels, because onchain events were using a different currency than inchannel events.

We were (dumbly?) using the `onchain_hrp` for 'chain_mvts' and the
`lightning_hrp` for 'channel_mvts'.

This works fine everywhere *except* for on a signet, where we use
different prefixes.

Since the lightning-hrp set is more diversified (testnet btc
+ signet btc use the same HRP 'onchain'), let's use that.

Should have zero impact on anything other than nodes running on signet.

To preserve your current accounts database without needing to delete,
restart, execute the following: (note preferrably when your node isn't
running).

```
UPDATE chain_events SET currency = 'tbs' WHERE currency = 'tb';
```

Fixes ElementsProject#6534

Changelog-Fixed: `bkpr-listbalances` would crash for nodes on signet with payments in channels, because onchain events were using a different currency than inchannel events.
Copy link
Collaborator

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 688f3b0

Really good catch

Copy link
Contributor

@chrisguida chrisguida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@niftynei niftynei merged commit df71f2f into ElementsProject:master Dec 6, 2023
38 checks passed
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.

Get account balance returned err for account 7cb4.. tbs channel balance is negative?
3 participants