aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2015-07-04 08:25:04 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-07-04 08:32:10 +0800
commit2feb23c1dacf1cc7ef664d92f28b63dd46502f21 (patch)
tree5532c0a82ae0d39104977f5bc022e024de3043be /eth
parentacd85fe95f025384885ed09560e32b227d80b26f (diff)
downloadgo-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 'eth')
-rw-r--r--eth/gasprice.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/eth/gasprice.go b/eth/gasprice.go
index ddf1c8c09..09ef8cded 100644
--- a/eth/gasprice.go
+++ b/eth/gasprice.go
@@ -131,13 +131,10 @@ func (self *GasPriceOracle) processBlock(block *types.Block) {
// returns the lowers possible price with which a tx was or could have been included
func (self *GasPriceOracle) lowestPrice(block *types.Block) *big.Int {
gasUsed := new(big.Int)
- recepits, err := self.eth.BlockProcessor().GetBlockReceipts(block.Hash())
- if err != nil {
- return self.eth.GpoMinGasPrice
- }
- if len(recepits) > 0 {
- gasUsed = recepits[len(recepits)-1].CumulativeGasUsed
+ receipts := self.eth.BlockProcessor().GetBlockReceipts(block.Hash())
+ if len(receipts) > 0 {
+ gasUsed = receipts[len(receipts)-1].CumulativeGasUsed
}
if new(big.Int).Mul(gasUsed, big.NewInt(100)).Cmp(new(big.Int).Mul(block.GasLimit(),