-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
txs encode restful api return wrong response #4141
Comments
This is most likely because the CLI reads the tx directly from file and decodes it. The REST client attempts to first decode into the |
I suddenly realized there are several things to discuss:
So, the current solution may be the best one, this is not a bug. |
Thanks for your quick response. I make a small change in the codebase and now the |
Can your share your solution ? |
I don't disagree to that. I'm fine with any solution that meets the following acceptance criteria: Given A StdTx X As long as REST and command-line respective encoding and decoding functionalities' simmetry is preserved, I'm fine with any working solution. |
I agree with your |
I am afraid I don't follow you here @yangyanqing. I'm just saying that what I generally expect from a decoding/encoding functionality is to provide me with the ability to decode what had been encoded before. |
Summary of Bug
the
txs/encode
api return different txbytes fromgaiacli tx encode signed.json
when apply the same json file.Version
0.34.0-rc2
Steps to Reproduce
my
signed.json
:CLI:
gaiacli tx encode signed.json
API:
curl -d @signed.json -X POST http://localhost:1317/txs/encode
The former is right. I guess there are some
cdc.UnmarshalJson
problem. But I failed to get it right.For Admin Use
The text was updated successfully, but these errors were encountered: