caivega / ipfslib

Other
2 stars 1 forks source link

S3 - jt_sendTransaction和jt_signTransaction,错误的sequence,交易发送成功 #188

Closed foreso-GitHub closed 3 years ago

foreso-GitHub commented 3 years ago

jt_sendTransaction和jt_signTransaction,错误的sequence(小数和字符串),交易发送成功。 版本: v0.5.4-dev-20210209-f080e8c2b57b52cabd3cef2718439ab6305d3f46 TestCase:FCJT_sendTransaction_000660

{
    "jsonrpc": "2.0",
    "id": 216,
    "method": "jt_sendTransaction",
    "params": [
        {
            "from": "jVggmTZfm9PZfAFPxQ3AJpGszQgpsamK2",
            "secret": "ssXMa3j7UbGEeyMG519SYJdg8JifY",
            "to": "jabHwTxaCJE9E5ZSCehHWSSaP5tZ4xwpLv",
            "value": "20",
            "fee": "10",
            "memos": [
                "autotest: sequence test"
            ],
            "sequence": 0.4
        }
    ]
}

{
    "id": 216,
    "jsonrpc": "2.0",
    "result": [
        {
            "result": "C073259DA19FEA7874A2228DBE4D6747CBCCBAF1E9D88D77B6E9B658296A97A4"
        }
    ]
}
{
    "jsonrpc": "2.0",
    "id": 216,
    "method": "jt_sendTransaction",
    "params": [
        {
            "from": "jVggmTZfm9PZfAFPxQ3AJpGszQgpsamK2",
            "secret": "ssXMa3j7UbGEeyMG519SYJdg8JifY",
            "to": "jabHwTxaCJE9E5ZSCehHWSSaP5tZ4xwpLv",
            "value": "20",
            "fee": "10",
            "memos": [
                "autotest: sequence test"
            ],
            "sequence": "1234"
        }
    ]
}

{
    "id": 216,
    "jsonrpc": "2.0",
    "result": [
        {
            "result": "B8753D6EA7C41EA6FE3C43B8FD7AA3BA83293C8328BB1634FA9FE75FD04F8D7F"
        }
    ]
}
caivega commented 3 years ago

我更新了TemBAD_SEQUENCE这个错误信息的描述,之前的描述,只是说sequence in past, 实际上与sequence有问题相关的,都应该用这个错误信息,而且描述应该是“Bad sequence."

caivega commented 3 years ago

现在返回错误信息如下

{
    "error": {
        "count": 1,
        "desc": "The compound error.",
        "info": "1 errors"
    },
    "id": 216,
    "jsonrpc": "2.0",
    "result": [
        {
            "error": {
                "desc": "Malformed: Bad sequence",
                "info": "sequence is not integer",
                "message": {
                    "fee": "10",
                    "from": "root",
                    "memos": [
                        "autotest: sequence test"
                    ],
                    "sequence": 0.4,
                    "to": "jabHwTxaCJE9E5ZSCehHWSSaP5tZ4xwpLv",
                    "value": "20"
                }
            },
            "status": -284,
            "type": "temBAD_SEQUENCE"
        }
    ],
    "status": 1000,
    "type": "tedCOMPOUND"
}
caivega commented 3 years ago

已经修复,下一个build验证

foreso-GitHub commented 3 years ago

在版本v0.6.4-dev-20210218-f79a420c94324f0e122b265a2e7be26573c78249中验证,已经修复。