From 833dc58f1306f5a20ed6c8659a61a9c04a57044e Mon Sep 17 00:00:00 2001 From: Peter Bukva Date: Fri, 4 Oct 2024 17:56:22 +0100 Subject: [PATCH] Cosmetic: Fixing formulation of chain-id verification error msgs --- app/app.go | 4 ++-- app/upgrade_v_11_4_network_config.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/app.go b/app/app.go index 932307e6..ff9042e5 100644 --- a/app/app.go +++ b/app/app.go @@ -739,10 +739,10 @@ func getNetworkInfo(app *App, ctx *sdk.Context, manifest *UpgradeManifest, expec } if networkInfo.MergeSourceChainID != expectedChainIdOfMergeSourceGenesis { - return nil, fmt.Errorf("mismatch of the `MergeSourceChainID`: NetworkConfig file contains \"%s\", expected value is chan-id from input merge source genesis json file, which is \"%s\"", networkInfo.MergeSourceChainID, expectedChainIdOfMergeSourceGenesis) + return nil, fmt.Errorf("mismatch of Merge Source ChainID: the \"merge_source_chain_id\" value in the NetworkConfig file contains \"%s\", expected value is chan-id from input merge source genesis json file, which is \"%s\"", networkInfo.MergeSourceChainID, expectedChainIdOfMergeSourceGenesis) } if networkInfo.DestinationChainID != ctx.ChainID() { - return nil, fmt.Errorf("mismatch of the `DestinationChainID`: NetworkConfig file contains \"%s\", expected value is chan-id of the current running chain, which is \"%s\"", networkInfo.DestinationChainID, ctx.ChainID()) + return nil, fmt.Errorf("mismatch of Destination ChainID: the \"destination_chain_id\" value in the NetworkConfig file contains \"%s\", expected value is chan-id of the current running chain, which is \"%s\"", networkInfo.DestinationChainID, ctx.ChainID()) } manifest.NetworkConfigFileSha256 = app.cudosMigrationConfigSha256 diff --git a/app/upgrade_v_11_4_network_config.go b/app/upgrade_v_11_4_network_config.go index c72199c1..c6455760 100644 --- a/app/upgrade_v_11_4_network_config.go +++ b/app/upgrade_v_11_4_network_config.go @@ -293,7 +293,7 @@ func LoadNetworkConfigFromFile(configFilePath string, expectedSha256Hex *string) if isVerified, actualHashHex, err := VerifySha256(byteValue, expectedSha256Hex); err != nil { return nil, err } else if !isVerified { - return nil, fmt.Errorf("failed to verify sha256: NetworkConfig file \"%v\" hash \"%v\" does not match expected hash \"%v\"", configFilePath, actualHashHex, expectedSha256Hex) + return nil, fmt.Errorf("failed to verify sha256: NetworkConfig file \"%s\" hash \"%s\" does not match expected hash \"%s\"", configFilePath, actualHashHex, *expectedSha256Hex) } // Initialize an empty struct to hold the JSON data