From 145e02fc5444eb878f67c58e310e7c5e324bb27a Mon Sep 17 00:00:00 2001 From: obscuren Date: Sun, 26 Apr 2015 11:19:40 +0200 Subject: core, miner: added value check on tx validation * Changed CalcGasLimit to no longer need current block * Added a gas * price + value on tx validation * Transactions in the pool are now re-validated once every X --- core/chain_makers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/chain_makers.go') diff --git a/core/chain_makers.go b/core/chain_makers.go index e7a65748e..4512a5493 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -64,7 +64,7 @@ func newBlockFromParent(addr common.Address, parent *types.Block) *types.Block { header.Difficulty = CalcDifficulty(block.Header(), parent.Header()) header.Number = new(big.Int).Add(parent.Header().Number, common.Big1) header.Time = parent.Header().Time + 10 - header.GasLimit = CalcGasLimit(parent, block) + header.GasLimit = CalcGasLimit(parent) block.Td = parent.Td @@ -79,7 +79,7 @@ func makeBlock(bman *BlockProcessor, parent *types.Block, i int, db common.Datab block := newBlockFromParent(addr, parent) state := state.New(block.Root(), db) cbase := state.GetOrNewStateObject(addr) - cbase.SetGasPool(CalcGasLimit(parent, block)) + cbase.SetGasPool(CalcGasLimit(parent)) cbase.AddBalance(BlockReward) state.Update() block.SetRoot(state.Root()) -- cgit