Skip to content

Conversation

@kcalvinalvin
Copy link
Member

2 things done:

1: Better random byte slices for flatfile testing. Now slices generated for test are more diverse in length.

2: Less calls to disk for StoreData(). Previously, there would be 3 separate calls to the data file. Now, there's only one.

Changes the behavior of the function to be more random in how the slices
are generated.
@coveralls
Copy link

coveralls commented Sep 25, 2021

Pull Request Test Coverage Report for Build 1272787779

  • 17 of 19 (89.47%) changed or added relevant lines in 1 file are covered.
  • 18 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.6%) to 51.401%

Changes Missing Coverage Covered Lines Changed/Added Lines %
blockchain/indexers/flatfile.go 17 19 89.47%
Files with Coverage Reduction New Missed Lines %
blockchain/indexers/flatfile.go 1 72.97%
connmgr/connmanager.go 1 86.79%
btcec/signature.go 3 92.76%
peer/peer.go 13 75.06%
Totals Coverage Status
Change from base Build 1272745059: -0.6%
Covered Lines: 21806
Relevant Lines: 42423

💛 - Coveralls

Changes the function to only write once to the data file per once call
of StoreData().  Before, magic bytes, the size of the data, and data
would all be separate calls to the disk.  Now they're made into a single
byte slice with the data file being accessed only once per StoreData().
@kcalvinalvin kcalvinalvin force-pushed the utreexo-flatfile-improvements branch from 377d508 to 152a302 Compare September 25, 2021 11:03
@kcalvinalvin kcalvinalvin merged commit 2c2c9f6 into utreexo Sep 25, 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.

3 participants