lnwallet+mock: add new PSBT methods

This commit is contained in:
Oliver Gugger committed 2020-10-03 10:34:39 +02:00
1 parent 9f5f98e736
commit f947576f33
3 files changed
+91

No files matched your search

+13
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