Skip to content
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

api: endpoint /chain/transactions/{height}/{index} now outputs fields as hex instead of base64 #1355

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

altergui
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Jul 17, 2024

Pull Request Test Coverage Report for Build 9973749817

Details

  • 0 of 31 (0.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.07%) to 61.138%

Changes Missing Coverage Covered Lines Changed/Added Lines %
api/helpers.go 0 31 0.0%
Files with Coverage Reduction New Missed Lines %
util/zk.go 2 86.84%
Totals Coverage Status
Change from base Build 9970800402: -0.07%
Covered Lines: 15998
Relevant Lines: 26167

💛 - Coveralls

@altergui altergui force-pushed the fix/base64-to-hex branch from fb40f7b to f7c0710 Compare July 17, 2024 11:55
@altergui altergui force-pushed the fix/base64-to-hex branch from f7c0710 to 82bcf53 Compare July 17, 2024 11:58
@altergui
Copy link
Contributor Author

this doesn't work, panics

panic: reflect: reflect.Value.Set using value obtained using unexported field

goroutine 179311 [running]:
reflect.flag.mustBeAssignableSlow(0x35a040f?)
	reflect/value.go:269 +0xb4
reflect.flag.mustBeAssignable(...)
	reflect/value.go:259
reflect.Value.Set({0x36ef260?, 0xc00b0a5e50?, 0x0?}, {0x3854fc0?, 0x5f13be0?, 0x36ef260?})
	reflect/value.go:2319 +0x65
go.vocdoni.io/dvote/api.convertByteFieldsToHex({0x3c4d600?, 0xc00b0a5e40?, 0x45b3f40?})
	go.vocdoni.io/dvote/api/helpers.go:121 +0x2c5
go.vocdoni.io/dvote/api.convertProtoMessageBytesFieldsToHex({0x45b3f40, 0xc00b0a5b40})
	go.vocdoni.io/dvote/api/helpers.go:96 +0x14b
go.vocdoni.io/dvote/api.protoFormat({0xc009c5fb00, 0x2fe, 0x300})
	go.vocdoni.io/dvote/api/helpers.go:67 +0x70
go.vocdoni.io/dvote/api.(*API).chainTxHandler(0xc003754fc0, 0x2?, 0xc00c64ed80)
	go.vocdoni.io/dvote/api/chain.go:676 +0x2d3
go.vocdoni.io/dvote/httprouter/apirest.(*API).RegisterMethod.func1({{0x36aad80, 0xc00c64ed50}, {0xc19e0d9b4dd249b2, 0x8896a802d, 0x5ea5e20}, {0xc00b45f390, 0x5, 0x5}, 0xc00c64ed80})
	go.vocdoni.io/dvote/httprouter/apirest/apirest.go:231 +0x6b
created by go.vocdoni.io/dvote/httprouter.(*HTTProuter).AddPublicHandler.(*HTTProuter).routerHandler.func1 in goroutine 179310
	go.vocdoni.io/dvote/httprouter/httprouter.go:290 +0x3ae

@p4u p4u merged commit b46eef4 into main Jul 19, 2024
17 checks passed
@p4u p4u deleted the fix/base64-to-hex branch July 19, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants