github-vet / github-vet/rangeloop-pointer-findings
Oneledger/protocol: app/controller.go; 13 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [Oneledger/protocol](https://www.github.com/Oneledger/protocol) at [app/controller.go](https://github.com/Oneledger/protocol/blob/da91af0989196f6958b90940d3f93cdf3ddb2800/app/controller.go#L426-L438)
Below is the message reported by the analyzer for this snippet of code. Beware that the analyzer only reports the first issue it finds, so please do not limit your consideration to the contents of the below message.
> reference to t was used in a composite literal at line 428
[Click here to see the code in its original context.](https://github.com/Oneledger/protocol/blob/da91af0989196f6958b90940d3f93cdf3ddb2800/app/controller.go#L426-L438)
Click here to show the 13 line(s) of Go which triggered the analyzer.
```go
for _, t := range btcTracker {
ctx := bitcoin.BTCTransitionContext{&t, js.WithChain(chain.BITCOIN), validators}
stt, err := event.BtcEngine.Process(t.NextStep(), ctx, transition.Status(t.State))
if err != nil {
continue
}
if stt != -1 {
t.State = bitcoin.TrackerState(stt)
err = ts.SetTracker(t.Name, &t)
}
}
```
Leave a reaction on this issue to contribute to the project by classifying this instance as a **Bug** :-1:, **Mitigated** :+1:, or **Desirable Behavior** :rocket:
See the descriptions of the classifications [here](https://github.com/github-vet/rangeclosure-findings#how-can-i-help) for more information.
commit ID: da91af0989196f6958b90940d3f93cdf3ddb2800
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.