aboutsummaryrefslogtreecommitdiffstats
path: root/core/state
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-05-23 04:44:51 +0800
committerobscuren <geffobscura@gmail.com>2015-05-28 07:00:23 +0800
commite3253b5d5e65bfb6944ddaabd3c79400fbe06ef8 (patch)
tree1704eb7e374cd810450f604233cad96461a76755 /core/state
parent27e0d2a97325edc9a870a747412d0b9a2abd1ed1 (diff)
downloaddexon-e3253b5d5e65bfb6944ddaabd3c79400fbe06ef8.tar.gz
dexon-e3253b5d5e65bfb6944ddaabd3c79400fbe06ef8.tar.zst
dexon-e3253b5d5e65bfb6944ddaabd3c79400fbe06ef8.zip
core: fixed an issue with storing receipts
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,
+ })
}