Skip to content

Commit

Permalink
chore: Rename variables
Browse files Browse the repository at this point in the history
Signed-off-by: Sophia Koehler <[email protected]>
  • Loading branch information
sophia1ch committed Dec 23, 2024
1 parent d73ca03 commit 2d98975
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions channel/test/randomizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ func NewRandomLockedIDs(rng *rand.Rand, opts ...RandomOpt) []map[wallet.BackendI
return ids
}
numLockedIds := opt.NumLocked(rng)
bIds, err := opt.BackendID()
if err == nil && bIds != nil {
bIDs, err := opt.BackendID()
if err == nil && bIDs != nil {
ids := make([]map[wallet.BackendID]channel.ID, numLockedIds)
for i := range ids {
for j := range bIds {
for j := range bIDs {
ids[i] = make(map[wallet.BackendID]channel.ID)
cID := [32]byte{}
rng.Read(cID[:])
Expand Down Expand Up @@ -264,24 +264,24 @@ func NewRandomChannelID(rng *rand.Rand, opts ...RandomOpt) (id map[wallet.Backen
return id
}
id = make(map[wallet.BackendID]channel.ID)
bIds, err := opt.BackendID()
if bIds != nil && err == nil {
for _, b := range bIds {
bIDs, err := opt.BackendID()
if bIDs != nil && err == nil {
for _, b := range bIDs {
cID := [32]byte{}
rng.Read(cID[:])
id[b] = cID
}
return
}
bId, err := opt.Backend()
bID, err := opt.Backend()
if err != nil {
cID := [32]byte{}
rng.Read(cID[:])
id[0] = cID
} else {
cID := [32]byte{}
rng.Read(cID[:])
id[bId] = cID
id[bID] = cID
}
return
}
Expand Down

0 comments on commit 2d98975

Please sign in to comment.