MCPcopy Create free account
hub / github.com/tendermint/tendermint / TestRProcessPeerError

Function TestRProcessPeerError

internal/blocksync/v2/processor_test.go:104–131  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

102}
103
104func TestRProcessPeerError(t *testing.T) {
105 tests := []testFields{
106 {
107 name: "error for existing peer",
108 steps: []pcFsmMakeStateValues{
109 {
110 currentState: &params{items: []pcBlock{{"P1", 1}, {"P2", 2}}},
111 event: scPeerError{peerID: "P2"},
112 wantState: &params{items: []pcBlock{{"P1", 1}}},
113 wantNextEvent: noOp,
114 },
115 },
116 },
117 {
118 name: "error for unknown peer",
119 steps: []pcFsmMakeStateValues{
120 {
121 currentState: &params{items: []pcBlock{{"P1", 1}, {"P2", 2}}},
122 event: scPeerError{peerID: "P3"},
123 wantState: &params{items: []pcBlock{{"P1", 1}, {"P2", 2}}},
124 wantNextEvent: noOp,
125 },
126 },
127 },
128 }
129
130 executeProcessorTests(t, tests)
131}
132
133func TestPcBlockResponse(t *testing.T) {
134 tests := []testFields{

Callers

nothing calls this directly

Calls 1

executeProcessorTestsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…