mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
sweeper: fix formatting and update error
This commit is contained in:
parent
ebd44ab4c2
commit
8d21042432
1 changed files with 7 additions and 1 deletions
|
|
@ -192,16 +192,22 @@ func (s *Sweeper) GetSweepFee(ctx context.Context,
|
|||
switch destAddr.(type) {
|
||||
case *btcutil.AddressWitnessScriptHash:
|
||||
weightEstimate.AddP2WSHOutput()
|
||||
|
||||
case *btcutil.AddressWitnessPubKeyHash:
|
||||
weightEstimate.AddP2WKHOutput()
|
||||
|
||||
case *btcutil.AddressScriptHash:
|
||||
weightEstimate.AddP2SHOutput()
|
||||
|
||||
case *btcutil.AddressPubKeyHash:
|
||||
weightEstimate.AddP2PKHOutput()
|
||||
|
||||
case *btcutil.AddressTaproot:
|
||||
weightEstimate.AddP2TROutput()
|
||||
|
||||
default:
|
||||
return 0, fmt.Errorf("unknown address type %T", destAddr)
|
||||
return 0, fmt.Errorf("estimate fee: unknown address type %T",
|
||||
destAddr)
|
||||
}
|
||||
|
||||
err = addInputEstimate(&weightEstimate)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue