Skip to content

Commit

Permalink
Revert putting fetch of interest_bearing_config in the background pool
Browse files Browse the repository at this point in the history
  • Loading branch information
steveluscher committed Dec 17, 2024
1 parent a1091d7 commit 8e2335c
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions rpc/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1993,22 +1993,10 @@ impl JsonRpcRequestProcessor {
Error::invalid_params("Invalid param: mint could not be unpacked".to_string())
})?;

let interest_bearing_config = OptionFuture::from(
mint.get_extension::<InterestBearingConfig>()
.map(|interest_bearing_config| {
let bank = Arc::clone(&bank);
async move {
let unix_timestamp = self
.runtime
.spawn_blocking(move || bank.clock().unix_timestamp)
.await
.expect("Failed to spawn blocking task");
(*interest_bearing_config, unix_timestamp)
}
})
.ok(),
)
.await;
let interest_bearing_config = mint
.get_extension::<InterestBearingConfig>()
.map(|x| (*x, bank.clock().unix_timestamp))
.ok();

let supply = token_amount_to_ui_amount_v2(
mint.base.supply,
Expand Down

0 comments on commit 8e2335c

Please sign in to comment.