eth/filters: prevent concurrent access in test (#30401)
use a mutex to prevent concurrent access to the api.filters map during `TestPendingTxFilterDeadlock` test
This commit is contained in:
parent
a01e9742d9
commit
7c6b3f9f14
|
@ -601,7 +601,9 @@ func TestPendingTxFilterDeadlock(t *testing.T) {
|
|||
subs := make([]*Subscription, 20)
|
||||
for i := 0; i < len(subs); i++ {
|
||||
fid := api.NewPendingTransactionFilter(nil)
|
||||
api.filtersMu.Lock()
|
||||
f, ok := api.filters[fid]
|
||||
api.filtersMu.Unlock()
|
||||
if !ok {
|
||||
t.Fatalf("Filter %s should exist", fid)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue