Skip to content

Commit 20f2f4d

Browse files
committed
use schema_5 for index creation rather than indices list
1 parent 7d2c13c commit 20f2f4d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

stackslib/src/chainstate/nakamoto/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,10 +290,12 @@ lazy_static! {
290290
"#,
291291
];
292292

293-
pub static ref NAKAMOTO_CHAINSTATE_SCHEMA_5: [&'static str; 1] = [
293+
pub static ref NAKAMOTO_CHAINSTATE_SCHEMA_5: [&'static str; 2] = [
294294
r#"
295295
UPDATE db_config SET version = "8";
296-
"#
296+
"#,
297+
// Add an index for index block hash in nakamoto block headers
298+
"CREATE INDEX IF NOT EXISTS index_block_hash ON nakamoto_block_headers(index_block_hash);",
297299
];
298300
}
299301

stackslib/src/chainstate/stacks/db/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,6 @@ const CHAINSTATE_INDEXES: &'static [&'static str] = &[
903903
"CREATE INDEX IF NOT EXISTS index_block_header_by_affirmation_weight ON block_headers(affirmation_weight);",
904904
"CREATE INDEX IF NOT EXISTS index_block_header_by_height_and_affirmation_weight ON block_headers(block_height,affirmation_weight);",
905905
"CREATE INDEX IF NOT EXISTS index_headers_by_consensus_hash ON block_headers(consensus_hash);",
906-
"CREATE INDEX IF NOT EXISTS index_block_hash ON nakamoto_block_headers(index_block_hash);",
907906
];
908907

909908
pub use stacks_common::consts::MINER_REWARD_MATURITY;

0 commit comments

Comments
 (0)