Commit Graph

8 Commits

Author SHA1 Message Date
Péter Szilágyi a183ea29f9 core: add upper bound on the queued transctions 2016-09-02 14:15:40 +03:00
Péter Szilágyi 0ef327bbee core, eth, internal, miner: optimize txpool for quick ops 2016-09-02 14:12:03 +03:00
Péter Szilágyi 795b70423e core, eth, miner: only retain 1 tx/nonce, remove bad ones 2016-09-02 14:12:03 +03:00
Felix Lange fc85dd175e core: add missing lock in TxPool.{GetTransaction,RemoveTx}
Fixes #2650
2016-06-03 12:43:33 +02:00
Felix Lange 56ed6152a1 core, eth, miner: improve shutdown synchronisation
Shutting down geth prints hundreds of annoying error messages in some
cases. The errors appear because the Stop method of eth.ProtocolManager,
miner.Miner and core.TxPool is asynchronous. Left over peer sessions
generate events which are processed after Stop even though the database
has already been closed.

The fix is to make Stop synchronous using sync.WaitGroup.

For eth.ProtocolManager, in order to make use of WaitGroup safe, we need
a way to stop new peer sessions from being added while waiting on the
WaitGroup. The eth protocol Run function now selects on a signaling
channel and adds to the WaitGroup only if ProtocolManager is not
shutting down.

For miner.worker and core.TxPool the number of goroutines is static,
WaitGroup can be used in the usual way without additional
synchronisation.
2016-05-09 13:03:08 +02:00
Jeffrey Wilcke f0cbebb19f core: added basic chain configuration
Added chain configuration options and write out during genesis database
insertion. If no "config" was found, nothing is written to the database.

Configurations are written on a per genesis base. This means
that any chain (which is identified by it's genesis hash) can have their
own chain settings.
2016-04-01 01:01:10 +02:00
Leif Jurvetson b7bb2d8589 core: various typos 2016-03-15 11:08:18 -07:00
Jeffrey Wilcke b6d88a0e9f core, core/vm, crypto: fixes for homestead
* Removed some strange code that didn't apply state reverting properly
* Refactored code setting from vm & state transition to the executioner
* Updated tests
2016-02-18 10:11:48 +01:00