0chain
0chain copied to clipboard
Extract endpoints to common constants
Fixes
Changes
The aim of this PR is to extract all hardcoded string references of endpoints to a single source of truth for easier future reference and maintainability This is the first step in the plan to make our endpoints RESTful
Need to be mentioned in CHANGELOG.md?
Tests
Tasks to complete before merging PR:
- [ ] Ensure system tests are passing. If not Run them manually to check for any regressions :clipboard:
- [ ] Do any new system tests need added to test this change? do any existing system tests need updated? If so create a PR at 0chain/system_test
- [ ] Merge your system tests PR to master AFTER merging this PR
Associated PRs (Link as appropriate):
- blobber:
- gosdk:
- system_test:
- zboxcli:
- zwalletcli:
- Other: ...
Codecov Report
Merging #1596 (147e639) into staging (5f6f733) will decrease coverage by
0.00%
. The diff coverage is16.53%
.
@@ Coverage Diff @@
## staging #1596 +/- ##
===========================================
- Coverage 28.79% 28.78% -0.01%
===========================================
Files 359 359
Lines 58637 58636 -1
===========================================
- Hits 16886 16880 -6
- Misses 39844 39851 +7
+ Partials 1907 1905 -2
Flag | Coverage Δ | |
---|---|---|
Unit-Tests | 28.78% <16.53%> (-0.01%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
code/go/0chain.net/chaincore/chain/handler.go | 8.18% <0.00%> (ø) |
|
code/go/0chain.net/chaincore/chain/n2n_handler.go | 0.00% <0.00%> (ø) |
|
.../0chain.net/chaincore/chain/protocol_lfb_ticket.go | 9.39% <0.00%> (ø) |
|
...0chain.net/chaincore/chain/protocol_view_change.go | 0.00% <0.00%> (ø) |
|
...ode/go/0chain.net/chaincore/chain/state_handler.go | 0.00% <0.00%> (ø) |
|
code/go/0chain.net/chaincore/client/handler.go | 0.00% <0.00%> (ø) |
|
code/go/0chain.net/chaincore/node/handler.go | 0.00% <0.00%> (ø) |
|
code/go/0chain.net/chaincore/node/n2n_handler.go | 22.69% <0.00%> (ø) |
|
code/go/0chain.net/chaincore/node/n2n_push2pull.go | 42.72% <0.00%> (ø) |
|
code/go/0chain.net/chaincore/node/node.go | 24.12% <0.00%> (ø) |
|
... and 15 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
@stewartie4 shouldn't we move constants to the common repo?
@dabasov I thought so too My original PR did this: https://github.com/0chain/0chain/pull/1548/files
but Peter and Dayi disagreed See this conversation
https://0chain.slack.com/archives/C01U94VF56Y/p1659679807160019?thread_ts=1659559029.315439&channel=C01U94VF56Y&message_ts=1659679807.160019
This is where this PR comes from
well, very doubtful for me, we will move all payloads (DTO) to the common package soon, should it also reduce readability? most likely, should it reduce duplication? for sure.
reduce of duplication > readability