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

Correctly transition state from NegotiatingFunding to CollaboratingFundingTx #162

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
10 changes: 7 additions & 3 deletions src/fiber/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,9 @@ where
));
}
ChannelState::NegotiatingFunding(_) => {
debug!("Beginning processing tx collaboration command");
debug!("Beginning processing tx collaboration command, and transitioning from {:?} to CollaboratingFundingTx state", state.state);
state.state =
ChannelState::CollaboratingFundingTx(CollaboratingFundingTxFlags::empty());
CollaboratingFundingTxFlags::empty()
}
ChannelState::CollaboratingFundingTx(_)
Expand Down Expand Up @@ -3906,7 +3908,9 @@ impl ChannelActorState {
));
}
ChannelState::NegotiatingFunding(_) => {
debug!("Started negotiating funding tx collaboration");
debug!("Started negotiating funding tx collaboration, and transitioning from {:?} to CollaboratingFundingTx state", self.state);
self.state =
ChannelState::CollaboratingFundingTx(CollaboratingFundingTxFlags::empty());
CollaboratingFundingTxFlags::empty()
}
ChannelState::CollaboratingFundingTx(_)
Expand Down Expand Up @@ -4591,7 +4595,7 @@ impl ChannelActorState {
ChannelState::CollaboratingFundingTx(flags) => flags,
_ => {
panic!(
"Must be in CollaboratingFundingTx state while running update_funding_tx"
"Expect to be in CollaboratingFundingTx state while running update_funding_tx, current state {:?}", &self.state,
);
}
};
Expand Down
Loading