vartex
vartex copied to clipboard
Typing comparison issues causing erroneous errors
I'm getting this line raised erroneously due to mismatching types of the compared values. https://github.com/ArweaveTeam/vartex/blob/c3090ba0cc7c87c007e5c048e0198d3b41a39d7b/src/database/sync.ts#L212 .
I found this by replacing the line with Found mismatching block at: ${rowResult.height.toString()} because ${typeof(matchingRow["height"])}:${matchingRow["height"]} != ${typeof(rowResult.height)}:${rowResult.height}
to display the types.
rowResult is an object
, and equality with it compares false.