Closed Maelkum closed 2 years ago
@awfm9 I was considering adding tests for service/loader/config
similar to service/mapper/config
, but since it deals with functions I wasn't sure if I should. Mapper has somewhat nicer config in that it's mainly boolean config options.
@awfm9 I was considering adding tests for
service/loader/config
similar toservice/mapper/config
, but since it deals with functions I wasn't sure if I should. Mapper has somewhat nicer config in that it's mainly boolean config options.
I started experimenting with this, and it looks like it's officially not supported:
Slice, map, and function values are not comparable.
https://golang.org/ref/spec#Comparison_operators
Interfaces are comparable, so TrieInitializer
could be covered, but the ExcludeHeight
is implemented by functions, so assert
library will not compare them.
Since this PR will include also other tests for the loader
package, I'll convert it into a draft until they're all complete.
I added some more tests for the loader package, both reading from the index and creating/reading from a checkpoint.
With this, test coverage for the loader
package is now at ~91%.
Goal of this PR
This PR adds tests for the updated
IterateLedger
function - testing exclusion of payloads below a certain height.Checklist