Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store empty pending block instead of deleting the key #1241

Merged
merged 1 commit into from
Sep 18, 2023

Conversation

joshklop
Copy link
Contributor

To decrease the number of block not found errors when simulating transactions against the pending block.

blockchain/blockchain.go Outdated Show resolved Hide resolved
blockchain/blockchain.go Outdated Show resolved Hide resolved
blockchain/blockchain.go Outdated Show resolved Hide resolved
blockchain/blockchain.go Outdated Show resolved Hide resolved
blockchain/blockchain.go Outdated Show resolved Hide resolved
blockchain/blockchain.go Outdated Show resolved Hide resolved
@joshklop
Copy link
Contributor Author

While Juno is syncing:

  • A user can simulate a transaction against the pending state and potentially get a confusing result
  • starknet_getBlockWithTxs with the pending param will return the empty pending block

Are these behavior changes acceptable?

@omerfirmak
Copy link
Contributor

  • starknet_getBlockWithTxs with the pending param will return the empty pending block

I think that is fine

  • A user can simulate a transaction against the pending state and potentially get a confusing result

This I am not sure of

@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Patch coverage: 77.19% and project coverage change: -0.01% ⚠️

Comparison is base (935eb23) 73.65% compared to head (0ea311d) 73.65%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1241      +/-   ##
==========================================
- Coverage   73.65%   73.65%   -0.01%     
==========================================
  Files          70       70              
  Lines        7561     7594      +33     
==========================================
+ Hits         5569     5593      +24     
- Misses       1533     1540       +7     
- Partials      459      461       +2     
Files Changed Coverage Δ
blockchain/blockchain.go 76.80% <77.19%> (+0.10%) ⬆️

... and 2 files with indirect coverage changes

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

@joshklop joshklop force-pushed the joshklop/dont-clear-pending branch 3 times, most recently from 94c1eb4 to 0ea311d Compare September 16, 2023 14:35
To decrease the number of `block not found` errors when simulating
transactions against the pending block.
@omerfirmak omerfirmak merged commit d548f1a into main Sep 18, 2023
10 checks passed
@omerfirmak omerfirmak deleted the joshklop/dont-clear-pending branch September 18, 2023 07:08
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.

2 participants