Closed zyd82 closed 3 years ago
这个rpc的index实际上对应的是帐户的sequence, 现在sequence是uint32类型,所以,需要加一个uint32的值范围检查
与sequence相关的,uint32检查已经加上,会返回bad_sequence error, 已经修复,下一个build验证
在v0.6.4-dev-20210219-ae3070493c2d87812731c2583fe3820089246ee7版本上jt_getTransactionByIndex的问题已经解决。
但是jt_getTransactionByBlockHashAndIndex和jt_getTransactionByBlockNumberAndIndex上面类似的问题仍然存在:输入的index是984503284032984503284032,但是返回结果中是9223372036854775807。
{
"jsonrpc": "2.0",
"method": "jt_getTransactionByBlockHashAndIndex",
"params": [
{
"hash": "57FF84996DACF570E2F7B613255BD1FFAF6759202FC990A3106EA93DA8D630BC",
"index": "984503284032984503284032",
"full": true
}
],
"id": 1
}
{
"error": {
"count": 1,
"desc": "The compound error.",
"info": "1 errors"
},
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"error": {
"desc": "No matching entry found.",
"info": "can't find transaction in block: 57FF84996DACF570E2F7B613255BD1FFAF6759202FC990A3106EA93DA8D630BC, 9223372036854775807"
},
"status": 140,
"type": "tecNO_ENTRY"
}
],
"status": 1000,
"type": "tedCOMPOUND"
}
等待build环境版本更新,我在这个版本上,2021.02.19: 0.6.4-dev, ae3070493c2d87812731c2583fe3820089246ee7 返回的是
{
"error": {
"count": 1,
"desc": "The compound error.",
"info": "1 errors"
},
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"error": {
"desc": "Malformed: Bad sequence.",
"info": "invalid parameter 984503284032 for sequence"
},
"status": -284,
"type": "temBAD_SEQUENCE"
}
],
"status": 1000,
"type": "tedCOMPOUND"
}
目前环境已经是v0.6.4-dev-20210219-ae3070493c2d87812731c2583fe3820089246ee7这个版本了,现在jt_getTransactionByIndex上面问题已经解决,但是jt_getTransactionByBlockHashAndIndex和jt_getTransactionByBlockNumberAndIndex上面问题仍然存在。
后边这两个index, 不是sequence, 只是数组的下标,估计没有检查越界,我加一下
已经修复,下一个build验证
v0.6.4-dev-20210301-f0ae0dfed6982ab2222339a7bed661355df68136版本上验证通过。
测试版本:v0.5.4-dev-20210207-db1bf99761871c1bbe1b67e2bd6286eba58177fc 用例编号:FCJT_getTransactionByIndex_000020
正确的address参数,但是index是一个很大的数值"984503284032",这个请求的返回结果是:"can't find transaction: jPdx7mG595P6CowtGYbxRkik9HdWUWtB2J, 955773248"。返回结果中的955773248和请求中的984503284032并不一致,此处可以考虑二者保持一致。
jt_getTransactionByBlockHashAndIndex和jt_getTransactionByBlockNumberAndIndex也有类似的问题。