aboutsummaryrefslogtreecommitdiffstats
path: root/state
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-04 00:06:54 +0800
committerobscuren <geffobscura@gmail.com>2014-12-04 00:06:54 +0800
commit99853ac3ce57807deb4822dd324186e1d2ee0821 (patch)
tree4c7dc0c8fa1f83d1081f429fa3175b03c9011101 /state
parent82405501872385b240012070bad2f0eda643d423 (diff)
downloadgo-tangerine-99853ac3ce57807deb4822dd324186e1d2ee0821.tar.gz
go-tangerine-99853ac3ce57807deb4822dd324186e1d2ee0821.tar.zst
go-tangerine-99853ac3ce57807deb4822dd324186e1d2ee0821.zip
Moved execution from vm to chain.
This moves call and create to the specified environments. Vms are no longer re-used. Vm uses environment's Call(Code) and Create in order to execute new contracts or transfer value between accounts. State transition now uses the same mechanism described above.
Diffstat (limited to 'state')
-rw-r--r--state/state_object.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/state/state_object.go b/state/state_object.go
index 47c882463..a56e91bc5 100644
--- a/state/state_object.go
+++ b/state/state_object.go
@@ -276,15 +276,14 @@ func (c *StateObject) Init() Code {
return c.InitCode
}
-// To satisfy ClosureRef
-func (self *StateObject) Object() *StateObject {
- return self
-}
-
func (self *StateObject) Root() []byte {
return self.State.Trie.GetRoot()
}
+func (self *StateObject) SetCode(code []byte) {
+ self.Code = code
+}
+
//
// Encoding
//