Skip to content

fix(state): unify the errors with the old state#3575

Open
MaksymMalicki wants to merge 3 commits intomainfrom
maksym/state-cleanups
Open

fix(state): unify the errors with the old state#3575
MaksymMalicki wants to merge 3 commits intomainfrom
maksym/state-cleanups

Conversation

@MaksymMalicki
Copy link
Copy Markdown
Contributor

No description provided.

@MaksymMalicki MaksymMalicki force-pushed the maksym/state-cleanups branch from f8e03fe to b6723fe Compare April 22, 2026 14:37
Comment thread core/state/accessors.go
}

// Gets a contract instance from the database. If it doesn't exist returns a contract not deployed error
func GetContract(r db.KeyValueReader, addr *felt.Felt) (stateContract, error) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because the old state returns the db.KeyNotFound in the contract data reads, we also want to return it in the new state. This wrapper makes no sense anymore

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.94%. Comparing base (b48ef4b) to head (cb4df12).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3575      +/-   ##
==========================================
- Coverage   74.02%   73.94%   -0.09%     
==========================================
  Files         381      380       -1     
  Lines       40673    40624      -49     
==========================================
- Hits        30108    30038      -70     
- Misses       8780     8801      +21     
  Partials     1785     1785              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MaksymMalicki MaksymMalicki marked this pull request as draft April 22, 2026 14:55
@MaksymMalicki MaksymMalicki marked this pull request as draft April 22, 2026 14:55
@MaksymMalicki MaksymMalicki force-pushed the maksym/state-cleanups branch from d51ddbc to d26275a Compare April 22, 2026 15:41
@MaksymMalicki MaksymMalicki marked this pull request as ready for review April 22, 2026 15:41
@MaksymMalicki MaksymMalicki marked this pull request as draft April 22, 2026 15:48
@MaksymMalicki MaksymMalicki marked this pull request as draft April 22, 2026 15:48
@MaksymMalicki MaksymMalicki marked this pull request as draft April 22, 2026 15:48
@MaksymMalicki MaksymMalicki marked this pull request as ready for review April 22, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant