aboutsummaryrefslogtreecommitdiffstats
path: root/core/tx_pool.go
diff options
context:
space:
mode:
authorBojie Wu <bojie@dexon.org>2018-10-09 13:28:45 +0800
committerWei-Ning Huang <w@dexon.org>2018-12-19 20:54:27 +0800
commit92bb88eee90bc2e5aca19c9aedc618652f834c81 (patch)
treed6420b588d1c5b268098102b1fdcd41ee2d6fd8a /core/tx_pool.go
parent99255b12f77756e87560aefacd9db9c763654311 (diff)
downloaddexon-92bb88eee90bc2e5aca19c9aedc618652f834c81.tar
dexon-92bb88eee90bc2e5aca19c9aedc618652f834c81.tar.gz
dexon-92bb88eee90bc2e5aca19c9aedc618652f834c81.tar.bz2
dexon-92bb88eee90bc2e5aca19c9aedc618652f834c81.tar.lz
dexon-92bb88eee90bc2e5aca19c9aedc618652f834c81.tar.xz
dexon-92bb88eee90bc2e5aca19c9aedc618652f834c81.tar.zst
dexon-92bb88eee90bc2e5aca19c9aedc618652f834c81.zip
dex: implement dexon application interface
Diffstat (limited to 'core/tx_pool.go')
-rw-r--r--core/tx_pool.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/core/tx_pool.go b/core/tx_pool.go
index 1304f77ff..db9a6b9f9 100644
--- a/core/tx_pool.go
+++ b/core/tx_pool.go
@@ -296,11 +296,11 @@ func (pool *TxPool) loop() {
pool.mu.Unlock()
}
- // Be unsubscribed due to system stopped
+ // Be unsubscribed due to system stopped
case <-pool.chainHeadSub.Err():
return
- // Handle stats reporting ticks
+ // Handle stats reporting ticks
case <-report.C:
pool.mu.RLock()
pending, queued := pool.stats()
@@ -312,7 +312,7 @@ func (pool *TxPool) loop() {
prevPending, prevQueued, prevStales = pending, queued, stales
}
- // Handle inactive account transaction eviction
+ // Handle inactive account transaction eviction
case <-evict.C:
pool.mu.Lock()
for addr := range pool.queue {
@@ -329,7 +329,7 @@ func (pool *TxPool) loop() {
}
pool.mu.Unlock()
- // Handle local transaction journal rotation
+ // Handle local transaction journal rotation
case <-journal.C:
if pool.journal != nil {
pool.mu.Lock()
@@ -1137,6 +1137,10 @@ func (pool *TxPool) demoteUnexecutables() {
}
}
+func (pool *TxPool) ValidateTx(tx *types.Transaction, local bool) error {
+ return pool.validateTx(tx, local)
+}
+
// addressByHeartbeat is an account address tagged with its last activity timestamp.
type addressByHeartbeat struct {
address common.Address