-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat: auto accept channel #58
Conversation
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.
Generally LTGM. Just some nits.
name = "CKB_OPEN_CHANNEL_MIN_CKB_FUNDING_AMOUNT", | ||
long = "ckb-open-channel-min-ckb-funding-amount", | ||
env, | ||
help = "minimum ckb funding amount for open channel requests, unit: shannons [default: 16100000000 shannons]" |
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.
Can we define a constant for the default value 16100000000
so that we can keep various references to this value in sync?
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.
let's do it in another PR
@@ -1061,6 +1061,11 @@ enum CommitmentSignedFlags { | |||
} | |||
|
|||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] | |||
#[serde( |
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.
What is the purpose of this change?
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.
What is the purpose of this change?
to unify the json format of the output, for example:
"state": {
"state_name": "SIGNING_COMMITMENT",
"state_flags": "OUR_COMMITMENT_SIGNED_SENT | THEIR_COMMITMENT_SIGNED_SENT"
}
|
||
fn get_channel_states(&self, peer_id: Option<PeerId>) -> Vec<(PeerId, Hash256, ChannelState)> { | ||
let prefix = match peer_id { | ||
Some(peer_id) => [&[64], peer_id.as_bytes()].concat(), |
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.
Can use define a constant for the prefix 64 and refer to that constant instead of directly using the literal 64?
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.
let's do it in another PR
No description provided.