Files
zeekay 96715881cb go mod tidy
Update CLI for genesis

Fix import paths from ethereum/go-ethereum to luxfi/geth

- Replace all ethereum/go-ethereum imports with luxfi/geth
- Add local rawdb package for unexported constants
- Fix build errors in genesis tools
- Add comprehensive migration documentation
- Create build-all.sh script for building all tools
- Clean up duplicate functions and unused imports

Fix remaining imports

Update CLI

Remove symlink

Remove local replace directives

Update

Update old templates
2025-07-31 19:40:18 +00:00

43 lines
1.1 KiB
Go

// Copyright (C) 2025, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package configure
import (
"fmt"
)
func getBlockchainConfig(rpcTxFeeCap int) string {
return fmt.Sprintf("{\"rpc-tx-fee-cap\": %d}", rpcTxFeeCap)
}
func getPerNodeChainConfig(nodesRPCTxFeeCap map[string]int) string {
perNodeChainConfig := "{\n"
commaStr := ","
i := 0
for nodeID, rpcTxFeeCap := range nodesRPCTxFeeCap {
if i == len(nodesRPCTxFeeCap)-1 {
commaStr = ""
}
perNodeChainConfig += fmt.Sprintf(" \"%s\": {\"rpc-tx-fee-cap\": %d}%s\n", nodeID, rpcTxFeeCap, commaStr)
i++
}
perNodeChainConfig += "}\n"
return perNodeChainConfig
}
func subnetConfigLog(nodeID string) string {
if nodeID == "" {
return "\"validatorOnly\":false,\"allowedNodes\":[]"
}
return fmt.Sprintf("\"validatorOnly\":true,\"allowedNodes\":[\"%s\"]", nodeID)
}
func getSubnetConfig(nodeID string) string {
return fmt.Sprintf("{\"validatorOnly\": true, \"allowedNodes\": [\"%s\"]}", nodeID)
}
func getNodeConfig(acpSupport int) string {
return fmt.Sprintf("{\"acp-support\": %d}", acpSupport)
}