Skip to content

Commit dd6c356

Browse files
authored
fix: fail fast when escrow accounts are missing (#86)
Previsously, paid queries would stall until timeout while awaiting the initial eventual value for escrow accounts. This change avoids the delay, such that the intended error message is returned.
1 parent 22f6f83 commit dd6c356

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

common/src/tap_manager.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,10 @@ impl TapManager {
6868
})?;
6969
if !self
7070
.escrow_accounts
71-
.value()
72-
.await
73-
.map(|accounts| {
74-
accounts
75-
.get(&receipt_signer)
76-
.map_or(false, |balance| balance > &U256::zero())
77-
})
78-
.unwrap_or(false)
71+
.value_immediate()
72+
.unwrap_or_default()
73+
.get(&receipt_signer)
74+
.map_or(false, |balance| balance > &U256::zero())
7975
{
8076
return Err(anyhow!(
8177
"Receipt sender `{}` is not eligible for this indexer",

0 commit comments

Comments
 (0)