mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-23 17:51:39 +00:00
p2p: external address
* new config option for external address to advertise * if blank, defaults to best guess from listener * if laddr ip address is also blank, default to IPv4
This commit is contained in:
@ -4,12 +4,16 @@ import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
"github.com/tendermint/tendermint/config"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
)
|
||||
|
||||
func TestListener(t *testing.T) {
|
||||
// Create a listener
|
||||
l := NewDefaultListener("tcp", ":8001", false, log.TestingLogger())
|
||||
cfg := &config.P2PConfig{
|
||||
ListenAddress: "tcp://:8001",
|
||||
}
|
||||
l := NewDefaultListener(cfg, log.TestingLogger())
|
||||
|
||||
// Dial the listener
|
||||
lAddr := l.ExternalAddress()
|
||||
|
Reference in New Issue
Block a user