File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,8 @@ func (s *CoinSelect) SelectCoins(ctx context.Context,
85
85
},
86
86
)
87
87
if len (compatibleCommitments ) == 0 {
88
- return nil , ErrMatchingAssetsNotFound
88
+ return nil , fmt .Errorf ("%w: no compatible commitments for max " +
89
+ "version %v" , ErrMatchingAssetsNotFound , maxVersion )
89
90
}
90
91
91
92
selectedCoins , err := s .selectForAmount (
@@ -191,7 +192,9 @@ func (s *CoinSelect) selectForAmount(minTotalAmount uint64,
191
192
// Having examined all the eligible commitments, return an error if the
192
193
// minimal funding amount was not reached.
193
194
if amountSum < minTotalAmount {
194
- return nil , ErrMatchingAssetsNotFound
195
+ return nil , fmt .Errorf ("%w: insufficient amount available, " +
196
+ "have %d, want %d" , ErrMatchingAssetsNotFound ,
197
+ amountSum , minTotalAmount )
195
198
}
196
199
return selectedCommitments , nil
197
200
}
You can’t perform that action at this time.
0 commit comments