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

fix as_remote conditions #19

Merged
merged 1 commit into from
Jan 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/channel/bolt/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -927,9 +927,9 @@ impl BoltChannel {
self.local_per_commitment_point
};
let payment_basepoint = if as_remote_node {
self.local_keys.payment_basepoint.key
} else {
self.remote_keys.payment_basepoint
} else {
self.local_keys.payment_basepoint.key
};

let mut engine = sha256::Hash::engine();
Expand All @@ -950,9 +950,9 @@ impl BoltChannel {
let secp = Secp256k1::verification_only();

let per_commitment_point = if as_remote_node {
self.local_per_commitment_point
} else {
self.remote_per_commitment_point
} else {
self.local_per_commitment_point
};
let delayed_payment_basepoint = if as_remote_node {
self.remote_keys.delayed_payment_basepoint
Expand All @@ -978,9 +978,9 @@ impl BoltChannel {
let secp = Secp256k1::verification_only();

let revocation_basepoint = if as_remote_node {
self.local_keys.revocation_basepoint.key
} else {
self.remote_keys.revocation_basepoint
} else {
self.local_keys.revocation_basepoint.key
};
let per_commitment_point = if as_remote_node {
self.remote_per_commitment_point
Expand Down Expand Up @@ -1054,9 +1054,9 @@ impl ChannelExtension<BoltExt> for BoltChannel {
self.local_amount_msat
};
let to_remote_amount = if as_remote_node {
self.local_amount_msat
} else {
self.remote_amount_msat
} else {
self.local_amount_msat
};
let to_self_delay = if as_remote_node {
self.remote_params.to_self_delay
Expand Down