diff options
author | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-07-04 08:25:04 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-07-04 08:32:10 +0800 |
commit | 2feb23c1dacf1cc7ef664d92f28b63dd46502f21 (patch) | |
tree | 5532c0a82ae0d39104977f5bc022e024de3043be /core/types | |
parent | acd85fe95f025384885ed09560e32b227d80b26f (diff) | |
download | go-tangerine-2feb23c1dacf1cc7ef664d92f28b63dd46502f21.tar go-tangerine-2feb23c1dacf1cc7ef664d92f28b63dd46502f21.tar.gz go-tangerine-2feb23c1dacf1cc7ef664d92f28b63dd46502f21.tar.bz2 go-tangerine-2feb23c1dacf1cc7ef664d92f28b63dd46502f21.tar.lz go-tangerine-2feb23c1dacf1cc7ef664d92f28b63dd46502f21.tar.xz go-tangerine-2feb23c1dacf1cc7ef664d92f28b63dd46502f21.tar.zst go-tangerine-2feb23c1dacf1cc7ef664d92f28b63dd46502f21.zip |
core, eth, miner, xeth: receipt storage fix
* Added GetReceiptsFromBlock, GetReceipt, PutReceipts
* Added ContractAddress to receipt. See #1042
Diffstat (limited to 'core/types')
-rw-r--r-- | core/types/receipt.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/types/receipt.go b/core/types/receipt.go index 6b4024ada..ab52c6e60 100644 --- a/core/types/receipt.go +++ b/core/types/receipt.go @@ -15,6 +15,8 @@ type Receipt struct { PostState []byte CumulativeGasUsed *big.Int Bloom Bloom + TxHash common.Hash + ContractAddress common.Address logs state.Logs } @@ -39,12 +41,14 @@ func (self *Receipt) DecodeRLP(s *rlp.Stream) error { PostState []byte CumulativeGasUsed *big.Int Bloom Bloom + TxHash common.Hash + ContractAddress common.Address Logs state.Logs } if err := s.Decode(&r); err != nil { return err } - self.PostState, self.CumulativeGasUsed, self.Bloom, self.logs = r.PostState, r.CumulativeGasUsed, r.Bloom, r.Logs + self.PostState, self.CumulativeGasUsed, self.Bloom, self.TxHash, self.ContractAddress, self.logs = r.PostState, r.CumulativeGasUsed, r.Bloom, r.TxHash, r.ContractAddress, r.Logs return nil } @@ -56,7 +60,7 @@ func (self *ReceiptForStorage) EncodeRLP(w io.Writer) error { for i, log := range self.logs { storageLogs[i] = (*state.LogForStorage)(log) } - return rlp.Encode(w, []interface{}{self.PostState, self.CumulativeGasUsed, self.Bloom, storageLogs}) + return rlp.Encode(w, []interface{}{self.PostState, self.CumulativeGasUsed, self.Bloom, self.TxHash, self.ContractAddress, storageLogs}) } func (self *Receipt) RlpEncode() []byte { |