Author: Bram Cohen 2017-03-31 20:38:16
Published on: 2017-03-31T20:38:16+00:00
In an email exchange, Peter Todd gave some suggestions to Bram Cohen regarding the presentation of his work. He suggested that splitting the reference implementation and optimized implementation into two separate files would be better. Bram followed this advice and added explanations to the README, reorganized the files, and added comments to his work on MerkleSet which can be found on GitHub. Todd also advised Bram to test edge cases separately in unit tests. Bram explained that he uses pseudorandom data to test edge cases which does a good job of hitting all the lines of code at the expense of time taken for tests to run. The advantage of very custom unit tests is that they run almost instantly but require painstaking maintenance and miss more stuff. Bram prefers the pseudorandom data approach. Bram pointed out that the proportion of code devoted to tests is more than it looks like at first blush because all the audit methods are just for testing.
Updated on: 2023-06-11T21:40:13.221929+00:00