Git Product home page Git Product logo

Comments (4)

sylihahaha avatar sylihahaha commented on June 15, 2024

将生成的java文件注释以下行后可以正常部署,不太明白正确逻辑应该如何使用?

protected AccountTest(String contractAddress, Client client, CryptoKeyPair credential) {
        super(getBinary(client.getCryptoSuite()), contractAddress, client, credential);
//        this.transactionManager = new ProxySignTransactionManager(client);
    }

from fisco-bcos.

kyonRay avatar kyonRay commented on June 15, 2024

将生成的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

from fisco-bcos.

kyonRay avatar kyonRay commented on June 15, 2024

FISCO-BCOS/code-generator#32

from fisco-bcos.

kyonRay avatar kyonRay commented on June 15, 2024

解决方案有以下几种:

  1. 源码编译控制台时,可以将org.fisco-bcos.code-generator:bcos-code-generator版本号改成 1.4.0
  2. 若使用已下载的控制台时,可以将lib目录下bcos-code-generator-1.3.0.jar 替换成 bcos-code-generator-1.4.0.jar版本,下载链接:https://github.com/FISCO-BCOS/code-generator/releases/download/v1.4.0/bcos-code-generator-1.4.0.jar
  3. 若已经生成好Java 文件,可以按照楼主的方式将构造函数中的TransactionManager初始化的代码进行注释即可:
protected AccountTest(String contractAddress, Client client, CryptoKeyPair credential) {
        super(getBinary(client.getCryptoSuite()), contractAddress, client, credential);
        // this.transactionManager = new ProxySignTransactionManager(client); // 注释这一行
    }

from fisco-bcos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.