Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion chain/events/filter/event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ func TestEventFilterCollectEvents(t *testing.T) {
}

for _, tc := range testCases {
tc := tc // appease lint
t.Run(tc.name, func(t *testing.T) {
if err := tc.filter.CollectEvents(context.Background(), tc.te, false, addrMap.ResolveAddress); err != nil {
require.NoError(t, err, "collect events")
Expand Down
2 changes: 0 additions & 2 deletions chain/index/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,14 +290,12 @@ func (si *SqliteIndexer) indexTipset(ctx context.Context, tx *sql.Tx, ts *types.
}

for _, blk := range ts.Blocks() {
blk := blk
_, smsgs, err := si.cs.MessagesForBlock(ctx, blk)
if err != nil {
return xerrors.Errorf("failed to get messages for block: %w", err)
}

for _, smsg := range smsgs {
smsg := smsg
if smsg.Signature.Type != crypto.SigTypeDelegated {
continue
}
Expand Down
2 changes: 0 additions & 2 deletions chain/index/pub_sub.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,11 @@ func (si *SqliteIndexer) notifyUpdateSubs() {
si.mu.Lock()
tSubs := make([]*updateSub, 0, len(si.updateSubs))
for _, tSub := range si.updateSubs {
tSub := tSub
tSubs = append(tSubs, tSub)
}
si.mu.Unlock()

for _, tSub := range tSubs {
tSub := tSub
select {
case tSub.ch <- chainIndexUpdated{}:
case <-tSub.ctx.Done():
Expand Down
1 change: 0 additions & 1 deletion chain/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,6 @@ func (cs *ChainStore) LoadTipSet(ctx context.Context, tsk types.TipSetKey) (*typ
cids := tsk.Cids()
blks := make([]*types.BlockHeader, len(cids))
for i, c := range cids {
i, c := i, c
eg.Go(func() error {
b, err := cs.GetBlock(ctx, c)
if err != nil {
Expand Down
2 changes: 0 additions & 2 deletions chain/types/electionproof_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ func TestPoissonFunction(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(fmt.Sprintf("lam-%d-%d", test.lambdaBase, test.lambdaShift), func(t *testing.T) {
b := &bytes.Buffer{}
b.WriteString("icdf\n")
Expand Down Expand Up @@ -58,7 +57,6 @@ func TestLambdaFunction(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(fmt.Sprintf("%s-%s", test.power, test.totalPower), func(t *testing.T) {
pow, ok := new(big.Int).SetString(test.power, 10)
assert.True(t, ok)
Expand Down
2 changes: 0 additions & 2 deletions chain/types/ethtypes/eth_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ func TestEthFilterResultMarshalJSON(t *testing.T) {
}

for _, tc := range testcases {
tc := tc
t.Run("", func(t *testing.T) {
data, err := json.Marshal(tc.res)
require.NoError(t, err)
Expand Down Expand Up @@ -446,7 +445,6 @@ func TestEthAddressListUnmarshalJSON(t *testing.T) {
},
}
for _, tc := range testcases {
tc := tc
t.Run("", func(t *testing.T) {
var got EthAddressList
err := json.Unmarshal([]byte(tc.input), &got)
Expand Down
1 change: 0 additions & 1 deletion chain/types/fil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ func TestFilShort(t *testing.T) {
{fil: "-0.0002212344", expect: "-221.234 μFIL"},
{fil: "-0.00022123444", expect: "-221.234 μFIL"},
} {
s := s
t.Run(s.fil, func(t *testing.T) {
f, err := ParseFIL(s.fil)
require.NoError(t, err)
Expand Down
1 change: 0 additions & 1 deletion chain/types/percent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func TestPercent(t *testing.T) {
{-1012, "-10.12"},
{0, "0.0"},
} {
tc := tc
t.Run(fmt.Sprintf("%d <> %s", tc.p, tc.s), func(t *testing.T) {
m, err := tc.p.MarshalJSON()
require.NoError(t, err)
Expand Down
1 change: 0 additions & 1 deletion node/config/load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ func TestPrintDeprecated(t *testing.T) {
{"set old", "[Old]\nThing1 = 101\nThing2 = 102\n", New{Thing1: 101, Thing2: 102}},
}
for _, tc := range testCases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
v, err := FromReader(bytes.NewReader([]byte(tc.cfg)), &ParentCfg{New: defaultNew})
require.NoError(t, err)
Expand Down
Loading