chancloser: move initFeeBaseline to BeginNegotiation
This commit is contained in:
1 parent
45d30af273
commit
1b0f97a483
1 file changed
+4
-8
@@ -529,10 +529,6 @@ func (c *ChanCloser) ReceiveShutdown(
|
|||||||
// transaction.
|
// transaction.
|
||||||
c.remoteDeliveryScript = msg.Address
|
c.remoteDeliveryScript = msg.Address
|
||||||
|
|
||||||
// Now that we know their desired delivery script, we can
|
|
||||||
// compute what our max/ideal fee will be.
|
|
||||||
c.initFeeBaseline()
|
|
||||||
|
|
||||||
// We'll generate a shutdown message of our own to send across
|
// We'll generate a shutdown message of our own to send across
|
||||||
// the wire.
|
// the wire.
|
||||||
localShutdown, err := c.initChanShutdown()
|
localShutdown, err := c.initChanShutdown()
|
||||||
@@ -586,10 +582,6 @@ func (c *ChanCloser) ReceiveShutdown(
|
|||||||
// think the closing transaction should look like.
|
// think the closing transaction should look like.
|
||||||
c.state = closeAwaitingFlush
|
c.state = closeAwaitingFlush
|
||||||
|
|
||||||
// Now that we know their desired delivery script, we can
|
|
||||||
// compute what our max/ideal fee will be.
|
|
||||||
c.initFeeBaseline()
|
|
||||||
|
|
||||||
// If this is a taproot channel, then we'll want to stash the
|
// If this is a taproot channel, then we'll want to stash the
|
||||||
// local+remote nonces so we can properly create a new musig
|
// local+remote nonces so we can properly create a new musig
|
||||||
// session for signing.
|
// session for signing.
|
||||||
@@ -631,6 +623,10 @@ func (c *ChanCloser) BeginNegotiation() (
|
|||||||
|
|
||||||
switch c.state {
|
switch c.state {
|
||||||
case closeAwaitingFlush:
|
case closeAwaitingFlush:
|
||||||
|
// Now that we know their desired delivery script, we can
|
||||||
|
// compute what our max/ideal fee will be.
|
||||||
|
c.initFeeBaseline()
|
||||||
|
|
||||||
// At this point, we can now start the fee negotiation state, by
|
// At this point, we can now start the fee negotiation state, by
|
||||||
// constructing and sending our initial signature for what we
|
// constructing and sending our initial signature for what we
|
||||||
// think the closing transaction should look like.
|
// think the closing transaction should look like.
|
||||||
|
|||||||
Reference in new issue
Block a user