创建创世区块中遇到的问题

问题遇到的现象和发生背景

创建创世区块时发生的问题

遇到的现象和发生背景,请写出第一个错误信息
用代码块功能插入代码,请勿粘贴截图。 不用代码块回答率下

interface conversion: interface {} is map[interface {}]interface {}, not map[string]interface {}
panic: interface conversion: interface {} is map[interface {}]interface {}, not map[string]interface {} [recovered]
panic: interface conversion: interface {} is map[interface {}]interface {}, not map[string]interface {}

我的解答思路和尝试过的方法,不写自己思路的,回答率下降 60%

是否是文件configtx。yaml中有代码打印错误

我想要达到的结果,如果你需要快速回答,请尝试 “付费悬赏”

img

当您尝试将 type 的值分配给 typemap[interface {}]interface {}的变量时,会发生此错误map[string]interface {}。换句话说,您正在尝试将具有 type 键的映射分配给具有 type 键interface{}的映射string。

要修复此错误,您需要确保在声明和分配变量时使用正确的类型。在这种情况下,您需要确保在将值分配给预期为具有字符串键的映射的变量时,您使用的是具有字符串键的映射。

如果您不确定为什么会出现此错误,那么查看导致恐慌的代码并查看是否可以识别您使用错误类型的任何地方可能会有所帮助。