walletrpc: add ListLeases

This commit is contained in:
Joost Jager committed 2021-03-13 08:45:52 +01:00
1 parent b8e54fffbf
commit 9398220568
10 files changed
+411 -123

No files matched your search

+5
View File
@@ -405,6 +405,11 @@ func (b *BtcWallet) LeaseOutput(id wtxmgr.LockID, op wire.OutPoint,
return b.wallet.LeaseOutput(id, op, duration)
}
// ListLeasedOutputs returns a list of all currently locked outputs.
func (b *BtcWallet) ListLeasedOutputs() ([]*wtxmgr.LockedOutput, error) {
return b.wallet.ListLeasedOutputs()
}
// ReleaseOutput unlocks an output, allowing it to be available for coin
// selection if it remains unspent. The ID should match the one used to
// originally lock the output.
+3
View File
@@ -260,6 +260,9 @@ type WalletController interface {
// NOTE: This method requires the global coin selection lock to be held.
ReleaseOutput(id wtxmgr.LockID, op wire.OutPoint) error
// ListLeasedOutputs returns a list of all currently locked outputs.
ListLeasedOutputs() ([]*wtxmgr.LockedOutput, error)
// PublishTransaction performs cursory validation (dust checks, etc),
// then finally broadcasts the passed transaction to the Bitcoin network.
// If the transaction is rejected because it is conflicting with an