mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-26 01:44:16 +00:00
types: move NodeInfo from p2p (#6618)
This commit is contained in:
@@ -12,6 +12,8 @@ import (
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
p2p "github.com/tendermint/tendermint/internal/p2p"
|
||||
|
||||
types "github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
// Connection is an autogenerated mock type for the Connection type
|
||||
@@ -48,18 +50,18 @@ func (_m *Connection) FlushClose() error {
|
||||
}
|
||||
|
||||
// Handshake provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *Connection) Handshake(_a0 context.Context, _a1 p2p.NodeInfo, _a2 crypto.PrivKey) (p2p.NodeInfo, crypto.PubKey, error) {
|
||||
func (_m *Connection) Handshake(_a0 context.Context, _a1 types.NodeInfo, _a2 crypto.PrivKey) (types.NodeInfo, crypto.PubKey, error) {
|
||||
ret := _m.Called(_a0, _a1, _a2)
|
||||
|
||||
var r0 p2p.NodeInfo
|
||||
if rf, ok := ret.Get(0).(func(context.Context, p2p.NodeInfo, crypto.PrivKey) p2p.NodeInfo); ok {
|
||||
var r0 types.NodeInfo
|
||||
if rf, ok := ret.Get(0).(func(context.Context, types.NodeInfo, crypto.PrivKey) types.NodeInfo); ok {
|
||||
r0 = rf(_a0, _a1, _a2)
|
||||
} else {
|
||||
r0 = ret.Get(0).(p2p.NodeInfo)
|
||||
r0 = ret.Get(0).(types.NodeInfo)
|
||||
}
|
||||
|
||||
var r1 crypto.PubKey
|
||||
if rf, ok := ret.Get(1).(func(context.Context, p2p.NodeInfo, crypto.PrivKey) crypto.PubKey); ok {
|
||||
if rf, ok := ret.Get(1).(func(context.Context, types.NodeInfo, crypto.PrivKey) crypto.PubKey); ok {
|
||||
r1 = rf(_a0, _a1, _a2)
|
||||
} else {
|
||||
if ret.Get(1) != nil {
|
||||
@@ -68,7 +70,7 @@ func (_m *Connection) Handshake(_a0 context.Context, _a1 p2p.NodeInfo, _a2 crypt
|
||||
}
|
||||
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(2).(func(context.Context, p2p.NodeInfo, crypto.PrivKey) error); ok {
|
||||
if rf, ok := ret.Get(2).(func(context.Context, types.NodeInfo, crypto.PrivKey) error); ok {
|
||||
r2 = rf(_a0, _a1, _a2)
|
||||
} else {
|
||||
r2 = ret.Error(2)
|
||||
|
||||
@@ -5,13 +5,12 @@ package mocks
|
||||
import (
|
||||
conn "github.com/tendermint/tendermint/internal/p2p/conn"
|
||||
log "github.com/tendermint/tendermint/libs/log"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
net "net"
|
||||
|
||||
p2p "github.com/tendermint/tendermint/internal/p2p"
|
||||
types "github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
// Peer is an autogenerated mock type for the Peer type
|
||||
@@ -111,14 +110,14 @@ func (_m *Peer) IsRunning() bool {
|
||||
}
|
||||
|
||||
// NodeInfo provides a mock function with given fields:
|
||||
func (_m *Peer) NodeInfo() p2p.NodeInfo {
|
||||
func (_m *Peer) NodeInfo() types.NodeInfo {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 p2p.NodeInfo
|
||||
if rf, ok := ret.Get(0).(func() p2p.NodeInfo); ok {
|
||||
var r0 types.NodeInfo
|
||||
if rf, ok := ret.Get(0).(func() types.NodeInfo); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(p2p.NodeInfo)
|
||||
r0 = ret.Get(0).(types.NodeInfo)
|
||||
}
|
||||
|
||||
return r0
|
||||
@@ -244,15 +243,15 @@ func (_m *Peer) SetLogger(_a0 log.Logger) {
|
||||
}
|
||||
|
||||
// SocketAddr provides a mock function with given fields:
|
||||
func (_m *Peer) SocketAddr() *p2p.NetAddress {
|
||||
func (_m *Peer) SocketAddr() *types.NetAddress {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 *p2p.NetAddress
|
||||
if rf, ok := ret.Get(0).(func() *p2p.NetAddress); ok {
|
||||
var r0 *types.NetAddress
|
||||
if rf, ok := ret.Get(0).(func() *types.NetAddress); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*p2p.NetAddress)
|
||||
r0 = ret.Get(0).(*types.NetAddress)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user