diff --git a/pkg/p2p/libp2p/libp2p_test.go b/pkg/p2p/libp2p/libp2p_test.go index 87f84b546a9..eff5493b2e0 100644 --- a/pkg/p2p/libp2p/libp2p_test.go +++ b/pkg/p2p/libp2p/libp2p_test.go @@ -180,14 +180,14 @@ func (sb *SwapBackend) add(tx common.Hash, ethAddr common.Address) { sb.m.Lock() defer sb.m.Unlock() - mockSwapBackend.addrs[tx] = ethAddr + sb.addrs[tx] = ethAddr } func (sb *SwapBackend) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) { - mockSwapBackend.m.RLock() - defer mockSwapBackend.m.RUnlock() + sb.m.RLock() + defer sb.m.RUnlock() return &types.Receipt{ - ContractAddress: mockSwapBackend.addrs[txHash], + ContractAddress: sb.addrs[txHash], }, nil }