Skip to content

Conversation

ucwong
Copy link
Member

@ucwong ucwong commented Apr 17, 2021

  • log: fix formatting of big.Int

The implementation of formatLogfmtBigInt had two issues: it crashed when
the number was actually large enough to hit the big integer case, and
modified the big.Int while formatting it.

  • log: don't call FormatLogfmtInt64 for int16

  • log: separate from decimals back, not front

Co-authored-by: Péter Szilágyi [email protected]

* log: fix formatting of big.Int

The implementation of formatLogfmtBigInt had two issues: it crashed when
the number was actually large enough to hit the big integer case, and
modified the big.Int while formatting it.

* log: don't call FormatLogfmtInt64 for int16

* log: separate from decimals back, not front

Co-authored-by: Péter Szilágyi <[email protected]>
@codecov
Copy link

codecov bot commented Apr 17, 2021

Codecov Report

Merging #933 (2649f26) into master (a7761be) will decrease coverage by 0.46%.
The diff coverage is 60.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #933      +/-   ##
==========================================
- Coverage   49.46%   49.00%   -0.47%     
==========================================
  Files         415      422       +7     
  Lines       46572    47131     +559     
==========================================
+ Hits        23039    23096      +57     
- Misses      21525    22030     +505     
+ Partials     2008     2005       -3     
Impacted Files Coverage Δ
ctxc/fetcher/block_fetcher.go 0.00% <0.00%> (ø)
log/format.go 19.08% <65.21%> (ø)
p2p/discover/v4_udp.go 75.79% <0.00%> (-1.45%) ⬇️
p2p/peer.go 76.56% <0.00%> (-1.05%) ⬇️
trie/trie.go 78.24% <0.00%> (-0.77%) ⬇️
ctxc/filters/api.go 44.60% <0.00%> (-0.75%) ⬇️
p2p/simulations/http.go 66.02% <0.00%> (-0.65%) ⬇️
core/tx_pool.go 73.21% <0.00%> (-0.59%) ⬇️
trie/proof.go 73.13% <0.00%> (ø)
log/handler_glog.go 0.00% <0.00%> (ø)
... and 12 more

@ucwong ucwong merged commit abdb364 into master Apr 19, 2021
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