-
Notifications
You must be signed in to change notification settings - Fork 123
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
[custom channels]: add decimal display to channel funding blob #1245
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To avoid a circular package dependency between the address and proof package, we move the GenChallengeNUMS function into the assets package. That function is the only reference the proof package has to the address package, so the move removes that dependency.
To resolve another circular dependency issue in an upcoming commit, this time between the address and taprpc package, we move two more functions to another place where they fit better. In general, any RPC package should _not_ have a dependency into other packages, so this was wrong in the first place.
We'll want to re-use the DecDisplayOption method in other places, so we move it from the RPC server to the meta reveal struct itself.
To make it possible that we can sync an asset when querying for the asset meta information, we move the two meta related queries to the address book. That way we can use the sync enabled asset meta fetch in a later commit in the channel funding controller.
With the address book now implementing that method, we can add it to our AssetSyncer interface so we can query asset meta information during channel funding.
In this commit, we check for input asset uniqueness for parcels in the PreBroadcast state, before being converted to a Transfer. This prevents invalid transfers from being published and logged via RPC.
guggero
force-pushed
the
decimal-display-funding-blob
branch
from
December 6, 2024 14:30
85e51bf
to
565ee3c
Compare
Pull Request Test Coverage Report for Build 12200570488Details
💛 - Coveralls |
GeorgeTsagk
approved these changes
Dec 6, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM + tACK 💯
{
"assets": [
{
"asset_utxo": {
"version": 1,
"asset_genesis": {
"genesis_point": "d658833784d47ef01150b4f0cf48d7280eac7519b7c2af99d31457cce103a75e:0",
"name": "itest-asset-cents",
"meta_hash": "7e54bc90a6b94efa013ad03f07d2850e6d7a3d21135038c88e2436fa4ef9bc48",
"asset_id": "644697197164440f0236d85c0d60515922e1ce949d4083caa98d30f9eb155baa"
},
"amount": 400000,
"script_key": "0250aaeb166f4234650d84a2d8a130987aeaf6950206e0905401ee74ff3f8d18e6",
"decimal_display": 4
},
"capacity": 400000,
"local_balance": 400000,
"remote_balance": 0
}
]
}
jharveyb
approved these changes
Dec 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 💯
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1067.
Adds the decimal display value to the channel funding blob, so it can be rendered for
lncli listchannels
andlncli pendingchannels
.To make the code in the funding manager as nice as possible, we first do some refactor.