Skip to content

Conversation

ucwong
Copy link
Member

@ucwong ucwong commented Dec 12, 2022

No description provided.

This improves readability of function 'push'.

sort.Search(N, ...) will at most return N when no match, so ix should be compared
with N. The previous version would compare ix with N+1 in case an additional item
was appended. No bug resulted from this comparison, but it's not easy to understand
why.

Co-authored-by: Felix Lange <fjl@twurst.com>
@codecov
Copy link

codecov bot commented Dec 13, 2022

Codecov Report

Merging #1380 (e8f7397) into master (ba378e8) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1380   +/-   ##
=======================================
  Coverage   51.60%   51.61%           
=======================================
  Files         461      461           
  Lines       58063    58063           
=======================================
+ Hits        29965    29968    +3     
- Misses      25826    25829    +3     
+ Partials     2272     2266    -6     
Impacted Files Coverage Δ
p2p/discover/table.go 86.62% <100.00%> (+2.43%) ⬆️
p2p/discover/v4_udp.go 74.74% <0.00%> (-4.34%) ⬇️
p2p/enode/iter.go 90.55% <0.00%> (-2.37%) ⬇️
whisper/whisperv6/message.go 69.94% <0.00%> (-1.16%) ⬇️
p2p/simulations/mocker.go 33.63% <0.00%> (-0.91%) ⬇️
ctxc/filters/api.go 50.66% <0.00%> (-0.67%) ⬇️
ctxc/downloader/downloader.go 77.28% <0.00%> (-0.11%) ⬇️
p2p/server.go 66.35% <0.00%> (ø)
core/rawdb/freezer.go 42.61% <0.00%> (ø)
trie/proof.go 76.06% <0.00%> (+0.30%) ⬆️
... and 7 more

@ucwong ucwong merged commit e45a18f into master Dec 13, 2022
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.

2 participants