Commit 9d16611
committed
Track funding negotiation state with an enum
PendingSplice holds a FundingScope being negotiated. However, when
implementing funding negotiation, other states are possible depending on
which party initiated the splice. Using an enum prevents needing various
Option fields which may result in invalid states.
When the user initiates the splice, the FundingNegotiationContext must
be held until the counterparty responds with splice_ack. At that point
enough information becomes available to create a new FundingScope and an
InteractiveTxConstructor.
When the counterparty initiates the splice, both a new FundingScope and
an InteractiveTxConstructor can be created immediately when responding
with splice_ack.
After the transaction is constructed, those are no longer needed. At
that point an InteractiveTxSigningSession is tracked until signatures
are exchanged.1 parent 445fb74 commit 9d16611
1 file changed
+22
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1826 | 1826 | | |
1827 | 1827 | | |
1828 | 1828 | | |
1829 | | - | |
| 1829 | + | |
| 1830 | + | |
1830 | 1831 | | |
1831 | 1832 | | |
1832 | 1833 | | |
| |||
2176 | 2177 | | |
2177 | 2178 | | |
2178 | 2179 | | |
2179 | | - | |
| 2180 | + | |
2180 | 2181 | | |
2181 | 2182 | | |
2182 | 2183 | | |
| |||
2185 | 2186 | | |
2186 | 2187 | | |
2187 | 2188 | | |
| 2189 | + | |
| 2190 | + | |
| 2191 | + | |
| 2192 | + | |
| 2193 | + | |
| 2194 | + | |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
2188 | 2205 | | |
2189 | 2206 | | |
2190 | 2207 | | |
| |||
6711 | 6728 | | |
6712 | 6729 | | |
6713 | 6730 | | |
6714 | | - | |
| 6731 | + | |
| 6732 | + | |
6715 | 6733 | | |
6716 | 6734 | | |
6717 | 6735 | | |
| |||
10212 | 10230 | | |
10213 | 10231 | | |
10214 | 10232 | | |
10215 | | - | |
| 10233 | + | |
10216 | 10234 | | |
10217 | 10235 | | |
10218 | 10236 | | |
| |||
0 commit comments