File tree Expand file tree Collapse file tree 5 files changed +15
-5
lines changed Expand file tree Collapse file tree 5 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,9 @@ func (b *AllegraBlock) Era() Era {
4848func (b * AllegraBlock ) Transactions () []TransactionBody {
4949 ret := []TransactionBody {}
5050 for _ , v := range b .TransactionBodies {
51- ret = append (ret , & v )
51+ // Create temp var since we take the address and the loop var gets reused
52+ tmpVal := v
53+ ret = append (ret , & tmpVal )
5254 }
5355 return ret
5456}
Original file line number Diff line number Diff line change @@ -49,7 +49,9 @@ func (b *AlonzoBlock) Era() Era {
4949func (b * AlonzoBlock ) Transactions () []TransactionBody {
5050 ret := []TransactionBody {}
5151 for _ , v := range b .TransactionBodies {
52- ret = append (ret , & v )
52+ // Create temp var since we take the address and the loop var gets reused
53+ tmpVal := v
54+ ret = append (ret , & tmpVal )
5355 }
5456 return ret
5557}
Original file line number Diff line number Diff line change @@ -49,7 +49,9 @@ func (b *BabbageBlock) Era() Era {
4949func (b * BabbageBlock ) Transactions () []TransactionBody {
5050 ret := []TransactionBody {}
5151 for _ , v := range b .TransactionBodies {
52- ret = append (ret , & v )
52+ // Create temp var since we take the address and the loop var gets reused
53+ tmpVal := v
54+ ret = append (ret , & tmpVal )
5355 }
5456 return ret
5557}
Original file line number Diff line number Diff line change @@ -48,7 +48,9 @@ func (b *MaryBlock) Era() Era {
4848func (b * MaryBlock ) Transactions () []TransactionBody {
4949 ret := []TransactionBody {}
5050 for _ , v := range b .TransactionBodies {
51- ret = append (ret , & v )
51+ // Create temp var since we take the address and the loop var gets reused
52+ tmpVal := v
53+ ret = append (ret , & tmpVal )
5254 }
5355 return ret
5456}
Original file line number Diff line number Diff line change @@ -48,7 +48,9 @@ func (b *ShelleyBlock) Era() Era {
4848func (b * ShelleyBlock ) Transactions () []TransactionBody {
4949 ret := []TransactionBody {}
5050 for _ , v := range b .TransactionBodies {
51- ret = append (ret , & v )
51+ // Create temp var since we take the address and the loop var gets reused
52+ tmpVal := v
53+ ret = append (ret , & tmpVal )
5254 }
5355 return ret
5456}
You can’t perform that action at this time.
0 commit comments