智能合约并发调用失败
我最近在对智能合约进行并发测试,测试合约是官方的存证合约,在执行并行测试的时候总是失败,请帮忙指出问题所在,谢谢。 下面是我执行并发测试的步骤:
1.利用命令行部署存证合约:
2.确认存证合约可以被调用
3. 进行并发测试
cmc命令如下:
./cmc parallel invoke --contract-name=fact
--method=save
--printTime=5
--loopNum=1000
--threadNum=200
--timeout=1800
--sleepTime=100
--climbTime=1
--use-tls=true
--showKey=false
--pairs="[{"file_name":"name007","file_hash":"ab3456df5799b87c77e7f88","time":"6543234"}"]
--hosts="92.168.122.1:12301"
--org-IDs="wx-org1.chainmaker.org"
--user-keys="./testdata/crypto-config/wx-org1.chainmaker.org/user/client1/client1.sign.key"
--user-crts="./testdata/crypto-config/wx-org1.chainmaker.org/user/client1/client1.sign.crt"
--ca-path="./testdata/crypto-config/wx-org1.chainmaker.org/ca"
--check-result =true
--admin-sign-keys="./testdata/crypto-config/wx-org1.chainmaker.org/user/admin1/admin1.sign.key,./testdata/crypto-config/wx-org2.chainmaker.org/user/admin1/admin1.sign.key,./testdata/crypto-config/wx-org3.chainmaker.org/user/admin1/admin1.sign.key,./testdata/crypto-config/wx-org4.chainmaker.org/user/admin1/admin1.sign.key"
--admin-sign-crts="./testdata/crypto-config/wx-org1.chainmaker.org/user/admin1/admin1.sign.crt,./testdata/crypto-config/wx-org2.chainmaker.org/user/admin1/admin1.sign.crt,./testdata/crypto-config/wx-org3.chainmaker.org/user/admin1/admin1.sign.crt,./testdata/crypto-config/wx-org4.chainmaker.org/user/admin1/admin1.sign.crt"
执行结果为: