Skip to content

Commit

Permalink
Merge pull request #19 from crisdut/fix/as_remote
Browse files Browse the repository at this point in the history
fix as_remote conditions
  • Loading branch information
dr-orlovsky authored Jan 17, 2023
2 parents 3cde223 + 3e1e6f6 commit 42de4d1
Showing 1 changed file with 8 additions and 8 deletions.
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

0 comments on commit 42de4d1

Please sign in to comment.