-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BlockFetch client test: allow invalid peer behavior
Right now, the peer disconnection logic relies on the interplay of the BlockFetch and the ChainSync client to catch invalid behavior, so this commit adds an actual ChainSync client for every peer. Concretely, consider the case when a peer wants to extend an invalid block. In that case, the ChainSync client will disconnect, either when the extending header is received, or via the invalid block rejector in a background thread. In contrast, when we simply add a block (together with a punishment) to the ChainDB, this punishment will *not* be enacted, as the block is not validated as it is not reachable via any (valid) block in the VolDB.
- Loading branch information
Showing
1 changed file
with
147 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters