@@ -27,8 +27,8 @@ import (
2727type WalletIDByRawIdentityFunc func (rawIdentity []byte ) string
2828
2929type Locker interface {
30- Lock (ctx context.Context , id * token2.ID , txID string , reclaim bool ) (string , error )
31- UnlockIDs (ctx context.Context , ids ... * token2.ID ) []* token2.ID
30+ Lock (ctx context.Context , owner string , id * token2.ID , txID string , reclaim bool ) (string , error )
31+ UnlockIDs (ctx context.Context , owner string , ids ... * token2.ID ) []* token2.ID
3232 UnlockByTxID (ctx context.Context , txID string )
3333 IsLocked (id * token2.ID ) bool
3434}
@@ -43,9 +43,9 @@ func (s *extendedSelector) Select(ctx context.Context, ownerFilter token.OwnerFi
4343}
4444func (s * extendedSelector ) Close () error { return s .Selector .Close () }
4545
46- func (s * extendedSelector ) Unselect (id ... * token2.ID ) {
46+ func (s * extendedSelector ) Unselect (owner string , id ... * token2.ID ) {
4747 if s .Lock != nil {
48- s .Lock .UnlockIDs (context .Background (), id ... )
48+ s .Lock .UnlockIDs (context .Background (), owner , id ... )
4949 }
5050}
5151
@@ -72,7 +72,7 @@ func BenchmarkSelectorSingle(b *testing.B) {
7272 wg .Add (1 )
7373 go func (ids []* token2.ID ) {
7474 defer wg .Done ()
75- s .selector .Unselect (ids ... )
75+ s .selector .Unselect (s . filter . ID (), ids ... )
7676 }(ids )
7777 }
7878 })
@@ -110,7 +110,7 @@ func BenchmarkSelectorParallel(b *testing.B) {
110110 wg .Add (1 )
111111 go func (ids []* token2.ID ) {
112112 defer wg .Done ()
113- s .selector .Unselect (ids ... )
113+ s .selector .Unselect (s . filter . ID (), ids ... )
114114 }(ids )
115115 }
116116 })
@@ -199,7 +199,7 @@ type LockerProviderFunction func() selector.Locker
199199
200200type ExtendedSelector interface {
201201 token.Selector
202- Unselect (id ... * token2.ID )
202+ Unselect (owner string , id ... * token2.ID )
203203}
204204
205205type MockTokenIterator struct {
0 commit comments