File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ func (b *Block) Decode(r *bytes.Buffer) error {
4242 if err != nil {
4343 return err
4444 }
45- for i := uint64 ( 0 ); i < txCount ; i ++ {
45+ for range txCount {
4646 var tmpTx Transaction
4747 if err := tmpTx .Decode (r ); err != nil {
4848 return err
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ func (c *GenericCovenant) Decode(r io.Reader) error {
4747 if err != nil {
4848 return err
4949 }
50- for i := uint64 ( 0 ); i < itemCount ; i ++ {
50+ for range itemCount {
5151 itemLength , err := binary .ReadUvarint (r .(io.ByteReader ))
5252 if err != nil {
5353 return err
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ func (t *Transaction) Decode(r *bytes.Buffer) error {
5353 if err != nil {
5454 return err
5555 }
56- for i := uint64 ( 0 ); i < inCount ; i ++ {
56+ for range inCount {
5757 var tmpInput TransactionInput
5858 if err := tmpInput .Decode (r ); err != nil {
5959 return err
@@ -65,7 +65,7 @@ func (t *Transaction) Decode(r *bytes.Buffer) error {
6565 if err != nil {
6666 return err
6767 }
68- for i := uint64 ( 0 ); i < outCount ; i ++ {
68+ for range outCount {
6969 var tmpOutput TransactionOutput
7070 if err := tmpOutput .Decode (r ); err != nil {
7171 return err
@@ -87,7 +87,7 @@ func (t *Transaction) Decode(r *bytes.Buffer) error {
8787 origData = make ([]byte , r .Len ())
8888 copy (origData , r .Bytes ())
8989 // Witnesses
90- for i := uint64 ( 0 ); i < inCount ; i ++ {
90+ for i := range inCount {
9191 if err := t .Inputs [i ].DecodeWitness (r ); err != nil {
9292 return err
9393 }
@@ -141,7 +141,7 @@ func (i *TransactionInput) DecodeWitness(r io.Reader) error {
141141 return err
142142 }
143143 i .Witness = make ([][]byte , witnessCount )
144- for j := uint64 ( 0 ); j < witnessCount ; j ++ {
144+ for j := range witnessCount {
145145 itemLength , err := binary .ReadUvarint (r .(io.ByteReader ))
146146 if err != nil {
147147 return err
You can’t perform that action at this time.
0 commit comments