aboutsummaryrefslogtreecommitdiffstats
path: root/core/chain_makers.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-26 17:19:40 +0800
committerobscuren <geffobscura@gmail.com>2015-04-26 17:19:40 +0800
commit145e02fc5444eb878f67c58e310e7c5e324bb27a (patch)
tree8e0ffc8003c8f3b58cb8cb6edcc2fce2865e59ad /core/chain_makers.go
parent8d09f95bc7a73aaf567b05028ebdb4f2ac5129e4 (diff)
downloadgo-tangerine-145e02fc5444eb878f67c58e310e7c5e324bb27a.tar
go-tangerine-145e02fc5444eb878f67c58e310e7c5e324bb27a.tar.gz
go-tangerine-145e02fc5444eb878f67c58e310e7c5e324bb27a.tar.bz2
go-tangerine-145e02fc5444eb878f67c58e310e7c5e324bb27a.tar.lz
go-tangerine-145e02fc5444eb878f67c58e310e7c5e324bb27a.tar.xz
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.go4
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())