Removed all implicit logging. Fixed gas issues and jump errors
This commit is contained in:
10
state/log.go
10
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))
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user