aboutsummaryrefslogtreecommitdiffstats
path: root/core/transaction_pool.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-21 17:27:12 +0800
committerobscuren <geffobscura@gmail.com>2015-04-21 17:27:12 +0800
commit093d6d507465263fb9721aa0758b12a31b126c0b (patch)
tree8fcad14601691477757b6fd69611c54214817229 /core/transaction_pool.go
parent1d6d42919e3bd3e24cd9ff2f1534efb41cb5a216 (diff)
downloadgo-tangerine-093d6d507465263fb9721aa0758b12a31b126c0b.tar
go-tangerine-093d6d507465263fb9721aa0758b12a31b126c0b.tar.gz
go-tangerine-093d6d507465263fb9721aa0758b12a31b126c0b.tar.bz2
go-tangerine-093d6d507465263fb9721aa0758b12a31b126c0b.tar.lz
go-tangerine-093d6d507465263fb9721aa0758b12a31b126c0b.tar.xz
go-tangerine-093d6d507465263fb9721aa0758b12a31b126c0b.tar.zst
go-tangerine-093d6d507465263fb9721aa0758b12a31b126c0b.zip
core: removed nonce resetting from the block processor.
All nonce error handling has been moved to the worker
Diffstat (limited to 'core/transaction_pool.go')
-rw-r--r--core/transaction_pool.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/transaction_pool.go b/core/transaction_pool.go
index 94a94f93d..eaddcfa09 100644
--- a/core/transaction_pool.go
+++ b/core/transaction_pool.go
@@ -28,6 +28,8 @@ const txPoolQueueSize = 50
type TxPoolHook chan *types.Transaction
type TxMsg struct{ Tx *types.Transaction }
+type stateFn func() *state.StateDB
+
const (
minGasPrice = 1000000
)
@@ -47,7 +49,7 @@ type TxPool struct {
// Quiting channel
quit chan bool
// The state function which will allow us to do some pre checkes
- currentState func() *state.StateDB
+ currentState stateFn
// The actual pool
txs map[common.Hash]*types.Transaction
invalidHashes *set.Set
@@ -57,7 +59,7 @@ type TxPool struct {
eventMux *event.TypeMux
}
-func NewTxPool(eventMux *event.TypeMux, currentStateFn func() *state.StateDB) *TxPool {
+func NewTxPool(eventMux *event.TypeMux, currentStateFn stateFn) *TxPool {
return &TxPool{
txs: make(map[common.Hash]*types.Transaction),
queueChan: make(chan *types.Transaction, txPoolQueueSize),