This commit is contained in:
Aayush Rajasekaran 2020-10-06 03:43:20 -04:00
parent ba25806fbd
commit b5907c665b

View File

@ -53,8 +53,12 @@ func TestStore(t *testing.T) {
addrs, err = store.ListChannels()
require.NoError(t, err)
require.Len(t, addrs, 2)
require.Contains(t, addrsStrings(addrs), "t0100")
require.Contains(t, addrsStrings(addrs), "t0200")
t0100, err := address.NewIDAddress(100)
require.NoError(t, err)
t0200, err := address.NewIDAddress(200)
require.NoError(t, err)
require.Contains(t, addrs, t0100)
require.Contains(t, addrs, t0200)
// Request vouchers for channel
vouchers, err := store.VouchersForPaych(*ci.Channel)
@ -79,11 +83,3 @@ func TestStore(t *testing.T) {
_, err = store.AllocateLane(tutils.NewIDAddr(t, 300))
require.Equal(t, err, ErrChannelNotTracked)
}
func addrsStrings(addrs []address.Address) []string {
str := make([]string, len(addrs))
for i, a := range addrs {
str[i] = a.String()
}
return str
}