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

Function TestNodeSetAppVersion

node/node_test.go:113–131  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

111}
112
113func TestNodeSetAppVersion(t *testing.T) {
114 cfg, err := config.ResetTestRoot("node_app_version_test")
115 require.NoError(t, err)
116 defer os.RemoveAll(cfg.RootDir)
117
118 // create node
119 n := getTestNode(t, cfg, log.TestingLogger())
120
121 // default config uses the kvstore app
122 var appVersion uint64 = kvstore.ProtocolVersion
123
124 // check version is set in state
125 state, err := n.stateStore.Load()
126 require.NoError(t, err)
127 assert.Equal(t, state.Version.Consensus.App, appVersion)
128
129 // check version is set in node info
130 assert.Equal(t, n.nodeInfo.ProtocolVersion.App, appVersion)
131}
132
133func TestNodeSetPrivValTCP(t *testing.T) {
134 addr := "tcp://" + testFreeAddr(t)

Callers

nothing calls this directly

Calls 5

ResetTestRootFunction · 0.92
TestingLoggerFunction · 0.92
getTestNodeFunction · 0.85
LoadMethod · 0.65
EqualMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…