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 {
139
139
}
140
140
141
141
// 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
145
145
}
146
146
147
147
// SetCallCode sets the code of the contract and address of the backing data
148
148
// 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
153
153
}
Original file line number Diff line number Diff line change @@ -31,9 +31,9 @@ import (
31
31
32
32
type Storage map [common.Hash ]common.Hash
33
33
34
- func (self Storage ) Copy () Storage {
34
+ func (s Storage ) Copy () Storage {
35
35
cpy := make (Storage )
36
- for key , value := range self {
36
+ for key , value := range s {
37
37
cpy [key ] = value
38
38
}
39
39
Original file line number Diff line number Diff line change @@ -51,14 +51,14 @@ func (m *Memory) Resize(size uint64) {
51
51
}
52
52
53
53
// 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 ) {
55
55
if size == 0 {
56
56
return nil
57
57
}
58
58
59
- if len (self .store ) > int (offset ) {
59
+ if len (m .store ) > int (offset ) {
60
60
cpy = make ([]byte , size )
61
- copy (cpy , self .store [offset :offset + size ])
61
+ copy (cpy , m .store [offset :offset + size ])
62
62
63
63
return
64
64
}
@@ -67,13 +67,13 @@ func (self *Memory) Get(offset, size int64) (cpy []byte) {
67
67
}
68
68
69
69
// GetPtr returns the offset + size
70
- func (self * Memory ) GetPtr (offset , size int64 ) []byte {
70
+ func (m * Memory ) GetPtr (offset , size int64 ) []byte {
71
71
if size == 0 {
72
72
return nil
73
73
}
74
74
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 ]
77
77
}
78
78
79
79
return nil
Original file line number Diff line number Diff line change @@ -375,10 +375,10 @@ var opCodeToString = map[OpCode]string{
375
375
SWAP : "SWAP" ,
376
376
}
377
377
378
- func (o OpCode ) String () string {
379
- str := opCodeToString [o ]
378
+ func (op OpCode ) String () string {
379
+ str := opCodeToString [op ]
380
380
if len (str ) == 0 {
381
- return fmt .Sprintf ("Missing opcode 0x%x" , int (o ))
381
+ return fmt .Sprintf ("Missing opcode 0x%x" , int (op ))
382
382
}
383
383
384
384
return str
You can’t perform that action at this time.
0 commit comments