aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/state_transition.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-08-11 22:23:38 +0800
committerobscuren <geffobscura@gmail.com>2014-08-11 22:23:38 +0800
commita760ce05b948e89bc564af20599dcf95698ac0eb (patch)
treee9a1f0161521bc895de45e683ba6904a0d4923f9 /ethchain/state_transition.go
parent2e5d28c73f1d97865def3ffe8c7ad0a4819f15f3 (diff)
downloadgo-tangerine-a760ce05b948e89bc564af20599dcf95698ac0eb.tar.gz
go-tangerine-a760ce05b948e89bc564af20599dcf95698ac0eb.tar.zst
go-tangerine-a760ce05b948e89bc564af20599dcf95698ac0eb.zip
Updated chain for filtering
Diffstat (limited to 'ethchain/state_transition.go')
-rw-r--r--ethchain/state_transition.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/ethchain/state_transition.go b/ethchain/state_transition.go
index dfcbfcc04..489ff2b6a 100644
--- a/ethchain/state_transition.go
+++ b/ethchain/state_transition.go
@@ -211,6 +211,13 @@ func (self *StateTransition) TransitionState() (err error) {
snapshot = self.state.Copy()
}
+ msg := self.state.Manifest().AddMessage(&ethstate.Message{
+ To: receiver.Address(), From: sender.Address(),
+ Input: self.tx.Data,
+ Origin: sender.Address(),
+ Block: self.block.Hash(), Timestamp: self.block.Time, Coinbase: self.block.Coinbase, Number: self.block.Number,
+ })
+
// Process the init code and create 'valid' contract
if IsContractAddr(self.receiver) {
// Evaluate the initialization script
@@ -226,14 +233,17 @@ func (self *StateTransition) TransitionState() (err error) {
}
receiver.Code = code
+ msg.Output = code
} else {
if len(receiver.Code) > 0 {
- _, err = self.Eval(receiver.Code, receiver, "code")
+ ret, err := self.Eval(receiver.Code, receiver, "code")
if err != nil {
self.state.Set(snapshot)
return fmt.Errorf("Error during code execution %v", err)
}
+
+ msg.Output = ret
}
}