caivega / ipfslib

Other
2 stars 1 forks source link

S4 -jt_getTransactionByIndex,当参数index为小数时,会直接用小数的整数部分作为index #101

Closed foreso-GitHub closed 3 years ago

foreso-GitHub commented 4 years ago

jt_getTransactionByIndex,当参数index为小数时,会直接用小数的整数部分作为index。这是不是by design?抛错可能对用户更友好些。

请求:

{
  "jsonrpc":"2.0",
  "method":"jt_getTransactionByIndex",
  "params": [
    "j43x4vLAy6hW6AE3r9QqFqudmH2ajBzYm9", 2490.777
  ],
  "id":1
}

结果:

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "TransactionType": "Payment",
        "Flags": 2147483648,
        "Account": "j43x4vLAy6hW6AE3r9QqFqudmH2ajBzYm9",
        "Sequence": 2490,
        "Fee": "10",
......
caivega commented 3 years ago

已经修复,下一个build验证

foreso-GitHub commented 3 years ago

版本:20201114-v0.5.2-dev,已经修正。