utreexo / utreexod

A fully validating Bitcoin node with Utreexo support
ISC License
90 stars 21 forks source link

blockchain/utreexoviewpoint: Refactor Modify() function #17

Closed kcalvinalvin closed 2 years ago

kcalvinalvin commented 2 years ago

Functionality that was included in Modify() is now refactored into 3 separate functions: Modify(), IngestProof(), and ExtractAccumulatorAddDels().

Modify now only modifies the accumulator without any other checks. IngestProof validates and ingests the proof so that the caller can call Modify(). ExtractAccumulatorAddDels now does the proof sanity checks and extracts the additions and deletions from the block that was passed in.

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 1681272890


Changes Missing Coverage Covered Lines Changed/Added Lines %
blockchain/chain.go 0 9 0.0%
blockchain/validate.go 0 9 0.0%
blockchain/utreexoviewpoint.go 3 46 6.52%
<!-- Total: 3 64 4.69% -->
Files with Coverage Reduction New Missed Lines %
blockchain/utreexoviewpoint.go 1 9.14%
peer/peer.go 2 75.53%
<!-- Total: 3 -->
Totals Coverage Status
Change from base Build 1681113007: -0.006%
Covered Lines: 26205
Relevant Lines: 48128

💛 - Coveralls