Skip to content

Commit 41d2b2d

Browse files
committed
store: Fix mapping error in subgraph_deployment_detail
The column subgraph_deployment_detail.ethereum_head_block_number is an int8 in the database, not a numeric
1 parent 9da5fa2 commit 41d2b2d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

store/postgres/src/detail.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ table! {
3838
graft_block_hash -> Nullable<Binary>,
3939
graft_block_number -> Nullable<Numeric>,
4040
ethereum_head_block_hash -> Nullable<Binary>,
41-
ethereum_head_block_number -> Nullable<Numeric>,
41+
ethereum_head_block_number -> Nullable<BigInt>,
4242
network -> Text,
4343
node_id -> Nullable<Text>,
4444
// We don't map block_range
@@ -75,7 +75,7 @@ struct Detail {
7575
graft_block_hash: Option<Bytes>,
7676
graft_block_number: Option<BigDecimal>,
7777
ethereum_head_block_hash: Option<Bytes>,
78-
ethereum_head_block_number: Option<BigDecimal>,
78+
ethereum_head_block_number: Option<i64>,
7979
network: String,
8080
node_id: Option<String>,
8181
}
@@ -188,7 +188,7 @@ impl TryFrom<DetailAndError> for status::Info {
188188
&id,
189189
"ethereum_head_block",
190190
ethereum_head_block_hash,
191-
ethereum_head_block_number,
191+
ethereum_head_block_number.map(|n| BigDecimal::from(n)),
192192
)?;
193193
let earliest_block = block(
194194
&id,

0 commit comments

Comments
 (0)