Skip to content

Commit

Permalink
Merge branch 'master' into use-latest-block-in-tx-pool
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchTurner authored Jan 21, 2025
2 parents ca49f94 + b0773e0 commit f209548
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Fixed
- [2612](https://github.com/FuelLabs/fuel-core/pull/2612): Use latest gas price to estimate next block gas price in tx pool instead of using algorithm directly
- [2609](https://github.com/FuelLabs/fuel-core/pull/2609): Check response before trying to deserialize, return error instead
- [2599](https://github.com/FuelLabs/fuel-core/pull/2599): Use the proper `url` apis to construct full url path in `BlockCommitterHttpApi` client

## [Version 0.41.0]
Expand Down
4 changes: 2 additions & 2 deletions crates/services/gas_price_service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ num_enum = { workspace = true }
parking_lot = { workspace = true }
reqwest = { workspace = true, features = ["json"] }
serde = { workspace = true }
serde_json = { workspace = true, optional = true }
serde_json = { workspace = true }
strum = { workspace = true, features = ["derive"] }
strum_macros = { workspace = true }
thiserror = { workspace = true }
Expand All @@ -39,4 +39,4 @@ mockito = { version = "1.6.1" }
serde_json = { workspace = true }

[features]
test-helpers = ["dep:mockito", "dep:serde_json"]
test-helpers = ["dep:mockito"]
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ impl BlockCommitterApi for BlockCommitterHttpApi {
let path = format!("/v1/costs?variant=specific&value={l2_block_number}&limit={NUMBER_OF_BUNDLES}");
let full_path = url.join(&path)?;
let response = self.client.get(full_path).send().await?;
let parsed = response.json::<Vec<RawDaBlockCosts>>().await?;
let text = response.text().await?;
let parsed: Vec<RawDaBlockCosts> = serde_json::from_str(&text).map_err(|e| { anyhow::anyhow!("Failed to get costs from block committer: {e} for the response {text}") })?;
Ok(parsed)
} else {
Ok(vec![])
Expand Down

0 comments on commit f209548

Please sign in to comment.