lnwallet+mock: add new PSBT methods

This commit is contained in:
Oliver Gugger
2020-10-01 16:21:44 +02:00
parent 9f5f98e736
commit f947576f33
3 changed files with 91 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcutil/psbt"
"github.com/btcsuite/btcwallet/wallet/txauthor"
"github.com/btcsuite/btcwallet/wtxmgr"
@@ -141,6 +142,18 @@ func (w *WalletController) ReleaseOutput(wtxmgr.LockID, wire.OutPoint) error {
return nil
}
// FundPsbt currently does nothing.
func (w *WalletController) FundPsbt(_ *psbt.Packet,
_ chainfee.SatPerKWeight) (int32, error) {
return 0, nil
}
// FinalizePsbt currently does nothing.
func (w *WalletController) FinalizePsbt(_ *psbt.Packet) error {
return nil
}
// PublishTransaction sends a transaction to the PublishedTransactions chan.
func (w *WalletController) PublishTransaction(tx *wire.MsgTx, _ string) error {
w.PublishedTransactions <- tx