CodeChain-io / CodeChain-io/foundry

ConnectionEstablished is called in an already established connection

Open
#274 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
36
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Recently, discovery5 tests failed occasionally.
I read the failed test log and found that a connection established event is fired in the already existing connection. It made Foundry crash.

## Why this error found nowadays

Recently when we implementing a peer DB, we added an assertion that the same peer is not added twice in the DB. The assertion made Foundry panic.
It seems that the duplicated connection established event bug is aged, but recently found by the assertion.

## How should we fix it

The "connection established" event should not be called in an existing connection.

## ErrorLog

[2020_03_18T01_56_17_226Z.1.log](https://github.com/CodeChain-io/foundry/files/4346655/2020_03_18T01_56_17_226Z.1.log)
[2020_03_18T01_56_17_226Z.4.log](https://github.com/CodeChain-io/foundry/files/4346656/2020_03_18T01_56_17_226Z.4.log)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.