hive script: move HIVE_CLIQUE_PERIOD processing from nimbus.sh to mapper.jq

This commit is contained in:
jangko 2021-08-09 08:35:54 +07:00
parent a05f366ca2
commit dcbbfd08ae
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
2 changed files with 6 additions and 6 deletions

View File

@ -52,6 +52,9 @@ def to_bool:
"baseFeePerGas": .baseFeePerGas
}|remove_empty,
"config": {
"clique": (if env.HIVE_CLIQUE_PERIOD == null then null else {
"period": env.HIVE_CLIQUE_PERIOD|to_int,
} end),
"chainId": env.HIVE_CHAIN_ID|to_int,
"homesteadBlock": env.HIVE_FORK_HOMESTEAD|to_int,
"daoForkBlock": env.HIVE_FORK_DAO_BLOCK|to_int,

View File

@ -64,13 +64,10 @@ if [ "$HIVE_NETWORK_ID" != "" ]; then
FLAGS="$FLAGS --networkid:$HIVE_NETWORK_ID"
fi
if [ "$HIVE_CLIQUE_PERIOD" != "" ]; then
FLAGS="$FLAGS --clique-period:$HIVE_CLIQUE_PERIOD"
fi
if [ "$HIVE_CLIQUE_PRIVATEKEY" != "" ]; then
echo "$HIVE_CLIQUE_PRIVATEKEY" > /private.key
FLAGS="$FLAGS --import-key:/private.key"
# -n will prevent newline when echoing something
echo -n "$HIVE_CLIQUE_PRIVATEKEY" > private.key
FLAGS="$FLAGS --import-key:private.key"
fi
if [ "$HIVE_MINER" != "" ]; then