aboutsummaryrefslogtreecommitdiffstats
path: root/state
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-11-12 05:51:26 +0800
committerobscuren <geffobscura@gmail.com>2014-11-12 05:52:27 +0800
commit6c9e503eb8d41d331d6a74e69539a06590072190 (patch)
treeb9fd4b7abf20d9a901cd4e0f2dc3d70475cdc527 /state
parent75ee3b3f089e703b728bb301cc6b2abe4c111c41 (diff)
downloadgo-tangerine-6c9e503eb8d41d331d6a74e69539a06590072190.tar
go-tangerine-6c9e503eb8d41d331d6a74e69539a06590072190.tar.gz
go-tangerine-6c9e503eb8d41d331d6a74e69539a06590072190.tar.bz2
go-tangerine-6c9e503eb8d41d331d6a74e69539a06590072190.tar.lz
go-tangerine-6c9e503eb8d41d331d6a74e69539a06590072190.tar.xz
go-tangerine-6c9e503eb8d41d331d6a74e69539a06590072190.tar.zst
go-tangerine-6c9e503eb8d41d331d6a74e69539a06590072190.zip
Removed all implicit logging. Fixed gas issues and jump errors
Diffstat (limited to 'state')
-rw-r--r--state/log.go10
-rw-r--r--state/state.go2
2 files changed, 6 insertions, 6 deletions
diff --git a/state/log.go b/state/log.go
index e61a4186e..49da30535 100644
--- a/state/log.go
+++ b/state/log.go
@@ -13,8 +13,8 @@ type Log struct {
Data []byte
}
-func NewLogFromValue(decoder *ethutil.Value) Log {
- log := Log{
+func NewLogFromValue(decoder *ethutil.Value) *Log {
+ log := &Log{
Address: decoder.Get(0).Bytes(),
Data: decoder.Get(2).Bytes(),
}
@@ -27,15 +27,15 @@ func NewLogFromValue(decoder *ethutil.Value) Log {
return log
}
-func (self Log) RlpData() interface{} {
+func (self *Log) RlpData() interface{} {
return []interface{}{self.Address, ethutil.ByteSliceToInterface(self.Topics), self.Data}
}
-func (self Log) String() string {
+func (self *Log) String() string {
return fmt.Sprintf(`log: %x %x %x`, self.Address, self.Topics, self.Data)
}
-type Logs []Log
+type Logs []*Log
func (self Logs) RlpData() interface{} {
data := make([]interface{}, len(self))
diff --git a/state/state.go b/state/state.go
index 8eb348dda..e3012f019 100644
--- a/state/state.go
+++ b/state/state.go
@@ -37,7 +37,7 @@ func (self *State) EmptyLogs() {
self.logs = nil
}
-func (self *State) AddLog(log Log) {
+func (self *State) AddLog(log *Log) {
self.logs = append(self.logs, log)
}