提交 7b8a47f4 编写于 作者: O obscuren

removed legacy code

上级 0eaa023f
...@@ -126,7 +126,6 @@ func (self *BlockProcessor) ApplyTransactions(coinbase *state.StateObject, state ...@@ -126,7 +126,6 @@ func (self *BlockProcessor) ApplyTransactions(coinbase *state.StateObject, state
cumulativeSum.Add(cumulativeSum, new(big.Int).Mul(txGas, tx.GasPrice())) cumulativeSum.Add(cumulativeSum, new(big.Int).Mul(txGas, tx.GasPrice()))
} }
block.Reward = cumulativeSum
if block.GasUsed().Cmp(totalUsedGas) != 0 { if block.GasUsed().Cmp(totalUsedGas) != 0 {
return nil, ValidationError(fmt.Sprintf("gas used error (%v / %v)", block.GasUsed(), totalUsedGas)) return nil, ValidationError(fmt.Sprintf("gas used error (%v / %v)", block.GasUsed(), totalUsedGas))
} }
......
...@@ -99,7 +99,6 @@ type Block struct { ...@@ -99,7 +99,6 @@ type Block struct {
Td *big.Int Td *big.Int
receipts Receipts receipts Receipts
Reward *big.Int
} }
// StorageBlock defines the RLP encoding of a Block stored in the // StorageBlock defines the RLP encoding of a Block stored in the
...@@ -134,7 +133,7 @@ func NewBlock(parentHash common.Hash, coinbase common.Address, root common.Hash, ...@@ -134,7 +133,7 @@ func NewBlock(parentHash common.Hash, coinbase common.Address, root common.Hash,
GasLimit: new(big.Int), GasLimit: new(big.Int),
} }
header.SetNonce(nonce) header.SetNonce(nonce)
block := &Block{header: header, Reward: new(big.Int)} block := &Block{header: header}
return block return block
} }
......
...@@ -13,9 +13,9 @@ import ( ...@@ -13,9 +13,9 @@ import (
"strings" "strings"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/core/state"
) )
// Block Test JSON Format // Block Test JSON Format
...@@ -172,7 +172,6 @@ func mustConvertGenesis(testGenesis btHeader) *types.Block { ...@@ -172,7 +172,6 @@ func mustConvertGenesis(testGenesis btHeader) *types.Block {
hdr.Number = big.NewInt(0) hdr.Number = big.NewInt(0)
b := types.NewBlockWithHeader(hdr) b := types.NewBlockWithHeader(hdr)
b.Td = new(big.Int) b.Td = new(big.Int)
b.Reward = new(big.Int)
return b return b
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册