Added Number to logs
This commit is contained in:
@@ -54,6 +54,7 @@ type Log struct {
|
||||
address []byte
|
||||
topics [][]byte
|
||||
data []byte
|
||||
log uint64
|
||||
}
|
||||
|
||||
func (self *Log) Address() []byte {
|
||||
@@ -68,6 +69,10 @@ func (self *Log) Data() []byte {
|
||||
return self.data
|
||||
}
|
||||
|
||||
func (self *Log) Number() uint64 {
|
||||
return self.log
|
||||
}
|
||||
|
||||
func (self *Log) RlpData() interface{} {
|
||||
return []interface{}{self.address, ethutil.ByteSliceToInterface(self.topics), self.data}
|
||||
}
|
||||
|
2
vm/vm.go
2
vm/vm.go
@@ -578,7 +578,7 @@ func (self *Vm) Run(me, caller ContextRef, code []byte, value, gas, price *big.I
|
||||
}
|
||||
|
||||
data := mem.Get(mStart.Int64(), mSize.Int64())
|
||||
log := &Log{context.Address(), topics, data}
|
||||
log := &Log{context.Address(), topics, data, self.env.BlockNumber().Uint64()}
|
||||
self.env.AddLog(log)
|
||||
|
||||
self.Printf(" => %v", log)
|
||||
|
Reference in New Issue
Block a user