We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我打开了main.go里面的
//2.测试创世区块 genesisBlock := BLC.CreateGenesisBlock("Genesis Block") fmt.Println(genesisBlock)
这一部分 build的时候如下所示 E:/Go/bin/go.exe build -i [C:/Users/Alex/go/src/MyPublicChain]
.\main.go:15:41: cannot use "Genesis Block" (type string) as type []*BLC.Transaction in argument to BLC.CreateGenesisBlock
The text was updated successfully, but these errors were encountered:
Alex,你可以打开BLC.CreateGenesisBlock方法,后期的代码已经调整为如下内容,所以,不再支持String类型的形参
func CreateGenesisBlock(txs []*Transaction) *Block{ return NewBlock(txs,make([]byte,32,32),0) }
所以最终的代码中,这一段是被注释掉的,请悉知,我这个代码跟我写的一些文档是在项目做完之后的一个梳理,如果是逐步写的话,建议参考https://github.com/liuchengxu/blockchain-tutorial这篇文档,我也是根据这篇文章学习编码的。
Sorry, something went wrong.
非常感谢,我爱上了github。哈哈
No branches or pull requests
我打开了main.go里面的
这一部分
build的时候如下所示
E:/Go/bin/go.exe build -i [C:/Users/Alex/go/src/MyPublicChain]
MyPublicChain
.\main.go:15:41: cannot use "Genesis Block" (type string) as type []*BLC.Transaction in argument to BLC.CreateGenesisBlock
The text was updated successfully, but these errors were encountered: