|
@ -71,6 +71,7 @@ type Testnet struct { |
|
|
Evidence int |
|
|
Evidence int |
|
|
LogLevel string |
|
|
LogLevel string |
|
|
TxSize int64 |
|
|
TxSize int64 |
|
|
|
|
|
ABCIProtocol string |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Node represents a Tendermint node in a testnet.
|
|
|
// Node represents a Tendermint node in a testnet.
|
|
@ -140,6 +141,7 @@ func LoadTestnet(file string) (*Testnet, error) { |
|
|
KeyType: "ed25519", |
|
|
KeyType: "ed25519", |
|
|
LogLevel: manifest.LogLevel, |
|
|
LogLevel: manifest.LogLevel, |
|
|
TxSize: manifest.TxSize, |
|
|
TxSize: manifest.TxSize, |
|
|
|
|
|
ABCIProtocol: manifest.ABCIProtocol, |
|
|
} |
|
|
} |
|
|
if len(manifest.KeyType) != 0 { |
|
|
if len(manifest.KeyType) != 0 { |
|
|
testnet.KeyType = manifest.KeyType |
|
|
testnet.KeyType = manifest.KeyType |
|
@ -150,6 +152,9 @@ func LoadTestnet(file string) (*Testnet, error) { |
|
|
if manifest.InitialHeight > 0 { |
|
|
if manifest.InitialHeight > 0 { |
|
|
testnet.InitialHeight = manifest.InitialHeight |
|
|
testnet.InitialHeight = manifest.InitialHeight |
|
|
} |
|
|
} |
|
|
|
|
|
if testnet.ABCIProtocol == "" { |
|
|
|
|
|
testnet.ABCIProtocol = string(ProtocolBuiltin) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// Set up nodes, in alphabetical order (IPs and ports get same order).
|
|
|
// Set up nodes, in alphabetical order (IPs and ports get same order).
|
|
|
nodeNames := []string{} |
|
|
nodeNames := []string{} |
|
@ -169,7 +174,7 @@ func LoadTestnet(file string) (*Testnet, error) { |
|
|
ProxyPort: proxyPortGen.Next(), |
|
|
ProxyPort: proxyPortGen.Next(), |
|
|
Mode: ModeValidator, |
|
|
Mode: ModeValidator, |
|
|
Database: "goleveldb", |
|
|
Database: "goleveldb", |
|
|
ABCIProtocol: ProtocolBuiltin, |
|
|
|
|
|
|
|
|
ABCIProtocol: Protocol(testnet.ABCIProtocol), |
|
|
PrivvalProtocol: ProtocolFile, |
|
|
PrivvalProtocol: ProtocolFile, |
|
|
StartAt: nodeManifest.StartAt, |
|
|
StartAt: nodeManifest.StartAt, |
|
|
BlockSync: "v0", |
|
|
BlockSync: "v0", |
|
@ -192,9 +197,6 @@ func LoadTestnet(file string) (*Testnet, error) { |
|
|
if nodeManifest.Database != "" { |
|
|
if nodeManifest.Database != "" { |
|
|
node.Database = nodeManifest.Database |
|
|
node.Database = nodeManifest.Database |
|
|
} |
|
|
} |
|
|
if nodeManifest.ABCIProtocol != "" { |
|
|
|
|
|
node.ABCIProtocol = Protocol(nodeManifest.ABCIProtocol) |
|
|
|
|
|
} |
|
|
|
|
|
if nodeManifest.PrivvalProtocol != "" { |
|
|
if nodeManifest.PrivvalProtocol != "" { |
|
|
node.PrivvalProtocol = Protocol(nodeManifest.PrivvalProtocol) |
|
|
node.PrivvalProtocol = Protocol(nodeManifest.PrivvalProtocol) |
|
|
} |
|
|
} |
|
|