aboutsummaryrefslogtreecommitdiffstats
path: root/core/tx_pool_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/tx_pool_test.go')
-rw-r--r--core/tx_pool_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/tx_pool_test.go b/core/tx_pool_test.go
index 7f1832a43..7df1a2c6f 100644
--- a/core/tx_pool_test.go
+++ b/core/tx_pool_test.go
@@ -109,7 +109,7 @@ func validateTxPoolInternals(pool *TxPool) error {
last = nonce
}
}
- if nonce := pool.pendingState.GetNonce(addr); nonce != last+1 {
+ if nonce := pool.Nonce(addr); nonce != last+1 {
return fmt.Errorf("pending nonce mismatch: have %v, want %v", nonce, last+1)
}
}
@@ -195,14 +195,14 @@ func TestStateChangeDuringTransactionPoolReset(t *testing.T) {
pool := NewTxPool(testTxPoolConfig, params.TestChainConfig, blockchain)
defer pool.Stop()
- nonce := pool.State().GetNonce(address)
+ nonce := pool.Nonce(address)
if nonce != 0 {
t.Fatalf("Invalid nonce, want 0, got %d", nonce)
}
pool.addRemotesSync([]*types.Transaction{tx0, tx1})
- nonce = pool.State().GetNonce(address)
+ nonce = pool.Nonce(address)
if nonce != 2 {
t.Fatalf("Invalid nonce, want 2, got %d", nonce)
}
@@ -215,7 +215,7 @@ func TestStateChangeDuringTransactionPoolReset(t *testing.T) {
if err != nil {
t.Fatalf("Could not fetch pending transactions: %v", err)
}
- nonce = pool.State().GetNonce(address)
+ nonce = pool.Nonce(address)
if nonce != 2 {
t.Fatalf("Invalid nonce, want 2, got %d", nonce)
}
@@ -451,7 +451,7 @@ func TestTransactionNonceRecovery(t *testing.T) {
// simulate some weird re-order of transactions and missing nonce(s)
pool.currentState.SetNonce(addr, n-1)
<-pool.requestReset(nil, nil)
- if fn := pool.pendingState.GetNonce(addr); fn != n-1 {
+ if fn := pool.Nonce(addr); fn != n-1 {
t.Errorf("expected nonce to be %d, got %d", n-1, fn)
}
}