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

instantout: republish sweepless sweep #745

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sputn1ck
Copy link
Member

This commit changes the instant out fsm to republish the sweep transaction if we restart loop.

This is in draft state, as we also need to republish the sweepless sweep should a new block come in.

This commit changes the instant out fsm to
republish the sweep transaction if we restart
loop.
}

// PublishSweeplessSweepAction publishes the sweepless sweep transaction.
func (f *FSM) PublishSweeplessSweepAction(eventCtx fsm.EventContext) fsm.EventType {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_ fsm.EventContext fixes lll

OnPreimagePushed = fsm.EventType("OnPreimagePushed")
// OnSweeplessSweepBuilt is the event that is triggered when the preimage
// is pushed to the server and the sweepless sweep tx has been built.
OnSweeplessSweepBuilt = fsm.EventType("OnPreimagePushed")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix event name

fsm.OnError: Failed,
OnErrorPublishHtlc: PublishHtlc,
OnRecover: PushPreimage,
OnSweeplessSweepBuilt: PublishSweeplessSweep,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is cleaner if we extract the sweepless sweep tx creation from PushPreiamgeAction to PublishSweeplessSweepAction and then rename the transition OnSweeplessSweepBuilt to OnPreimagePushed.
WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants