eqlabs / pathfinder

A Starknet full node written in Rust
https://eqlabs.github.io/pathfinder/
Other
619 stars 227 forks source link

fix: class block number is overwritten #2040

Closed Mirko-von-Leipzig closed 3 months ago

Mirko-von-Leipzig commented 3 months ago

Starknet allows duplicate class declarations for V1 declares. We only store the latest declaration's block number whereas we should be storing the first.

This occurs due to an incorrect WHERE guard clause.

This PR adds a regression test (was red), and a fix (test now green).