Closed anarcher closed 5 years ago
Merging #845 into master will increase coverage by
0.04%
. The diff coverage is77.5%
.
@@ Coverage Diff @@
## master #845 +/- ##
==========================================
+ Coverage 62.14% 62.19% +0.04%
==========================================
Files 152 152
Lines 10026 10062 +36
==========================================
+ Hits 6231 6258 +27
- Misses 3120 3126 +6
- Partials 675 678 +3
Flag | Coverage Δ | |
---|---|---|
#integration_tests_long_term | 45.34% <0%> (-0.13%) |
:arrow_down: |
#integration_tests_node | 40.99% <0%> (-0.16%) |
:arrow_down: |
#unittests | 51.4% <77.5%> (+0.09%) |
:arrow_up: |
Impacted Files | Coverage Δ | |
---|---|---|
lib/node/runner/api/resource/resource.go | 91.66% <ø> (ø) |
:arrow_up: |
lib/storage/leveldb.go | 63.6% <56.25%> (-0.78%) |
:arrow_down: |
lib/node/runner/api/pagequery.go | 85.89% <81.81%> (-1.99%) |
:arrow_down: |
lib/node/runner/api/blocks.go | 75.47% <83.33%> (+0.47%) |
:arrow_up: |
lib/node/runner/node_runner.go | 77.9% <0%> (+0.44%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 96b0306...b2446dd. Read the comment docs.
4cbe905 What do you think?
If the next cursor is empty, don't display hal next
.
@anarcher : 4cbe905 What do you think? If the next cursor is empty, don't display hal
next
.
In most cases for 'hal', the 'next' and 'prev' link exists with same link, not empty.
@kfangw Plz review it
Github Issue
Background
/api/v1/blocks
's cursor is heightcursor=12123
. So this cursor should not do base64 encodingstorage.WalkOption.SkipCursor
. It's an insane approach.Solution
PageQueryOption
for base64encoding or not. Default is encoding. e.g.p, err := NewPageQuery(r, WithEncodePageCursor(false))
WalkOption.SkipCursor
storage.Walk
calliter.Last()
oriter.First()
depend onWalkOption.Reverse
.Possible Drawbacks