Skip to content

Instantly share code, notes, and snippets.

@Roasbeef
Created January 3, 2024 00:27
Show Gist options
  • Save Roasbeef/acc4ff51b9dff127230228a05553cdfe to your computer and use it in GitHub Desktop.
Save Roasbeef/acc4ff51b9dff127230228a05553cdfe to your computer and use it in GitHub Desktop.
co-op-close-v2
---
title: Co-Op Close V2
---
stateDiagram-v2
    state CoopCloseV2 {
    [*] --> ChannelActive
    ChannelActive --> ShutdownPending: send_shutdown
    ChannelActive --> ShutdownPending: shutdown_received

	ShutdownPending --> ChannelFlushing: shutdown_received
    ShutdownPending --> ChannelFlushing: shutdown_complete
    
    ChannelFlushing --> ClosingNegotiation: channel_flushed

    state ClosingNegotiation {
		direction TB
        [*] --> LocalCloseStart
        [*] --> RemoteCloseStart
        
        LocalCloseStart --> LocalOfferSent: send_offer
        LocalOfferSent --> ClosePending: local_sig_received
        
        RemoteCloseStart --> ClosePending: offer_received
    }
    
    ClosingNegotiation --> ShutdownPending: send_shutdown
    ClosingNegotiation --> ShutdownPending: shutdown_received
   
    ClosingNegotiation --> CloseFin: txn_confirmation
    }
Loading
@ziggie1984
Copy link

which tool do you use to build this flow-chart ?

@Roasbeef
Copy link
Author

Roasbeef commented Jan 30, 2024 via email

@Roasbeef
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment