p2p: remove NodeInfo interface and rename DefaultNodeInfo struct (#5799)

The `NodeInfo` interface does not appear to serve any purpose at all, so I removed it and renamed the `DefaultNodeInfo` struct to `NodeInfo` (including the Protobuf representations). Let me know if this is actually needed for anything.

Only the Protobuf rename is listed in the changelog, since we do not officially support API stability of the `p2p` package (according to `README.md`). The on-wire protocol remains compatible.
This commit is contained in:
Erik Grinaker
2020-12-15 19:54:25 +01:00
committed by GitHub
parent bcfc889f25
commit e198edf20e
19 changed files with 203 additions and 251 deletions

View File

@@ -131,7 +131,7 @@ func TestNodeSetAppVersion(t *testing.T) {
assert.Equal(t, state.Version.Consensus.App, appVersion)
// check version is set in node info
assert.Equal(t, n.nodeInfo.(p2p.DefaultNodeInfo).ProtocolVersion.App, appVersion)
assert.Equal(t, n.nodeInfo.ProtocolVersion.App, appVersion)
}
func TestNodeSetPrivValTCP(t *testing.T) {