-
Notifications
You must be signed in to change notification settings - Fork 702
New issue
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
使用Java SDK部署合约时报错:transaction hash mismatching #4288
Comments
将生成的java文件注释以下行后可以正常部署,不太明白正确逻辑应该如何使用? protected AccountTest(String contractAddress, Client client, CryptoKeyPair credential) {
super(getBinary(client.getCryptoSuite()), contractAddress, client, credential);
// this.transactionManager = new ProxySignTransactionManager(client);
} |
这是一个已知bug,会在下个版本解决。这是生成Java文件时的bug,如果设置transactionManager就会用新的transactionManager的接口发送v1版本的交易,只有在区块链3.6.0以上的版本节点支持v1交易。旧的节点都会因为不认识v1版本交易而哈希计算错误。 TransactionManager的使用可以参考以下文档:https://fisco-bcos-doc.readthedocs.io/zh-cn/latest/docs/sdk/java_sdk/assemble_service.html |
解决方案有以下几种:
protected AccountTest(String contractAddress, Client client, CryptoKeyPair credential) {
super(getBinary(client.getCryptoSuite()), contractAddress, client, credential);
// this.transactionManager = new ProxySignTransactionManager(client); // 注释这一行
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题
使用fisco-bcos-java-sdk 3.6.0版本部署自定义合约时报错,并且自定义合约在控制台可以正常部署以及进行方法调用。
步骤
The text was updated successfully, but these errors were encountered: