vartex icon indicating copy to clipboard operation
vartex copied to clipboard

Typing comparison issues causing erroneous errors

Open xloem opened this issue 2 years ago • 0 comments

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.

xloem avatar May 18 '22 09:05 xloem