aboutsummaryrefslogtreecommitdiffstats
path: root/ethstate/state.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-09-08 06:50:04 +0800
committerobscuren <geffobscura@gmail.com>2014-09-08 06:50:04 +0800
commitd91357d00ca080c63d81570504e5c45fb15e3841 (patch)
tree43abf8cb592bf3e59c8d99c4b027028734f9497d /ethstate/state.go
parent0fea62ec6d33a83e602c804ee4b5b0a7896fd9c6 (diff)
downloadgo-tangerine-d91357d00ca080c63d81570504e5c45fb15e3841.tar.gz
go-tangerine-d91357d00ca080c63d81570504e5c45fb15e3841.tar.zst
go-tangerine-d91357d00ca080c63d81570504e5c45fb15e3841.zip
Added GetCode method
Diffstat (limited to 'ethstate/state.go')
-rw-r--r--ethstate/state.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/ethstate/state.go b/ethstate/state.go
index 2f7f00a32..42bbf021b 100644
--- a/ethstate/state.go
+++ b/ethstate/state.go
@@ -49,6 +49,15 @@ func (self *State) GetNonce(addr []byte) uint64 {
return 0
}
+func (self *State) GetCode(addr []byte) []byte {
+ stateObject := self.GetStateObject(addr)
+ if stateObject != nil {
+ return stateObject.Code
+ }
+
+ return nil
+}
+
//
// Setting, updating & deleting state object methods
//