hyperledger-archives / iroha

Iroha - A simple, decentralized ledger
http://iroha.tech
Apache License 2.0
989 stars 297 forks source link

iroha-cli reuse transaction json file #2054

Open aleksandrovych opened 5 years ago

aleksandrovych commented 5 years ago

Hi, I use this command:

./iroha-cli --json_query query.json with query file, and this command works only for first time, after it I have

QueryResponseHandler Query is stateless invalid error. What should I do, to reuse this .json file with second query, If it’s posible?

LiraLemur commented 5 years ago

Can you please sent the JSON file please so we could check?

aleksandrovych commented 5 years ago

{ "creator_account_id": "first_manager_bot@tecsynt", "query_counter": 3, "created_ts": 1548418640649, "signature": { "pubkey": "313a07e6384776ed95447710d15e59148473ccfc052a681317a72a69f2a49910", "signature": "a6908d88dbb006f8eb04a2d91c7b92028cff0b36de9af4265be9ae67bf4a2239891a6fd8b0697e16fb313916311e4dbc9472ba2baf50b0496a114d139a0e380a" }, "query_type": "GetAccount", "account_id": "first_manager_bot@tecsynt" }

aleksandrovych commented 5 years ago

Also please explain, how to get transaction status, if I send it in this way(./iroha-cli --json_transaction tx.json), because I only get this info in file:

[2019-01-25 12:58:00.782684053][th:612][info] CLI-MAIN Send transaction to 0.0.0.0:50051 [2019-01-25 12:58:00.787602210][th:612][info] TransactionResponseHandler Transaction successfully sent

no transaction hash or another info to check transaction status. Also I dont see this transaction hash and status in tx_status_by_hash table after conect to postgres

LiraLemur commented 5 years ago

Sorry it took so long. Seems like there is a problem with CLI in regards to JSON. This functionality was not updated unfortunately, since CLI is not used as a full production-ready component. That's not Iroha issue though - only CLI should be affected.