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 internal/handshake/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (b *Block) Decode(r *bytes.Buffer) error {
if err != nil {
return err
}
for i := uint64(0); i < txCount; i++ {
for range txCount {
var tmpTx Transaction
if err := tmpTx.Decode(r); err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion internal/handshake/covenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (c *GenericCovenant) Decode(r io.Reader) error {
if err != nil {
return err
}
for i := uint64(0); i < itemCount; i++ {
for range itemCount {
itemLength, err := binary.ReadUvarint(r.(io.ByteReader))
if err != nil {
return err
Expand Down
8 changes: 4 additions & 4 deletions internal/handshake/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (t *Transaction) Decode(r *bytes.Buffer) error {
if err != nil {
return err
}
for i := uint64(0); i < inCount; i++ {
for range inCount {
var tmpInput TransactionInput
if err := tmpInput.Decode(r); err != nil {
return err
Expand All @@ -65,7 +65,7 @@ func (t *Transaction) Decode(r *bytes.Buffer) error {
if err != nil {
return err
}
for i := uint64(0); i < outCount; i++ {
for range outCount {
var tmpOutput TransactionOutput
if err := tmpOutput.Decode(r); err != nil {
return err
Expand All @@ -87,7 +87,7 @@ func (t *Transaction) Decode(r *bytes.Buffer) error {
origData = make([]byte, r.Len())
copy(origData, r.Bytes())
// Witnesses
for i := uint64(0); i < inCount; i++ {
for i := range inCount {
if err := t.Inputs[i].DecodeWitness(r); err != nil {
return err
}
Expand Down Expand Up @@ -141,7 +141,7 @@ func (i *TransactionInput) DecodeWitness(r io.Reader) error {
return err
}
i.Witness = make([][]byte, witnessCount)
for j := uint64(0); j < witnessCount; j++ {
for j := range witnessCount {
itemLength, err := binary.ReadUvarint(r.(io.ByteReader))
if err != nil {
return err
Expand Down