diff --git a/chainio/txmgr/geometric/geometric_test.go b/chainio/txmgr/geometric/geometric_test.go index fefc792d..ff382405 100644 --- a/chainio/txmgr/geometric/geometric_test.go +++ b/chainio/txmgr/geometric/geometric_test.go @@ -80,7 +80,7 @@ func TestGeometricTxManager(t *testing.T) { t.Run("Send 1 tx to congested network", func(t *testing.T) { h := newTestHarness(t) - h.fakeEthBackend.congestedBlocks = 3 + h.fakeEthBackend.setCongestedBlocks(3) h.txmgr.params.TxnConfirmationTimeout = 1 * time.Second unsignedTx := newUnsignedEthTransferTx(0, nil) @@ -251,6 +251,13 @@ func (s *fakeEthBackend) startMining() { }() } +func (s *fakeEthBackend) setCongestedBlocks(n uint64) { + s.mu.Lock() + defer s.mu.Unlock() + s.congestedBlocks = n + +} + func (s *fakeEthBackend) BlockNumber(context.Context) (uint64, error) { s.mu.Lock() defer s.mu.Unlock()