mulit: remove ListLeasedOutputs in LeaseOutput
This commit removes the call toe `ListLeasedOutputs` in `LeaseOutput` - the returned info from `ListLeasedOutputs` can easily be accessed via `FetchInputInfo` and this info is only used at one callsite. `ListLeasedOutputs` then becomes unnecessary here, plus it's very slow and needs to be refactored in `btcwallet` instead.
This commit is contained in:
10 files changed
+17
-34
No files matched your search
@@ -199,11 +199,11 @@ func newMockOutputLeaser() *mockOutputLeaser {
|
||||
}
|
||||
|
||||
func (m *mockOutputLeaser) LeaseOutput(_ wtxmgr.LockID, o wire.OutPoint,
|
||||
t time.Duration) (time.Time, []byte, btcutil.Amount, error) {
|
||||
t time.Duration) (time.Time, error) {
|
||||
|
||||
m.leasedOutputs[o] = struct{}{}
|
||||
|
||||
return time.Now().Add(t), nil, 0, nil
|
||||
return time.Now().Add(t), nil
|
||||
}
|
||||
|
||||
func (m *mockOutputLeaser) ReleaseOutput(_ wtxmgr.LockID,
|
||||
|
||||
Reference in new issue
Block a user