[cleanup] remove is_genesis flag

Signed-off-by: Leo Chen <leo@harmony.one>
pull/1560/head
Leo Chen 5 years ago
parent d385233a2a
commit 97880b2c3a
  1. 4
      cmd/harmony/main.go
  2. 2
      scripts/docker/run
  3. 1
      scripts/node.sh
  4. 4
      test/deploy.sh

@ -42,7 +42,7 @@ var (
commit string
)
// InitLDBDatabase initializes a LDBDatabase. isGenesis=true will return the beacon chain database for normal shard nodes
// InitLDBDatabase initializes a LDBDatabase. will return the beacon chain database for normal shard nodes
func InitLDBDatabase(ip string, port string, freshDB bool, isBeacon bool) (*ethdb.LDBDatabase, error) {
var dbFileName string
if isBeacon {
@ -80,8 +80,6 @@ var (
minPeers = flag.Int("min_peers", 100, "Minimal number of Peers in shard")
// Key file to store the private key
keyFile = flag.String("key", "./.hmykey", "the p2p key file of the harmony node")
// isGenesis indicates this node is a genesis node
isGenesis = flag.Bool("is_genesis", true, "true means this node is a genesis node")
// isArchival indicates this node is an archival node that will save and archive current blockchain
isArchival = flag.Bool("is_archival", true, "false makes node faster by turning caching off")
// delayCommit is the commit-delay timer, used by Harmony nodes

@ -31,6 +31,6 @@ if [ -z "$NODE_ACCOUNT_ID" ]; then
exit 2
fi
harmony -log_folder log -bootnodes $BN_MA -ip $PUB_IP -port $NODE_PORT -is_genesis -account_index $NODE_ACCOUNT_ID
harmony -log_folder log -bootnodes $BN_MA -ip $PUB_IP -port $NODE_PORT -account_index $NODE_ACCOUNT_ID
# vim: ai ts=2 sw=2 et sts=2 ft=sh

@ -471,7 +471,6 @@ do
-bootnodes "${BN_MA}"
-ip "${PUB_IP}"
-port "${NODE_PORT}"
-is_genesis
-blskey_file "${BLSKEYFILE}"
-network_type="${network_type}"
-dns_zone="${dns_zone}"

@ -163,11 +163,11 @@ while IFS='' read -r line || [[ -n "$line" ]]; do
fi
case "${mode}" in
leader*|validator*) args=("${args[@]}" -is_genesis);;
leader*|validator*) args=("${args[@]}");;
esac
case "${mode}" in leader*) args=("${args[@]}" -is_leader);; esac
case "${mode}" in *archival|archival) args=("${args[@]}" -is_archival);; esac
case "${mode}" in explorer*) args=("${args[@]}" -is_genesis=false -is_explorer=true -shard_id=0);; esac
case "${mode}" in explorer*) args=("${args[@]}" -is_explorer=true -shard_id=0);; esac
case "${mode}" in
client) ;;
*) $DRYRUN "${ROOT}/bin/harmony" "${args[@]}" "${extra_args[@]}" 2>&1 | tee -a "${LOG_FILE}" &;;

Loading…
Cancel
Save