Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
4b622b27
Commit
4b622b27
authored
May 25, 2019
by
Mohanson
Committed by
Péter Szilágyi
May 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/state: unified function receiver names (#19615)
parent
2cd6059e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
118 additions
and
118 deletions
+118
-118
state_object.go
core/state/state_object.go
+118
-118
No files found.
core/state/state_object.go
View file @
4b622b27
...
@@ -33,23 +33,23 @@ var emptyCodeHash = crypto.Keccak256(nil)
...
@@ -33,23 +33,23 @@ var emptyCodeHash = crypto.Keccak256(nil)
type
Code
[]
byte
type
Code
[]
byte
func
(
self
Code
)
String
()
string
{
func
(
c
Code
)
String
()
string
{
return
string
(
self
)
//strings.Join(Disassemble(self
), " ")
return
string
(
c
)
//strings.Join(Disassemble(c
), " ")
}
}
type
Storage
map
[
common
.
Hash
]
common
.
Hash
type
Storage
map
[
common
.
Hash
]
common
.
Hash
func
(
s
elf
Storage
)
String
()
(
str
string
)
{
func
(
s
Storage
)
String
()
(
str
string
)
{
for
key
,
value
:=
range
s
elf
{
for
key
,
value
:=
range
s
{
str
+=
fmt
.
Sprintf
(
"%X : %X
\n
"
,
key
,
value
)
str
+=
fmt
.
Sprintf
(
"%X : %X
\n
"
,
key
,
value
)
}
}
return
return
}
}
func
(
s
elf
Storage
)
Copy
()
Storage
{
func
(
s
Storage
)
Copy
()
Storage
{
cpy
:=
make
(
Storage
)
cpy
:=
make
(
Storage
)
for
key
,
value
:=
range
s
elf
{
for
key
,
value
:=
range
s
{
cpy
[
key
]
=
value
cpy
[
key
]
=
value
}
}
...
@@ -123,210 +123,210 @@ func newObject(db *StateDB, address common.Address, data Account) *stateObject {
...
@@ -123,210 +123,210 @@ func newObject(db *StateDB, address common.Address, data Account) *stateObject {
}
}
// EncodeRLP implements rlp.Encoder.
// EncodeRLP implements rlp.Encoder.
func
(
c
*
stateObject
)
EncodeRLP
(
w
io
.
Writer
)
error
{
func
(
s
*
stateObject
)
EncodeRLP
(
w
io
.
Writer
)
error
{
return
rlp
.
Encode
(
w
,
c
.
data
)
return
rlp
.
Encode
(
w
,
s
.
data
)
}
}
// setError remembers the first non-nil error it is called with.
// setError remembers the first non-nil error it is called with.
func
(
s
elf
*
stateObject
)
setError
(
err
error
)
{
func
(
s
*
stateObject
)
setError
(
err
error
)
{
if
s
elf
.
dbErr
==
nil
{
if
s
.
dbErr
==
nil
{
s
elf
.
dbErr
=
err
s
.
dbErr
=
err
}
}
}
}
func
(
s
elf
*
stateObject
)
markSuicided
()
{
func
(
s
*
stateObject
)
markSuicided
()
{
s
elf
.
suicided
=
true
s
.
suicided
=
true
}
}
func
(
c
*
stateObject
)
touch
()
{
func
(
s
*
stateObject
)
touch
()
{
c
.
db
.
journal
.
append
(
touchChange
{
s
.
db
.
journal
.
append
(
touchChange
{
account
:
&
c
.
address
,
account
:
&
s
.
address
,
})
})
if
c
.
address
==
ripemd
{
if
s
.
address
==
ripemd
{
// Explicitly put it in the dirty-cache, which is otherwise generated from
// Explicitly put it in the dirty-cache, which is otherwise generated from
// flattened journals.
// flattened journals.
c
.
db
.
journal
.
dirty
(
c
.
address
)
s
.
db
.
journal
.
dirty
(
s
.
address
)
}
}
}
}
func
(
c
*
stateObject
)
getTrie
(
db
Database
)
Trie
{
func
(
s
*
stateObject
)
getTrie
(
db
Database
)
Trie
{
if
c
.
trie
==
nil
{
if
s
.
trie
==
nil
{
var
err
error
var
err
error
c
.
trie
,
err
=
db
.
OpenStorageTrie
(
c
.
addrHash
,
c
.
data
.
Root
)
s
.
trie
,
err
=
db
.
OpenStorageTrie
(
s
.
addrHash
,
s
.
data
.
Root
)
if
err
!=
nil
{
if
err
!=
nil
{
c
.
trie
,
_
=
db
.
OpenStorageTrie
(
c
.
addrHash
,
common
.
Hash
{})
s
.
trie
,
_
=
db
.
OpenStorageTrie
(
s
.
addrHash
,
common
.
Hash
{})
c
.
setError
(
fmt
.
Errorf
(
"can't create storage trie: %v"
,
err
))
s
.
setError
(
fmt
.
Errorf
(
"can't create storage trie: %v"
,
err
))
}
}
}
}
return
c
.
trie
return
s
.
trie
}
}
// GetState retrieves a value from the account storage trie.
// GetState retrieves a value from the account storage trie.
func
(
s
elf
*
stateObject
)
GetState
(
db
Database
,
key
common
.
Hash
)
common
.
Hash
{
func
(
s
*
stateObject
)
GetState
(
db
Database
,
key
common
.
Hash
)
common
.
Hash
{
// If we have a dirty value for this state entry, return it
// If we have a dirty value for this state entry, return it
value
,
dirty
:=
s
elf
.
dirtyStorage
[
key
]
value
,
dirty
:=
s
.
dirtyStorage
[
key
]
if
dirty
{
if
dirty
{
return
value
return
value
}
}
// Otherwise return the entry's original value
// Otherwise return the entry's original value
return
s
elf
.
GetCommittedState
(
db
,
key
)
return
s
.
GetCommittedState
(
db
,
key
)
}
}
// GetCommittedState retrieves a value from the committed account storage trie.
// GetCommittedState retrieves a value from the committed account storage trie.
func
(
s
elf
*
stateObject
)
GetCommittedState
(
db
Database
,
key
common
.
Hash
)
common
.
Hash
{
func
(
s
*
stateObject
)
GetCommittedState
(
db
Database
,
key
common
.
Hash
)
common
.
Hash
{
// If we have the original value cached, return that
// If we have the original value cached, return that
value
,
cached
:=
s
elf
.
originStorage
[
key
]
value
,
cached
:=
s
.
originStorage
[
key
]
if
cached
{
if
cached
{
return
value
return
value
}
}
// Track the amount of time wasted on reading the storge trie
// Track the amount of time wasted on reading the storge trie
if
metrics
.
EnabledExpensive
{
if
metrics
.
EnabledExpensive
{
defer
func
(
start
time
.
Time
)
{
s
elf
.
db
.
StorageReads
+=
time
.
Since
(
start
)
}(
time
.
Now
())
defer
func
(
start
time
.
Time
)
{
s
.
db
.
StorageReads
+=
time
.
Since
(
start
)
}(
time
.
Now
())
}
}
// Otherwise load the value from the database
// Otherwise load the value from the database
enc
,
err
:=
s
elf
.
getTrie
(
db
)
.
TryGet
(
key
[
:
])
enc
,
err
:=
s
.
getTrie
(
db
)
.
TryGet
(
key
[
:
])
if
err
!=
nil
{
if
err
!=
nil
{
s
elf
.
setError
(
err
)
s
.
setError
(
err
)
return
common
.
Hash
{}
return
common
.
Hash
{}
}
}
if
len
(
enc
)
>
0
{
if
len
(
enc
)
>
0
{
_
,
content
,
_
,
err
:=
rlp
.
Split
(
enc
)
_
,
content
,
_
,
err
:=
rlp
.
Split
(
enc
)
if
err
!=
nil
{
if
err
!=
nil
{
s
elf
.
setError
(
err
)
s
.
setError
(
err
)
}
}
value
.
SetBytes
(
content
)
value
.
SetBytes
(
content
)
}
}
s
elf
.
originStorage
[
key
]
=
value
s
.
originStorage
[
key
]
=
value
return
value
return
value
}
}
// SetState updates a value in account storage.
// SetState updates a value in account storage.
func
(
s
elf
*
stateObject
)
SetState
(
db
Database
,
key
,
value
common
.
Hash
)
{
func
(
s
*
stateObject
)
SetState
(
db
Database
,
key
,
value
common
.
Hash
)
{
// If the new value is the same as old, don't set
// If the new value is the same as old, don't set
prev
:=
s
elf
.
GetState
(
db
,
key
)
prev
:=
s
.
GetState
(
db
,
key
)
if
prev
==
value
{
if
prev
==
value
{
return
return
}
}
// New value is different, update and journal the change
// New value is different, update and journal the change
s
elf
.
db
.
journal
.
append
(
storageChange
{
s
.
db
.
journal
.
append
(
storageChange
{
account
:
&
s
elf
.
address
,
account
:
&
s
.
address
,
key
:
key
,
key
:
key
,
prevalue
:
prev
,
prevalue
:
prev
,
})
})
s
elf
.
setState
(
key
,
value
)
s
.
setState
(
key
,
value
)
}
}
func
(
s
elf
*
stateObject
)
setState
(
key
,
value
common
.
Hash
)
{
func
(
s
*
stateObject
)
setState
(
key
,
value
common
.
Hash
)
{
s
elf
.
dirtyStorage
[
key
]
=
value
s
.
dirtyStorage
[
key
]
=
value
}
}
// updateTrie writes cached storage modifications into the object's storage trie.
// updateTrie writes cached storage modifications into the object's storage trie.
func
(
s
elf
*
stateObject
)
updateTrie
(
db
Database
)
Trie
{
func
(
s
*
stateObject
)
updateTrie
(
db
Database
)
Trie
{
// Track the amount of time wasted on updating the storge trie
// Track the amount of time wasted on updating the storge trie
if
metrics
.
EnabledExpensive
{
if
metrics
.
EnabledExpensive
{
defer
func
(
start
time
.
Time
)
{
s
elf
.
db
.
StorageUpdates
+=
time
.
Since
(
start
)
}(
time
.
Now
())
defer
func
(
start
time
.
Time
)
{
s
.
db
.
StorageUpdates
+=
time
.
Since
(
start
)
}(
time
.
Now
())
}
}
// Update all the dirty slots in the trie
// Update all the dirty slots in the trie
tr
:=
s
elf
.
getTrie
(
db
)
tr
:=
s
.
getTrie
(
db
)
for
key
,
value
:=
range
s
elf
.
dirtyStorage
{
for
key
,
value
:=
range
s
.
dirtyStorage
{
delete
(
s
elf
.
dirtyStorage
,
key
)
delete
(
s
.
dirtyStorage
,
key
)
// Skip noop changes, persist actual changes
// Skip noop changes, persist actual changes
if
value
==
s
elf
.
originStorage
[
key
]
{
if
value
==
s
.
originStorage
[
key
]
{
continue
continue
}
}
s
elf
.
originStorage
[
key
]
=
value
s
.
originStorage
[
key
]
=
value
if
(
value
==
common
.
Hash
{})
{
if
(
value
==
common
.
Hash
{})
{
s
elf
.
setError
(
tr
.
TryDelete
(
key
[
:
]))
s
.
setError
(
tr
.
TryDelete
(
key
[
:
]))
continue
continue
}
}
// Encoding []byte cannot fail, ok to ignore the error.
// Encoding []byte cannot fail, ok to ignore the error.
v
,
_
:=
rlp
.
EncodeToBytes
(
bytes
.
TrimLeft
(
value
[
:
],
"
\x00
"
))
v
,
_
:=
rlp
.
EncodeToBytes
(
bytes
.
TrimLeft
(
value
[
:
],
"
\x00
"
))
s
elf
.
setError
(
tr
.
TryUpdate
(
key
[
:
],
v
))
s
.
setError
(
tr
.
TryUpdate
(
key
[
:
],
v
))
}
}
return
tr
return
tr
}
}
// UpdateRoot sets the trie root to the current root hash of
// UpdateRoot sets the trie root to the current root hash of
func
(
s
elf
*
stateObject
)
updateRoot
(
db
Database
)
{
func
(
s
*
stateObject
)
updateRoot
(
db
Database
)
{
s
elf
.
updateTrie
(
db
)
s
.
updateTrie
(
db
)
// Track the amount of time wasted on hashing the storge trie
// Track the amount of time wasted on hashing the storge trie
if
metrics
.
EnabledExpensive
{
if
metrics
.
EnabledExpensive
{
defer
func
(
start
time
.
Time
)
{
s
elf
.
db
.
StorageHashes
+=
time
.
Since
(
start
)
}(
time
.
Now
())
defer
func
(
start
time
.
Time
)
{
s
.
db
.
StorageHashes
+=
time
.
Since
(
start
)
}(
time
.
Now
())
}
}
s
elf
.
data
.
Root
=
self
.
trie
.
Hash
()
s
.
data
.
Root
=
s
.
trie
.
Hash
()
}
}
// CommitTrie the storage trie of the object to db.
// CommitTrie the storage trie of the object to db.
// This updates the trie root.
// This updates the trie root.
func
(
s
elf
*
stateObject
)
CommitTrie
(
db
Database
)
error
{
func
(
s
*
stateObject
)
CommitTrie
(
db
Database
)
error
{
s
elf
.
updateTrie
(
db
)
s
.
updateTrie
(
db
)
if
s
elf
.
dbErr
!=
nil
{
if
s
.
dbErr
!=
nil
{
return
s
elf
.
dbErr
return
s
.
dbErr
}
}
// Track the amount of time wasted on committing the storge trie
// Track the amount of time wasted on committing the storge trie
if
metrics
.
EnabledExpensive
{
if
metrics
.
EnabledExpensive
{
defer
func
(
start
time
.
Time
)
{
s
elf
.
db
.
StorageCommits
+=
time
.
Since
(
start
)
}(
time
.
Now
())
defer
func
(
start
time
.
Time
)
{
s
.
db
.
StorageCommits
+=
time
.
Since
(
start
)
}(
time
.
Now
())
}
}
root
,
err
:=
s
elf
.
trie
.
Commit
(
nil
)
root
,
err
:=
s
.
trie
.
Commit
(
nil
)
if
err
==
nil
{
if
err
==
nil
{
s
elf
.
data
.
Root
=
root
s
.
data
.
Root
=
root
}
}
return
err
return
err
}
}
// AddBalance removes amount from c's balance.
// AddBalance removes amount from c's balance.
// It is used to add funds to the destination account of a transfer.
// It is used to add funds to the destination account of a transfer.
func
(
c
*
stateObject
)
AddBalance
(
amount
*
big
.
Int
)
{
func
(
s
*
stateObject
)
AddBalance
(
amount
*
big
.
Int
)
{
// EIP158: We must check emptiness for the objects such that the account
// EIP158: We must check emptiness for the objects such that the account
// clearing (0,0,0 objects) can take effect.
// clearing (0,0,0 objects) can take effect.
if
amount
.
Sign
()
==
0
{
if
amount
.
Sign
()
==
0
{
if
c
.
empty
()
{
if
s
.
empty
()
{
c
.
touch
()
s
.
touch
()
}
}
return
return
}
}
c
.
SetBalance
(
new
(
big
.
Int
)
.
Add
(
c
.
Balance
(),
amount
))
s
.
SetBalance
(
new
(
big
.
Int
)
.
Add
(
s
.
Balance
(),
amount
))
}
}
// SubBalance removes amount from c's balance.
// SubBalance removes amount from c's balance.
// It is used to remove funds from the origin account of a transfer.
// It is used to remove funds from the origin account of a transfer.
func
(
c
*
stateObject
)
SubBalance
(
amount
*
big
.
Int
)
{
func
(
s
*
stateObject
)
SubBalance
(
amount
*
big
.
Int
)
{
if
amount
.
Sign
()
==
0
{
if
amount
.
Sign
()
==
0
{
return
return
}
}
c
.
SetBalance
(
new
(
big
.
Int
)
.
Sub
(
c
.
Balance
(),
amount
))
s
.
SetBalance
(
new
(
big
.
Int
)
.
Sub
(
s
.
Balance
(),
amount
))
}
}
func
(
s
elf
*
stateObject
)
SetBalance
(
amount
*
big
.
Int
)
{
func
(
s
*
stateObject
)
SetBalance
(
amount
*
big
.
Int
)
{
s
elf
.
db
.
journal
.
append
(
balanceChange
{
s
.
db
.
journal
.
append
(
balanceChange
{
account
:
&
s
elf
.
address
,
account
:
&
s
.
address
,
prev
:
new
(
big
.
Int
)
.
Set
(
s
elf
.
data
.
Balance
),
prev
:
new
(
big
.
Int
)
.
Set
(
s
.
data
.
Balance
),
})
})
s
elf
.
setBalance
(
amount
)
s
.
setBalance
(
amount
)
}
}
func
(
s
elf
*
stateObject
)
setBalance
(
amount
*
big
.
Int
)
{
func
(
s
*
stateObject
)
setBalance
(
amount
*
big
.
Int
)
{
s
elf
.
data
.
Balance
=
amount
s
.
data
.
Balance
=
amount
}
}
// Return the gas back to the origin. Used by the Virtual machine or Closures
// Return the gas back to the origin. Used by the Virtual machine or Closures
func
(
c
*
stateObject
)
ReturnGas
(
gas
*
big
.
Int
)
{}
func
(
s
*
stateObject
)
ReturnGas
(
gas
*
big
.
Int
)
{}
func
(
s
elf
*
stateObject
)
deepCopy
(
db
*
StateDB
)
*
stateObject
{
func
(
s
*
stateObject
)
deepCopy
(
db
*
StateDB
)
*
stateObject
{
stateObject
:=
newObject
(
db
,
s
elf
.
address
,
self
.
data
)
stateObject
:=
newObject
(
db
,
s
.
address
,
s
.
data
)
if
s
elf
.
trie
!=
nil
{
if
s
.
trie
!=
nil
{
stateObject
.
trie
=
db
.
db
.
CopyTrie
(
s
elf
.
trie
)
stateObject
.
trie
=
db
.
db
.
CopyTrie
(
s
.
trie
)
}
}
stateObject
.
code
=
s
elf
.
code
stateObject
.
code
=
s
.
code
stateObject
.
dirtyStorage
=
s
elf
.
dirtyStorage
.
Copy
()
stateObject
.
dirtyStorage
=
s
.
dirtyStorage
.
Copy
()
stateObject
.
originStorage
=
s
elf
.
originStorage
.
Copy
()
stateObject
.
originStorage
=
s
.
originStorage
.
Copy
()
stateObject
.
suicided
=
s
elf
.
suicided
stateObject
.
suicided
=
s
.
suicided
stateObject
.
dirtyCode
=
s
elf
.
dirtyCode
stateObject
.
dirtyCode
=
s
.
dirtyCode
stateObject
.
deleted
=
s
elf
.
deleted
stateObject
.
deleted
=
s
.
deleted
return
stateObject
return
stateObject
}
}
...
@@ -335,69 +335,69 @@ func (self *stateObject) deepCopy(db *StateDB) *stateObject {
...
@@ -335,69 +335,69 @@ func (self *stateObject) deepCopy(db *StateDB) *stateObject {
//
//
// Returns the address of the contract/account
// Returns the address of the contract/account
func
(
c
*
stateObject
)
Address
()
common
.
Address
{
func
(
s
*
stateObject
)
Address
()
common
.
Address
{
return
c
.
address
return
s
.
address
}
}
// Code returns the contract code associated with this object, if any.
// Code returns the contract code associated with this object, if any.
func
(
s
elf
*
stateObject
)
Code
(
db
Database
)
[]
byte
{
func
(
s
*
stateObject
)
Code
(
db
Database
)
[]
byte
{
if
s
elf
.
code
!=
nil
{
if
s
.
code
!=
nil
{
return
s
elf
.
code
return
s
.
code
}
}
if
bytes
.
Equal
(
s
elf
.
CodeHash
(),
emptyCodeHash
)
{
if
bytes
.
Equal
(
s
.
CodeHash
(),
emptyCodeHash
)
{
return
nil
return
nil
}
}
code
,
err
:=
db
.
ContractCode
(
s
elf
.
addrHash
,
common
.
BytesToHash
(
self
.
CodeHash
()))
code
,
err
:=
db
.
ContractCode
(
s
.
addrHash
,
common
.
BytesToHash
(
s
.
CodeHash
()))
if
err
!=
nil
{
if
err
!=
nil
{
s
elf
.
setError
(
fmt
.
Errorf
(
"can't load code hash %x: %v"
,
self
.
CodeHash
(),
err
))
s
.
setError
(
fmt
.
Errorf
(
"can't load code hash %x: %v"
,
s
.
CodeHash
(),
err
))
}
}
s
elf
.
code
=
code
s
.
code
=
code
return
code
return
code
}
}
func
(
s
elf
*
stateObject
)
SetCode
(
codeHash
common
.
Hash
,
code
[]
byte
)
{
func
(
s
*
stateObject
)
SetCode
(
codeHash
common
.
Hash
,
code
[]
byte
)
{
prevcode
:=
s
elf
.
Code
(
self
.
db
.
db
)
prevcode
:=
s
.
Code
(
s
.
db
.
db
)
s
elf
.
db
.
journal
.
append
(
codeChange
{
s
.
db
.
journal
.
append
(
codeChange
{
account
:
&
s
elf
.
address
,
account
:
&
s
.
address
,
prevhash
:
s
elf
.
CodeHash
(),
prevhash
:
s
.
CodeHash
(),
prevcode
:
prevcode
,
prevcode
:
prevcode
,
})
})
s
elf
.
setCode
(
codeHash
,
code
)
s
.
setCode
(
codeHash
,
code
)
}
}
func
(
s
elf
*
stateObject
)
setCode
(
codeHash
common
.
Hash
,
code
[]
byte
)
{
func
(
s
*
stateObject
)
setCode
(
codeHash
common
.
Hash
,
code
[]
byte
)
{
s
elf
.
code
=
code
s
.
code
=
code
s
elf
.
data
.
CodeHash
=
codeHash
[
:
]
s
.
data
.
CodeHash
=
codeHash
[
:
]
s
elf
.
dirtyCode
=
true
s
.
dirtyCode
=
true
}
}
func
(
s
elf
*
stateObject
)
SetNonce
(
nonce
uint64
)
{
func
(
s
*
stateObject
)
SetNonce
(
nonce
uint64
)
{
s
elf
.
db
.
journal
.
append
(
nonceChange
{
s
.
db
.
journal
.
append
(
nonceChange
{
account
:
&
s
elf
.
address
,
account
:
&
s
.
address
,
prev
:
s
elf
.
data
.
Nonce
,
prev
:
s
.
data
.
Nonce
,
})
})
s
elf
.
setNonce
(
nonce
)
s
.
setNonce
(
nonce
)
}
}
func
(
s
elf
*
stateObject
)
setNonce
(
nonce
uint64
)
{
func
(
s
*
stateObject
)
setNonce
(
nonce
uint64
)
{
s
elf
.
data
.
Nonce
=
nonce
s
.
data
.
Nonce
=
nonce
}
}
func
(
s
elf
*
stateObject
)
CodeHash
()
[]
byte
{
func
(
s
*
stateObject
)
CodeHash
()
[]
byte
{
return
s
elf
.
data
.
CodeHash
return
s
.
data
.
CodeHash
}
}
func
(
s
elf
*
stateObject
)
Balance
()
*
big
.
Int
{
func
(
s
*
stateObject
)
Balance
()
*
big
.
Int
{
return
s
elf
.
data
.
Balance
return
s
.
data
.
Balance
}
}
func
(
s
elf
*
stateObject
)
Nonce
()
uint64
{
func
(
s
*
stateObject
)
Nonce
()
uint64
{
return
s
elf
.
data
.
Nonce
return
s
.
data
.
Nonce
}
}
// Never called, but must be present to allow stateObject to be used
// Never called, but must be present to allow stateObject to be used
// as a vm.Account interface that also satisfies the vm.ContractRef
// as a vm.Account interface that also satisfies the vm.ContractRef
// interface. Interfaces are awesome.
// interface. Interfaces are awesome.
func
(
s
elf
*
stateObject
)
Value
()
*
big
.
Int
{
func
(
s
*
stateObject
)
Value
()
*
big
.
Int
{
panic
(
"Value on stateObject should never be called"
)
panic
(
"Value on stateObject should never be called"
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment