aboutsummaryrefslogtreecommitdiffstats
path: root/core/state
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-05-29 00:01:40 +0800
committerobscuren <geffobscura@gmail.com>2015-05-29 00:01:40 +0800
commitf082c1b8959c1c729a4b62d6ff101d7569e8ba0f (patch)
treed19fdc2e8982a64d93612677dc2722dd41c8dbd3 /core/state
parent70867904a0255bd044851585a9ad2dc34391ced2 (diff)
parentd51d74eb55535db7670ad336d186ea64c6a2ff81 (diff)
downloaddexon-f082c1b8959c1c729a4b62d6ff101d7569e8ba0f.tar
dexon-f082c1b8959c1c729a4b62d6ff101d7569e8ba0f.tar.gz
dexon-f082c1b8959c1c729a4b62d6ff101d7569e8ba0f.tar.bz2
dexon-f082c1b8959c1c729a4b62d6ff101d7569e8ba0f.tar.lz
dexon-f082c1b8959c1c729a4b62d6ff101d7569e8ba0f.tar.xz
dexon-f082c1b8959c1c729a4b62d6ff101d7569e8ba0f.tar.zst
dexon-f082c1b8959c1c729a4b62d6ff101d7569e8ba0f.zip
Merge branch 'release/0.9.26'
Diffstat (limited to 'core/state')
-rw-r--r--core/state/log.go21
1 files changed, 14 insertions, 7 deletions
diff --git a/core/state/log.go b/core/state/log.go
index a7aa784e2..882977061 100644
--- a/core/state/log.go
+++ b/core/state/log.go
@@ -29,15 +29,22 @@ func (self *Log) EncodeRLP(w io.Writer) error {
}
func (self *Log) String() string {
- return fmt.Sprintf(`log: %x %x %x`, self.Address, self.Topics, self.Data)
+ return fmt.Sprintf(`log: %x %x %x %x %d %x %d`, self.Address, self.Topics, self.Data, self.TxHash, self.TxIndex, self.BlockHash, self.Index)
}
type Logs []*Log
-func (self Logs) String() (ret string) {
- for _, log := range self {
- ret += fmt.Sprintf("%v", log)
- }
-
- return "[" + ret + "]"
+type LogForStorage Log
+
+func (self *LogForStorage) EncodeRLP(w io.Writer) error {
+ return rlp.Encode(w, []interface{}{
+ self.Address,
+ self.Topics,
+ self.Data,
+ self.Number,
+ self.TxHash,
+ self.TxIndex,
+ self.BlockHash,
+ self.Index,
+ })
}