Commit Graph

16 Commits

Author SHA1 Message Date
Jeffrey Wilcke
a1d9ef48c5 core, eth, rpc: split out block validator and state processor
This removes the burden on a single object to take care of all
validation and state processing. Now instead the validation is done by
the `core.BlockValidator` (`types.Validator`) that takes care of both
header and uncle validation through the `ValidateBlock` method and state
validation through the `ValidateState` method. The state processing is
done by a new object `core.StateProcessor` (`types.Processor`) and
accepts a new state as input and uses that to process the given block's
transactions (and uncles for rewords) to calculate the state root for
the next block (P_n + 1).
2015-11-18 14:24:42 +01:00
Felix Lange
ae1b5b3ff2 eth, xeth: fix GasPriceOracle goroutine leak
XEth.gpo was being initialized as needed. WithState copies the XEth
struct including the gpo field. If gpo was nil at the time of the copy
and Call or Transact were invoked on it, an additional GPO listenLoop
would be spawned.

Move the lazy initialization to GasPriceOracle instead so the same GPO
instance is shared among all created XEths.

Fixes #1317
Might help with #1930
2015-10-27 18:43:47 +01:00
Péter Szilágyi
402fd6e8c6 core, eth, event, miner, xeth: fix event post / subscription race 2015-10-12 16:22:03 +03:00
Jeffrey Wilcke
7c7692933c cmd/geth, cmd/utils, core, rpc: renamed to blockchain
* Renamed ChainManager to BlockChain
* Checkpointing is no longer required and never really properly worked
when the state was corrupted.
2015-10-04 01:13:56 +02:00
zsfelfoldi
49ece3155c GPO update 2015-08-17 15:20:33 +02:00
Felix Lange
bfbcfbe4a9 all: fix license headers one more time
I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
2015-07-23 18:35:11 +02:00
Felix Lange
3f047be5aa all: update license headers to distiguish GPL/LGPL
All code outside of cmd/ is licensed as LGPL. The headers
now reflect this by calling the whole work "the go-ethereum library".
2015-07-22 18:51:45 +02:00
Felix Lange
ea54283b30 all: update license information 2015-07-07 14:12:44 +02:00
Jeffrey Wilcke
666a7dda36 core, eth, rpc: proper gas used. Closes #1417
Added some additional backward compatibility code for old receipts
2015-07-06 21:18:24 +02:00
Jeffrey Wilcke
2feb23c1da core, eth, miner, xeth: receipt storage fix
* Added GetReceiptsFromBlock, GetReceipt, PutReceipts
* Added ContractAddress to receipt. See #1042
2015-07-04 02:32:10 +02:00
zsfelfoldi
5d9df7348d gpo non-existent block checks 2015-06-29 18:53:04 +02:00
Felix Lange
76821d167a core, eth, rpc: avoid unnecessary block header copying 2015-06-29 18:51:48 +02:00
zsfelfoldi
a977cecbe4 fixed gas price corr. factor 2015-06-15 15:55:38 +02:00
zsfelfoldi
6e212bdc6d fallback for uninitialized GPO config values 2015-06-15 15:55:38 +02:00
zsfelfoldi
2e8016c80d fixed initial base price bug 2015-06-15 15:55:38 +02:00
zsfelfoldi
0930e190a7 added missing source 2015-06-15 15:55:38 +02:00