| 675 | } |
| 676 | |
| 677 | static inline bool channel_state_closed(enum channel_state state) |
| 678 | { |
| 679 | switch (state) { |
| 680 | case CHANNELD_AWAITING_LOCKIN: |
| 681 | case DUALOPEND_OPEN_INIT: |
| 682 | case DUALOPEND_OPEN_COMMIT_READY: |
| 683 | case DUALOPEND_OPEN_COMMITTED: |
| 684 | case DUALOPEND_AWAITING_LOCKIN: |
| 685 | case CHANNELD_NORMAL: |
| 686 | case CHANNELD_AWAITING_SPLICE: |
| 687 | case CLOSINGD_SIGEXCHANGE: |
| 688 | case CHANNELD_SHUTTING_DOWN: |
| 689 | return false; |
| 690 | case CLOSINGD_COMPLETE: |
| 691 | case AWAITING_UNILATERAL: |
| 692 | case FUNDING_SPEND_SEEN: |
| 693 | case ONCHAIN: |
| 694 | case CLOSED: |
| 695 | return true; |
| 696 | } |
| 697 | abort(); |
| 698 | } |
| 699 | |
| 700 | /* Not even in the database yet? */ |
| 701 | static inline bool channel_state_uncommitted(enum channel_state state) |
no test coverage detected