diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-07-04 08:50:46 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-07-04 08:50:46 +0800 |
commit | 6f69b4d61f1278ea2d9351667512a1202403eaff (patch) | |
tree | cdaba096d74e5fb7e0a1023708b4458d5cb7da37 /eth | |
parent | efd7da0ce8fc9ac10c2d50ed222c5360c53c17ca (diff) | |
parent | 2feb23c1dacf1cc7ef664d92f28b63dd46502f21 (diff) | |
download | dexon-6f69b4d61f1278ea2d9351667512a1202403eaff.tar dexon-6f69b4d61f1278ea2d9351667512a1202403eaff.tar.gz dexon-6f69b4d61f1278ea2d9351667512a1202403eaff.tar.bz2 dexon-6f69b4d61f1278ea2d9351667512a1202403eaff.tar.lz dexon-6f69b4d61f1278ea2d9351667512a1202403eaff.tar.xz dexon-6f69b4d61f1278ea2d9351667512a1202403eaff.tar.zst dexon-6f69b4d61f1278ea2d9351667512a1202403eaff.zip |
Merge pull request #1399 from obscuren/receipts-storing-fix
core, eth, miner, xeth: receipt storage fix
Diffstat (limited to 'eth')
-rw-r--r-- | eth/gasprice.go | 9 |
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(), |