From 4e19bbddc260312c655e9adaa4e6196d024b5004 Mon Sep 17 00:00:00 2001 From: Theo Butler Date: Tue, 7 Nov 2023 16:33:46 -0500 Subject: [PATCH] fix: fail fast when escrow accounts are missing 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. --- common/src/tap_manager.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/common/src/tap_manager.rs b/common/src/tap_manager.rs index ebd193dd..32edd786 100644 --- a/common/src/tap_manager.rs +++ b/common/src/tap_manager.rs @@ -68,14 +68,10 @@ impl TapManager { })?; if !self .escrow_accounts - .value() - .await - .map(|accounts| { - accounts - .get(&receipt_signer) - .map_or(false, |balance| balance > &U256::zero()) - }) - .unwrap_or(false) + .value_immediate() + .unwrap_or_default() + .get(&receipt_signer) + .map_or(false, |balance| balance > &U256::zero()) { return Err(anyhow!( "Receipt sender `{}` is not eligible for this indexer",