Viacheslav
Viacheslav
Resolves #536 - [x] add unit test - [x] add swamp test - [x] update ADR
``` === RUN TestService_BlackListPeer service_test.go:162: Error Trace: /home/runner/work/celestia-node/celestia-node/fraud/service_test.go:162 Error: Should be true Test: TestService_BlackListPeer --- FAIL: TestService_BlackListPeer (0.65s) ```
We are replacing `libp2p.Host` in case of passing it through the [option](https://github.com/celestiaorg/celestia-node/blob/0374d4fdcefd7a2e719aa80234aa8dd24d4fb837/node/settings.go#L64) so it is not closed properly by lifecycle when node stops.
``` === RUN TestRemoteClient_StartBlockSubscription_And_GetBlock testing.go:29: Error Trace: /home/runner/work/celestia-node/celestia-node/core/testing.go:29 /home/runner/work/celestia-node/celestia-node/core/testing.go:41 /home/runner/work/celestia-node/celestia-node/core/testing.go:55 /home/runner/work/celestia-node/celestia-node/core/client_test.go:26 Error: Received unexpected error: failed to listen on 127.0.0.1:39027: listen tcp 127.0.0.1:39027: bind: address already in use Test: TestRemoteClient_StartBlockSubscription_And_GetBlock...
``` --- PASS: TestFullReconstructFromBridge (1.26s) panic: Fail in goroutine after TestFullReconstructFromBridge has completed goroutine 14064 [running]: testing.(*common).Fail(0xc0020f76c0) /opt/hostedtoolcache/go/1.18.4/x64/src/testing/testing.go:817 +0xe5 testing.(*common).Errorf(0xc0020f76c0, {0x213d5c8?, 0xc0020f76c0?}, {0xc00452e6b0?, 0x47822f?, 0xc0009fcb90?}) /opt/hostedtoolcache/go/1.18.4/x64/src/testing/testing.go:934 +0x65 github.com/stretchr/testify/assert.Fail({0x2db0e20, 0xc0020f76c0}, {0xc003ffe240,...
So we can test P2P logic without being tightly dependant to BEFP
Resolves * #1020 * https://github.com/celestiaorg/celestia-node/issues/636
As we discussed with @Wondertan and @renaynay, it's necessary to add method that will return already verified range of headers: `func GetVerifiedRangeByHeight(context.Context, *ExtendedHeader, amount) ([]*ExtendedHeader,error)`