@@ -739,38 +739,6 @@ module Transactions =
739
739
.AddCoins( coin)
740
740
psbt |> ClaimHTLCTimeoutTx |> Ok
741
741
742
- let makeClaimP2WPKHOutputTx ( delayedOutputTx : Transaction )
743
- ( localDustLimit : Money )
744
- ( localPaymentPubKey : PaymentPubKey )
745
- ( localFinalDestination : IDestination )
746
- ( feeRatePerKw : FeeRatePerKw )
747
- ( network : Network )
748
- : Result < ClaimP2WPKHOutputTx , _ > =
749
- let fee = feeRatePerKw.CalculateFeeFromWeight( CLAIM_ P2WPKH_ OUTPUT_ WEIGHT)
750
- let spk = localPaymentPubKey.RawPubKey() .WitHash.ScriptPubKey
751
- let spkIndex = findScriptPubKeyIndex delayedOutputTx spk
752
- let outPut = delayedOutputTx.Outputs.AsIndexedOutputs() .ElementAt( spkIndex)
753
- let amount = ( outPut) .TxOut.Value - fee
754
- if ( amount < localDustLimit) then
755
- AmountBelowDustLimit amount |> Error
756
- else
757
- let psbt =
758
- let coin = Coin( outPut)
759
- let txb = createDeterministicTransactionBuilder network
760
- // we have already done dust limit check above
761
- txb.DustPrevention <- false
762
- let tx = txb
763
- .AddCoins( coin)
764
- .Send( localFinalDestination, amount)
765
- .SendFees( fee)
766
- .SetLockTime(!> 0 u)
767
- .BuildTransaction( false )
768
- tx.Version <- 2 u
769
- tx.Inputs.[ 0 ]. Sequence <- !> UINT32_ MAX
770
- PSBT.FromTransaction( tx, network)
771
- .AddCoins( coin)
772
- psbt |> ClaimP2WPKHOutputTx|> Ok
773
-
774
742
let makeMainPenaltyTx ( commitTx : Transaction )
775
743
( localDustLimit : Money )
776
744
( remoteRevocationKey : RevocationPubKey )
0 commit comments