aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-07-05 00:28:30 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-07-05 00:28:30 +0800
commitcd4cc309ae4ead756cbe58ad564b029e874d9832 (patch)
tree4ee1da5ab9196aabf516369cb45c96c1fad444ad
parent3be9046c21920abffa3c5ec81d5aabea8e3bab73 (diff)
downloadgo-tangerine-cd4cc309ae4ead756cbe58ad564b029e874d9832.tar.gz
go-tangerine-cd4cc309ae4ead756cbe58ad564b029e874d9832.tar.zst
go-tangerine-cd4cc309ae4ead756cbe58ad564b029e874d9832.zip
Remove redundant function
-rw-r--r--core/transaction_util.go15
-rw-r--r--rpc/api/parsing.go2
-rw-r--r--xeth/xeth.go4
3 files changed, 3 insertions, 18 deletions
diff --git a/core/transaction_util.go b/core/transaction_util.go
index 61bf023a6..cb5d6c7f7 100644
--- a/core/transaction_util.go
+++ b/core/transaction_util.go
@@ -55,21 +55,6 @@ func PutReceipts(db common.Database, receipts types.Receipts) error {
}
// GetReceipt returns a receipt by hash
-func GetFullReceipt(db common.Database, txHash common.Hash) *types.ReceiptForStorage {
- data, _ := db.Get(append(receiptsPre, txHash[:]...))
- if len(data) == 0 {
- return nil
- }
-
- var receipt types.ReceiptForStorage
- err := rlp.DecodeBytes(data, &receipt)
- if err != nil {
- glog.V(logger.Error).Infoln("GetReceipt err:", err)
- }
- return &receipt
-}
-
-// GetReceipt returns a receipt by hash
func GetReceipt(db common.Database, txHash common.Hash) *types.Receipt {
data, _ := db.Get(append(receiptsPre, txHash[:]...))
if len(data) == 0 {
diff --git a/rpc/api/parsing.go b/rpc/api/parsing.go
index c7edf4325..70e9bf942 100644
--- a/rpc/api/parsing.go
+++ b/rpc/api/parsing.go
@@ -413,7 +413,7 @@ type ReceiptRes struct {
Logs *[]interface{} `json:logs`
}
-func NewReceiptRes(rec *types.ReceiptForStorage) *ReceiptRes {
+func NewReceiptRes(rec *types.Receipt) *ReceiptRes {
if rec == nil {
return nil
}
diff --git a/xeth/xeth.go b/xeth/xeth.go
index 1b7f06821..cbc8dbbde 100644
--- a/xeth/xeth.go
+++ b/xeth/xeth.go
@@ -368,8 +368,8 @@ func (self *XEth) GetBlockReceipts(bhash common.Hash) types.Receipts {
return self.backend.BlockProcessor().GetBlockReceipts(bhash)
}
-func (self *XEth) GetTxReceipt(txhash common.Hash) *types.ReceiptForStorage {
- return core.GetFullReceipt(self.backend.ExtraDb(), txhash)
+func (self *XEth) GetTxReceipt(txhash common.Hash) *types.Receipt {
+ return core.GetReceipt(self.backend.ExtraDb(), txhash)
}
func (self *XEth) GasLimit() *big.Int {