Files
zeekay 8f56009cc7 fix: deep audit - remove stubs, fix imports, clean dead code
Deep audit changes:
- Replace stub signature aggregator with real SDK warp implementation
- Remove dead pkg/lpm package (SDK lpmintegration used instead)
- Fix fs imports: use local utils.FileExists, DirExists, ExpandHome
- Fix secp256k1fx imports: use node/vms/secp256k1fx
- Fix platformvm imports: use node/vms/platformvm
- Fix e2e test TODOs: uncomment BootstrapValidators assertions
- Improve localnet stub implementations with real logic
- Fix node.go fs.FileExists reference

Note: Build requires GOWORK=off due to workspace dependency issues
2026-01-10 11:17:00 -08:00

43 lines
1.1 KiB
Go

// Copyright (C) 2022-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 chainConfigLog(nodeID string) string {
if nodeID == "" {
return "\"validatorOnly\":false,\"allowedNodes\":[]"
}
return fmt.Sprintf("\"validatorOnly\":true,\"allowedNodes\":[\"%s\"]", nodeID)
}
func getChainConfig(nodeID string) string {
return fmt.Sprintf("{\"validatorOnly\": true, \"allowedNodes\": [\"%s\"]}", nodeID)
}
func getNodeConfig(acpSupport int) string {
return fmt.Sprintf("{\"acp-support\": %d}", acpSupport)
}