Transactions

如何在不指定貨幣發行者的情況下在 Ripple 中設置付款?

  • September 24, 2014

我想通過使用 API 將 IOU 從我的一個帳戶發送到另一個帳戶。兩個賬戶都信任同一個 IOU 發行者,這是一個單獨的地址。根據Transaction Format,我會將 Amount issuer 設置為接收賬戶,將 SendMax issuer 設置為發送賬戶。然而,嘗試這個,我得到一個“路徑乾燥”錯誤:

{
 "id": 6,
 "status": "success",
 "type": "response",
 "result": {
   "engine_result": "tecPATH_DRY",
   "engine_result_code": 128,
   "engine_result_message": "Path could not send partial amount.",
   "tx_blob": "1200002280000000240000000E5011000000323031342D30392D32335430313A34373A34303A39383834383635303061D4445EADB112E0000000000000000000000000005442430000000000D3BC678DA1AEC545F393F5B0AFD2B8654CE43DB368400000000000000A69D44469DD823458000000000000000000000000005442430000000000D6C315BE3EADA22F12AC21AC94A5FC38CA5AFADA73210220AFA84AEEE2DD794576E98411946D671F8E1F80E6C432B5ABAAAB2957651CD674473045022100FD0F2FECF958294BEA74876A4E5FE4192EA10EFC55C9B166F9F427861D5CBC42022067AA4B5CDA1BEB1D400937888C7819A412B238C79423A3DDB6F4FC8F45D45D618114D6C315BE3EADA22F12AC21AC94A5FC38CA5AFADA8314D3BC678DA1AEC545F393F5B0AFD2B8654CE43DB3",
   "tx_json": {
     "Account": "rL2ZJ8iTF9w5UGr8MzQSt8GpedNmutpEEQ",
     "Amount": {
       "currency": "TBC",
       "issuer": "rLJZHsAbNZu264dWnPCGgpqePAYfNZR1Zk",
       "value": "0.123"
     },
     "Destination": "rLJZHsAbNZu264dWnPCGgpqePAYfNZR1Zk",
     "Fee": "10",
     "Flags": 2147483648,
     "InvoiceID": "000000323031342D30392D32335430313A34373A34303A393838343836353030",
     "SendMax": {
       "currency": "TBC",
       "issuer": "rL2ZJ8iTF9w5UGr8MzQSt8GpedNmutpEEQ",
       "value": "0.12423"
     },
     "Sequence": 14,
     "SigningPubKey": "0220AFA84AEEE2DD794576E98411946D671F8E1F80E6C432B5ABAAAB2957651CD6",
     "TransactionType": "Payment",
     "TxnSignature": "3045022100FD0F2FECF958294BEA74876A4E5FE4192EA10EFC55C9B166F9F427861D5CBC42022067AA4B5CDA1BEB1D400937888C7819A412B238C79423A3DDB6F4FC8F45D45D61",
     "hash": "6CDB694DF36F4BD3AB928A9D761A9F60C285557B3C1136749DF7BC56A46ED641"
   }
 }
}

儘管 rLJZHsAbNZu264dWnPCGgpqePAYfNZR1Zk 和 rL2ZJ8iTF9w5UGr8MzQSt8GpedNmutpEEQ 信任同一個發行人 (rTJdjjQ5wWAMh8TL1ToXXD2mZzesa6DSX) 並且有足夠的 IOU 來支付交易。

我該如何解決這個問題?我究竟做錯了什麼?

Ripple 在處理交易時不會搜尋路徑。必須首先使用路徑查找找到路徑,並在事務中指定。您收到路徑乾燥錯誤,因為您沒有指定任何路徑,因此您獲得的唯一路徑是預設路徑。

一個簡單的解決方案是將 SendMax 金額的發行者更改為網關。這將在每個路徑之前隱式插入網關的帳戶節點,包括預設路徑。或者,將網關的帳戶節點指定為顯式路徑或使用尋路。

引用自:https://bitcoin.stackexchange.com/questions/30635