this fix got lost in rebases
This commit is contained in:
parent
8b08828473
commit
e137d813af
@ -1440,24 +1440,26 @@ impl Web3ProxyApp {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if try_archive {
|
if try_archive {
|
||||||
// TODO: only charge for archive if it gave a result
|
if let Some(head_block_num) = head_block.map(|x| x.number()) {
|
||||||
request_metadata
|
// TODO: only charge for archive if it gave a result
|
||||||
.archive_request
|
request_metadata
|
||||||
.store(true, atomic::Ordering::Relaxed);
|
.archive_request
|
||||||
|
.store(true, atomic::Ordering::Relaxed);
|
||||||
|
|
||||||
response_data = self
|
response_data = self
|
||||||
.balanced_rpcs
|
.balanced_rpcs
|
||||||
.try_proxy_connection::<_, Box<RawValue>>(
|
.try_proxy_connection::<_, Box<RawValue>>(
|
||||||
method,
|
method,
|
||||||
params,
|
params,
|
||||||
Some(request_metadata),
|
Some(request_metadata),
|
||||||
Some(Duration::from_secs(30)),
|
Some(Duration::from_secs(30)),
|
||||||
// TODO: should this be block 0 instead?
|
// TODO: should this be block 0 instead?
|
||||||
Some(&U64::one()),
|
Some(&U64::one()),
|
||||||
// TODO: is this a good way to allow lagged archive nodes a try
|
// TODO: is this a good way to allow lagged archive nodes a try
|
||||||
Some(&head_block.unwrap().number().saturating_sub(5.into()).clamp(U64::one(), U64::MAX)),
|
Some(head_block_num.saturating_sub(5.into()).clamp(U64::one(), U64::MAX)),
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
response_data.try_into()?
|
response_data.try_into()?
|
||||||
|
Loading…
Reference in New Issue
Block a user