diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-26 17:19:40 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-26 17:19:40 +0800 |
commit | 145e02fc5444eb878f67c58e310e7c5e324bb27a (patch) | |
tree | 8e0ffc8003c8f3b58cb8cb6edcc2fce2865e59ad /core/chain_makers.go | |
parent | 8d09f95bc7a73aaf567b05028ebdb4f2ac5129e4 (diff) | |
download | go-tangerine-145e02fc5444eb878f67c58e310e7c5e324bb27a.tar.gz go-tangerine-145e02fc5444eb878f67c58e310e7c5e324bb27a.tar.zst go-tangerine-145e02fc5444eb878f67c58e310e7c5e324bb27a.zip |
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
Diffstat (limited to 'core/chain_makers.go')
-rw-r--r-- | core/chain_makers.go | 4 |
1 files changed, 2 insertions, 2 deletions
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()) |