forked from TrueCloudLab/neoneo-go
*: use localhost address instead of 127.0.0.1, fix #2575
This commit is contained in:
parent
a15a9577f0
commit
c26a962b55
13 changed files with 24 additions and 24 deletions
|
@ -288,8 +288,8 @@ func TestRestoreDB(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestConfigureAddresses(t *testing.T) {
|
||||
defaultAddress := "http://127.0.0.1:10333"
|
||||
customAddress := "http://127.0.0.1:10334"
|
||||
defaultAddress := "http://localhost:10333"
|
||||
customAddress := "http://localhost:10334"
|
||||
|
||||
t.Run("default addresses", func(t *testing.T) {
|
||||
cfg := &config.ApplicationConfiguration{
|
||||
|
|
|
@ -60,7 +60,7 @@ ApplicationConfiguration:
|
|||
# BoltDBOptions:
|
||||
# FilePath: "./chains/mainnet.bolt"
|
||||
# Uncomment in order to set up custom address for node.
|
||||
# Address: 127.0.0.1
|
||||
# Address: localhost
|
||||
NodePort: 10333
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
|
|
|
@ -39,7 +39,7 @@ ApplicationConfiguration:
|
|||
# BoltDBOptions:
|
||||
# FilePath: "./chains/privnet.bolt"
|
||||
# Uncomment in order to set up custom address for node.
|
||||
# Address: 127.0.0.1
|
||||
# Address: localhost
|
||||
NodePort: 20336
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
|
|
|
@ -39,7 +39,7 @@ ApplicationConfiguration:
|
|||
# BoltDBOptions:
|
||||
# FilePath: "./chains/privnet.bolt"
|
||||
# Uncomment in order to set up custom address for node.
|
||||
# Address: 127.0.0.1
|
||||
# Address: localhost
|
||||
NodePort: 20333
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
|
|
|
@ -33,7 +33,7 @@ ApplicationConfiguration:
|
|||
# BoltDBOptions:
|
||||
# FilePath: "./chains/privnet.bolt"
|
||||
# Uncomment in order to set up custom address for node.
|
||||
# Address: 127.0.0.1
|
||||
# Address: localhost
|
||||
NodePort: 20333
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
|
|
|
@ -39,7 +39,7 @@ ApplicationConfiguration:
|
|||
# BoltDBOptions:
|
||||
# FilePath: "./chains/privnet.bolt"
|
||||
# Uncomment in order to set up custom address for node.
|
||||
# Address: 127.0.0.1
|
||||
# Address: localhost
|
||||
NodePort: 20335
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
|
|
|
@ -39,7 +39,7 @@ ApplicationConfiguration:
|
|||
# BoltDBOptions:
|
||||
# FilePath: "./chains/privnet.bolt"
|
||||
# Uncomment in order to set up custom address for node.
|
||||
# Address: 127.0.0.1
|
||||
# Address: localhost
|
||||
NodePort: 20334
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
|
|
|
@ -10,10 +10,10 @@ ProtocolConfiguration:
|
|||
- 02a7bc55fe8684e0119768d104ba30795bdcc86619e864add26156723ed185cd62
|
||||
ValidatorsCount: 4
|
||||
SeedList:
|
||||
- 127.0.0.1:20333
|
||||
- 127.0.0.1:20334
|
||||
- 127.0.0.1:20335
|
||||
- 127.0.0.1:20336
|
||||
- localhost:20333
|
||||
- localhost:20334
|
||||
- localhost:20335
|
||||
- localhost:20336
|
||||
VerifyBlocks: true
|
||||
VerifyTransactions: true
|
||||
P2PSigExtensions: false
|
||||
|
@ -39,7 +39,7 @@ ApplicationConfiguration:
|
|||
# BoltDBOptions:
|
||||
# FilePath: "./chains/privnet.bolt"
|
||||
# Uncomment in order to set up custom address for node.
|
||||
# Address: 127.0.0.1
|
||||
# Address: localhost
|
||||
NodePort: 20332
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
|
|
|
@ -63,7 +63,7 @@ ApplicationConfiguration:
|
|||
# BoltDBOptions:
|
||||
# FilePath: "./chains/testnet.bolt"
|
||||
# Uncomment in order to set up custom address for node.
|
||||
# Address: 127.0.0.1
|
||||
# Address: localhost
|
||||
NodePort: 20333
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
|
|
|
@ -34,7 +34,7 @@ ApplicationConfiguration:
|
|||
# BoltDBOptions:
|
||||
# FilePath: "./chains/unit_testnet.bolt"
|
||||
# Uncomment in order to set up custom address for node.
|
||||
# Address: 127.0.0.1
|
||||
# Address: localhost
|
||||
NodePort: 0
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
|
@ -53,7 +53,7 @@ ApplicationConfiguration:
|
|||
Path: "/notary_wallet.json"
|
||||
Password: "pass"
|
||||
RPC:
|
||||
Address: 127.0.0.1
|
||||
Address: localhost
|
||||
MaxGasInvoke: 15
|
||||
Enabled: true
|
||||
EnableCORSWorkaround: false
|
||||
|
|
|
@ -12,9 +12,9 @@ ProtocolConfiguration:
|
|||
- 02c4de32252c50fa171dbe25379e4e2d55cdc12f69e382c39f59a44573ecff2f9d
|
||||
ValidatorsCount: 4
|
||||
SeedList:
|
||||
- 127.0.0.1:20334
|
||||
- 127.0.0.1:20335
|
||||
- 127.0.0.1:20336
|
||||
- localhost:20334
|
||||
- localhost:20335
|
||||
- localhost:20336
|
||||
VerifyBlocks: true
|
||||
VerifyTransactions: true
|
||||
P2PSigExtensions: true
|
||||
|
@ -43,7 +43,7 @@ ApplicationConfiguration:
|
|||
# BoltDBOptions:
|
||||
# FilePath: "./chains/unit_testnet.bolt"
|
||||
# Uncomment in order to set up custom address for node.
|
||||
# Address: 127.0.0.1
|
||||
# Address: localhost
|
||||
NodePort: 20333
|
||||
Relay: true
|
||||
DialTimeout: 3
|
||||
|
@ -59,7 +59,7 @@ ApplicationConfiguration:
|
|||
Path: "/notary_wallet.json"
|
||||
Password: "pass"
|
||||
RPC:
|
||||
Address: 127.0.0.1
|
||||
Address: localhost
|
||||
MaxGasInvoke: 15
|
||||
Enabled: true
|
||||
EnableCORSWorkaround: false
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
|
||||
func TestEncodeDecodeAddress(t *testing.T) {
|
||||
var (
|
||||
e, _ = net.ResolveTCPAddr("tcp", "127.0.0.1:2000")
|
||||
e, _ = net.ResolveTCPAddr("tcp", "localhost:2000")
|
||||
ts = time.Now()
|
||||
addr = NewAddressAndTime(e, ts, capability.Capabilities{
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ func TestEncodeDecodeAddress(t *testing.T) {
|
|||
|
||||
func fillAddressList(al *AddressList) {
|
||||
for i := 0; i < len(al.Addrs); i++ {
|
||||
e, _ := net.ResolveTCPAddr("tcp", fmt.Sprintf("127.0.0.1:20%d", i))
|
||||
e, _ := net.ResolveTCPAddr("tcp", fmt.Sprintf("localhost:20%d", i))
|
||||
al.Addrs[i] = NewAddressAndTime(e, time.Now(), capability.Capabilities{
|
||||
{
|
||||
Type: capability.TCPServer,
|
||||
|
|
|
@ -28,7 +28,7 @@ type (
|
|||
// The user agent of the server.
|
||||
UserAgent string
|
||||
|
||||
// Address. Example: "127.0.0.1".
|
||||
// Address. Example: "localhost".
|
||||
Address string
|
||||
|
||||
// AnnouncedPort is an announced node port for P2P version exchange.
|
||||
|
|
Loading…
Reference in a new issue