better error context

This commit is contained in:
Bryan Stitt 2022-12-05 16:35:51 -08:00
parent a54a061bd2
commit c10a0e9d3c
2 changed files with 5 additions and 1 deletions

View File

@ -268,6 +268,10 @@ These are roughly in order of completition
These are not yet ordered. There might be duplicates. We might not actually need all of these. These are not yet ordered. There might be duplicates. We might not actually need all of these.
- [ ] soft limit needs more thought
- it should be the min of total_sum_soft_limit (from only non-lagged servers) and min_sum_soft_limit
- otherwise it won't track anything and will just give errors.
- but if web3 proxy has just started, we should give some time otherwise we will thundering herd the first server that responds
- [ ] connection pool for websockets. use tokio-tungstenite directly. no need for ethers providers since serde_json is enough for us - [ ] connection pool for websockets. use tokio-tungstenite directly. no need for ethers providers since serde_json is enough for us
- this should also get us closer to being able to do our own streaming json parser where we can - this should also get us closer to being able to do our own streaming json parser where we can
- [ ] get `oldest_allowed` out of config. or calculate automatically based on block time. - [ ] get `oldest_allowed` out of config. or calculate automatically based on block time.

View File

@ -200,7 +200,7 @@ impl Web3Connection {
Level::Debug.into(), Level::Debug.into(),
) )
.await? .await?
.context("no block!")?; .context("no block during check_block_data_limit!")?;
if SavedBlock::from(head_block).syncing() { if SavedBlock::from(head_block).syncing() {
// if the node is syncing, we can't check its block data limit // if the node is syncing, we can't check its block data limit