mirror of https://github.com/status-im/op-geth.git
Remove redundant function
This commit is contained in:
parent
3be9046c21
commit
cd4cc309ae
|
@ -54,21 +54,6 @@ func PutReceipts(db common.Database, receipts types.Receipts) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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
|
// GetReceipt returns a receipt by hash
|
||||||
func GetReceipt(db common.Database, txHash common.Hash) *types.Receipt {
|
func GetReceipt(db common.Database, txHash common.Hash) *types.Receipt {
|
||||||
data, _ := db.Get(append(receiptsPre, txHash[:]...))
|
data, _ := db.Get(append(receiptsPre, txHash[:]...))
|
||||||
|
|
|
@ -413,7 +413,7 @@ type ReceiptRes struct {
|
||||||
Logs *[]interface{} `json:logs`
|
Logs *[]interface{} `json:logs`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewReceiptRes(rec *types.ReceiptForStorage) *ReceiptRes {
|
func NewReceiptRes(rec *types.Receipt) *ReceiptRes {
|
||||||
if rec == nil {
|
if rec == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -368,8 +368,8 @@ func (self *XEth) GetBlockReceipts(bhash common.Hash) types.Receipts {
|
||||||
return self.backend.BlockProcessor().GetBlockReceipts(bhash)
|
return self.backend.BlockProcessor().GetBlockReceipts(bhash)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *XEth) GetTxReceipt(txhash common.Hash) *types.ReceiptForStorage {
|
func (self *XEth) GetTxReceipt(txhash common.Hash) *types.Receipt {
|
||||||
return core.GetFullReceipt(self.backend.ExtraDb(), txhash)
|
return core.GetReceipt(self.backend.ExtraDb(), txhash)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *XEth) GasLimit() *big.Int {
|
func (self *XEth) GasLimit() *big.Int {
|
||||||
|
|
Loading…
Reference in New Issue