mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-07 14:46:44 +00:00
Change --datadir to --appdir and remove symmetrical connection in stability tests (#1617)
* Don't do simetric connects in netsync stability test * Convert --datadir to --appdir everywhere Co-authored-by: Ori Newman <orinewman1@gmail.com>
This commit is contained in:
parent
cebcab7f5c
commit
7d69b66c7c
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
rm -rf /tmp/kaspad-temp
|
rm -rf /tmp/kaspad-temp
|
||||||
|
|
||||||
kaspad --devnet --nobanning --datadir=/tmp/kaspad-temp --profile=6061 --loglevel=debug &
|
kaspad --devnet --nobanning --appdir=/tmp/kaspad-temp --profile=6061 --loglevel=debug &
|
||||||
KASPAD_PID=$!
|
KASPAD_PID=$!
|
||||||
KASPAD_KILLED=0
|
KASPAD_KILLED=0
|
||||||
function killKaspadIfNotKilled() {
|
function killKaspadIfNotKilled() {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
rm -rf /tmp/kaspad-temp
|
rm -rf /tmp/kaspad-temp
|
||||||
|
|
||||||
kaspad --devnet --nobanning --datadir=/tmp/kaspad-temp --profile=6061 &
|
kaspad --devnet --nobanning --appdir=/tmp/kaspad-temp --profile=6061 &
|
||||||
KASPAD_PID=$!
|
KASPAD_PID=$!
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
# Kaspad Sanity tool
|
# Kaspad Sanity tool
|
||||||
This tries to run kapad with different sets of arguments for sanity.
|
This tries to run kapad with different sets of arguments for sanity.
|
||||||
|
|
||||||
In order to get clean run for each command, the tool injects its own --datadir
|
In order to get clean run for each command, the tool injects its own --appdir
|
||||||
argument so it will be able to clean it between runs, so it's forbidden to use
|
argument so it will be able to clean it between runs, so it's forbidden to use
|
||||||
--datadir as part of the arguments set.
|
--appdir as part of the arguments set.
|
||||||
|
|
||||||
## Running
|
## Running
|
||||||
1. `go install` kaspad and kaspadsanity.
|
1. `go install` kaspad and kaspadsanity.
|
||||||
|
@ -72,9 +72,9 @@ func commandLoop(argsChan <-chan []string) ([]commandFailure, error) {
|
|||||||
|
|
||||||
func handleDataDirArg(args []string, dataDir string) ([]string, error) {
|
func handleDataDirArg(args []string, dataDir string) ([]string, error) {
|
||||||
for _, arg := range args {
|
for _, arg := range args {
|
||||||
if strings.HasPrefix(arg, "--datadir") {
|
if strings.HasPrefix(arg, "--appdir") {
|
||||||
return nil, errors.New("invalid argument --datadir")
|
return nil, errors.New("invalid argument --appdir")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return append([]string{"--datadir", dataDir}, args...), nil
|
return append([]string{"--appdir", dataDir}, args...), nil
|
||||||
}
|
}
|
||||||
|
@ -31,14 +31,16 @@ func startNode(name string, rpcAddress, listen, connect, profilePort, dataDir st
|
|||||||
args := []string{
|
args := []string{
|
||||||
"kaspad",
|
"kaspad",
|
||||||
common.NetworkCliArgumentFromNetParams(activeConfig().NetParams()),
|
common.NetworkCliArgumentFromNetParams(activeConfig().NetParams()),
|
||||||
"--datadir", dataDir,
|
"--appdir", dataDir,
|
||||||
"--logdir", dataDir,
|
"--logdir", dataDir,
|
||||||
"--rpclisten", rpcAddress,
|
"--rpclisten", rpcAddress,
|
||||||
"--listen", listen,
|
"--listen", listen,
|
||||||
"--connect", connect,
|
|
||||||
"--profile", profilePort,
|
"--profile", profilePort,
|
||||||
"--loglevel", "debug",
|
"--loglevel", "debug",
|
||||||
}
|
}
|
||||||
|
if connect != "" {
|
||||||
|
args = append(args, "--connect", connect)
|
||||||
|
}
|
||||||
|
|
||||||
if activeConfig().OverrideDAGParamsFile != "" {
|
if activeConfig().OverrideDAGParamsFile != "" {
|
||||||
args = append(args, "--override-dag-params-file", activeConfig().OverrideDAGParamsFile)
|
args = append(args, "--override-dag-params-file", activeConfig().OverrideDAGParamsFile)
|
||||||
@ -132,7 +134,7 @@ func setupSyncer() (*rpc.Client, func(), error) {
|
|||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
rpcClient, teardown, err := setupNodeWithRPC("SYNCER", syncerListen, syncerRPCAddress, syncedListen,
|
rpcClient, teardown, err := setupNodeWithRPC("SYNCER", syncerListen, syncerRPCAddress, "",
|
||||||
syncerProfilePort, syncerDataDir)
|
syncerProfilePort, syncerDataDir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
rm -rf /tmp/kaspad-temp
|
rm -rf /tmp/kaspad-temp
|
||||||
|
|
||||||
kaspad --devnet --datadir=/tmp/kaspad-temp --profile=6061 &
|
kaspad --devnet --appdir=/tmp/kaspad-temp --profile=6061 &
|
||||||
KASPAD_PID=$!
|
KASPAD_PID=$!
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
rm -rf /tmp/kaspad-temp
|
rm -rf /tmp/kaspad-temp
|
||||||
|
|
||||||
NUM_CLIENTS=1000
|
NUM_CLIENTS=1000
|
||||||
kaspad --devnet --datadir=/tmp/kaspad-temp --profile=6061 --rpcmaxwebsockets=$NUM_CLIENTS &
|
kaspad --devnet --appdir=/tmp/kaspad-temp --profile=6061 --rpcmaxwebsockets=$NUM_CLIENTS &
|
||||||
KASPAD_PID=$!
|
KASPAD_PID=$!
|
||||||
KASPAD_KILLED=0
|
KASPAD_KILLED=0
|
||||||
function killKaspadIfNotKilled() {
|
function killKaspadIfNotKilled() {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
rm -rf /tmp/kaspad-temp
|
rm -rf /tmp/kaspad-temp
|
||||||
|
|
||||||
kaspad --devnet --datadir=/tmp/kaspad-temp --profile=6061 --loglevel=debug &
|
kaspad --devnet --appdir=/tmp/kaspad-temp --profile=6061 --loglevel=debug &
|
||||||
KASPAD_PID=$!
|
KASPAD_PID=$!
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
@ -39,7 +39,7 @@ func startNodes() (teardown func(), err error) {
|
|||||||
syncerCmd, err := common.StartCmd("KASPAD-SYNCER",
|
syncerCmd, err := common.StartCmd("KASPAD-SYNCER",
|
||||||
"kaspad",
|
"kaspad",
|
||||||
common.NetworkCliArgumentFromNetParams(activeConfig().NetParams()),
|
common.NetworkCliArgumentFromNetParams(activeConfig().NetParams()),
|
||||||
"--datadir", syncerDataDir,
|
"--appdir", syncerDataDir,
|
||||||
"--logdir", syncerDataDir,
|
"--logdir", syncerDataDir,
|
||||||
"--rpclisten", syncerRPCAddress,
|
"--rpclisten", syncerRPCAddress,
|
||||||
"--listen", syncerListen,
|
"--listen", syncerListen,
|
||||||
@ -52,7 +52,7 @@ func startNodes() (teardown func(), err error) {
|
|||||||
syncedCmd, err := common.StartCmd("KASPAD-SYNCED",
|
syncedCmd, err := common.StartCmd("KASPAD-SYNCED",
|
||||||
"kaspad",
|
"kaspad",
|
||||||
common.NetworkCliArgumentFromNetParams(activeConfig().NetParams()),
|
common.NetworkCliArgumentFromNetParams(activeConfig().NetParams()),
|
||||||
"--datadir", syncedDataDir,
|
"--appdir", syncedDataDir,
|
||||||
"--logdir", syncedDataDir,
|
"--logdir", syncedDataDir,
|
||||||
"--rpclisten", syncedRPCAddress,
|
"--rpclisten", syncedRPCAddress,
|
||||||
"--listen", syncedListen,
|
"--listen", syncedListen,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user