File tree Expand file tree Collapse file tree 4 files changed +18
-18
lines changed Expand file tree Collapse file tree 4 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -139,15 +139,15 @@ func (c *Contract) Value() *big.Int {
139139}
140140
141141// SetCode sets the code to the contract
142- func (self * Contract ) SetCode (hash common.Hash , code []byte ) {
143- self .Code = code
144- self .CodeHash = hash
142+ func (c * Contract ) SetCode (hash common.Hash , code []byte ) {
143+ c .Code = code
144+ c .CodeHash = hash
145145}
146146
147147// SetCallCode sets the code of the contract and address of the backing data
148148// object
149- func (self * Contract ) SetCallCode (addr * common.Address , hash common.Hash , code []byte ) {
150- self .Code = code
151- self .CodeHash = hash
152- self .CodeAddr = addr
149+ func (c * Contract ) SetCallCode (addr * common.Address , hash common.Hash , code []byte ) {
150+ c .Code = code
151+ c .CodeHash = hash
152+ c .CodeAddr = addr
153153}
Original file line number Diff line number Diff line change @@ -31,9 +31,9 @@ import (
3131
3232type Storage map [common.Hash ]common.Hash
3333
34- func (self Storage ) Copy () Storage {
34+ func (s Storage ) Copy () Storage {
3535 cpy := make (Storage )
36- for key , value := range self {
36+ for key , value := range s {
3737 cpy [key ] = value
3838 }
3939
Original file line number Diff line number Diff line change @@ -51,14 +51,14 @@ func (m *Memory) Resize(size uint64) {
5151}
5252
5353// Get returns offset + size as a new slice
54- func (self * Memory ) Get (offset , size int64 ) (cpy []byte ) {
54+ func (m * Memory ) Get (offset , size int64 ) (cpy []byte ) {
5555 if size == 0 {
5656 return nil
5757 }
5858
59- if len (self .store ) > int (offset ) {
59+ if len (m .store ) > int (offset ) {
6060 cpy = make ([]byte , size )
61- copy (cpy , self .store [offset :offset + size ])
61+ copy (cpy , m .store [offset :offset + size ])
6262
6363 return
6464 }
@@ -67,13 +67,13 @@ func (self *Memory) Get(offset, size int64) (cpy []byte) {
6767}
6868
6969// GetPtr returns the offset + size
70- func (self * Memory ) GetPtr (offset , size int64 ) []byte {
70+ func (m * Memory ) GetPtr (offset , size int64 ) []byte {
7171 if size == 0 {
7272 return nil
7373 }
7474
75- if len (self .store ) > int (offset ) {
76- return self .store [offset : offset + size ]
75+ if len (m .store ) > int (offset ) {
76+ return m .store [offset : offset + size ]
7777 }
7878
7979 return nil
Original file line number Diff line number Diff line change @@ -375,10 +375,10 @@ var opCodeToString = map[OpCode]string{
375375 SWAP : "SWAP" ,
376376}
377377
378- func (o OpCode ) String () string {
379- str := opCodeToString [o ]
378+ func (op OpCode ) String () string {
379+ str := opCodeToString [op ]
380380 if len (str ) == 0 {
381- return fmt .Sprintf ("Missing opcode 0x%x" , int (o ))
381+ return fmt .Sprintf ("Missing opcode 0x%x" , int (op ))
382382 }
383383
384384 return str
You can’t perform that action at this time.
0 commit comments