-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
goal: Better formatting in goal clerk simulate
#5259
goal: Better formatting in goal clerk simulate
#5259
Conversation
goal clerk simulate
goal clerk simulate
Codecov Report
@@ Coverage Diff @@
## master #5259 +/- ##
==========================================
+ Coverage 53.78% 53.80% +0.01%
==========================================
Files 450 450
Lines 56201 56208 +7
==========================================
+ Hits 30226 30240 +14
+ Misses 23626 23625 -1
+ Partials 2349 2343 -6
... and 8 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally lgtm on first pass, have a question on restClient
implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good either way
Summary
This PR uses the new REST client feature from #5253 to allow the client to get msgpack simulation responses. With this, the client can decode to the more precise
v2.PreEncodedSimulateResponse
instead ofmodel.SimulateResponse
.The only difference between these two types is that
model.SimulateResponse
usesmap[string]interface{}
to represent transactions, whilev2.PreEncodedSimulateResponse
usestransactions.SignedTxn
. This results in a minor problem, since our JSON decoder will decode integers as float64 by default, and this makes responses look strange whengoal clerk simulate
re-encodes the JSON response.For example, this response from
goal clerk simulate
adds.0
after integers in the signed transaction:Test Plan
Add additional test in
test/e2e-go/restAPI/restClient_test.go