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
2 changes: 1 addition & 1 deletion cbor/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func DecodeGeneric(cborData []byte, dest interface{}) error {
return errors.New("destination must be a pointer to a struct")
}
destTypeFields := []reflect.StructField{}
for i := 0; i < typeDest.NumField(); i++ {
for i := range typeDest.NumField() {
tmpField := typeDest.Field(i)
if tmpField.IsExported() && tmpField.Name != "DecodeStoreCbor" {
destTypeFields = append(destTypeFields, tmpField)
Expand Down
2 changes: 1 addition & 1 deletion cbor/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func EncodeGeneric(src interface{}) ([]byte, error) {
return nil, errors.New("source must be a pointer to a struct")
}
srcTypeFields := []reflect.StructField{}
for i := 0; i < typeSrc.NumField(); i++ {
for i := range typeSrc.NumField() {
tmpField := typeSrc.Field(i)
if tmpField.IsExported() && tmpField.Name != "DecodeStoreCbor" {
srcTypeFields = append(srcTypeFields, tmpField)
Expand Down
2 changes: 1 addition & 1 deletion cmd/gouroboros/mem_usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func testMemUsage(f *globalFlags) {
)
}()

for i := 0; i < 10; i++ {
for range 10 {
showMemoryStats("open")

conn := createClientConnection(f)
Expand Down
2 changes: 1 addition & 1 deletion ledger/babbage/babbage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestBabbageBlockTransactions(t *testing.T) {
b.TransactionBodies = make([]BabbageTransactionBody, txsCount)
b.TransactionWitnessSets = make([]BabbageTransactionWitnessSet, txsCount)

for i := 0; i < txsCount; i++ {
for i := range txsCount {
b.TransactionBodies[i] = BabbageTransactionBody{
TxTotalCollateral: 1 << i,
}
Expand Down
2 changes: 1 addition & 1 deletion protocol/chainsync/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ func (c *Client) syncLoop() {
}
// Request the next block(s)
msgCount := max(c.config.PipelineLimit, 1)
for i := 0; i < msgCount; i++ {
for range msgCount {
msg := NewMsgRequestNext()
if err := c.SendMessage(msg); err != nil {
c.SendError(err)
Expand Down
Loading