RPC endpoints return BlockNotFound when doing any call on Pending, when the block is in db
What is the new behavior?
Match the pathfinder and juno behavior: behave as if there is a pending block in db in that case. The new behavior makes sense to me for call, estimate, simulate etc - but I was surprised to see that they also return a fake pending block for get_block rpcs too - all the endpoints, really. We need to match their behavior even if it's questionable because that's what the clients expect.
Diff Coverage details (click to unfold)
### crates/client/db/src/block_db.rs
`98.07692307692308%` of new lines are covered
### crates/client/rpc/src/versions/v0_7_1/methods/read/get_block_with_receipts.rs
`100.0%` of new lines are covered
Pull Request type
What is the current behavior?
RPC endpoints return BlockNotFound when doing any call on Pending, when the block is in db
What is the new behavior?
Match the pathfinder and juno behavior: behave as if there is a pending block in db in that case. The new behavior makes sense to me for call, estimate, simulate etc - but I was surprised to see that they also return a fake pending block for get_block rpcs too - all the endpoints, really. We need to match their behavior even if it's questionable because that's what the clients expect.
Does this introduce a breaking change?
No