Skip to content

Commit 7f76bce

Browse files
committed
chore: integrate db changes into v16
1 parent 7031ffb commit 7f76bce

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

stacks-signer/src/signerdb.rs

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ static DROP_BLOCK_SIGNATURES_TABLE: &str = r#"
653653
DROP TABLE IF EXISTS block_signatures;
654654
"#;
655655

656-
static CREATE_BLOCK_SIGNATURES_TABLE_V17: &str = r#"
656+
static CREATE_BLOCK_SIGNATURES_TABLE_V16: &str = r#"
657657
CREATE TABLE IF NOT EXISTS block_signatures (
658658
-- The block sighash commits to all of the stacks and burnchain state as of its parent,
659659
-- as well as the tenure itself so there's no need to include the reward cycle. Just
@@ -671,7 +671,7 @@ static DROP_BLOCK_REJECTION_SIGNER_ADDRS: &str = r#"
671671
DROP TABLE IF EXISTS block_rejection_signer_addrs;
672672
"#;
673673

674-
static CREATE_BLOCK_REJECTION_SIGNER_ADDRS_V17: &str = r#"
674+
static CREATE_BLOCK_REJECTION_SIGNER_ADDRS_V16: &str = r#"
675675
CREATE TABLE IF NOT EXISTS block_rejection_signer_addrs (
676676
-- The block sighash commits to all of the stacks and burnchain state as of its parent,
677677
-- as well as the tenure itself so there's no need to include the reward cycle. Just
@@ -792,15 +792,11 @@ static SCHEMA_16: &[&str] = &[
792792
ADD_SIGNER_STATE_MACHINE_UPDATES_BURN_BLOCK_CONSENSUS_HASH_INDEX,
793793
ADD_SIGNER_STATE_MACHINE_UPDATES_RECEIVED_TIME_INDEX,
794794
ADD_SIGNER_STATE_MACHINE_UPDATES_SIGNER_ADDR_REWARD_CYCLE_INDEX,
795-
"INSERT INTO db_config (version) VALUES (16);",
796-
];
797-
798-
static SCHEMA_17: &[&str] = &[
799795
DROP_BLOCK_SIGNATURES_TABLE,
800-
CREATE_BLOCK_SIGNATURES_TABLE_V17,
796+
CREATE_BLOCK_SIGNATURES_TABLE_V16,
801797
DROP_BLOCK_REJECTION_SIGNER_ADDRS,
802-
CREATE_BLOCK_REJECTION_SIGNER_ADDRS_V17,
803-
"INSERT INTO db_config (version) VALUES (17);",
798+
CREATE_BLOCK_REJECTION_SIGNER_ADDRS_V16,
799+
"INSERT INTO db_config (version) VALUES (16);",
804800
];
805801

806802
struct Migration {
@@ -873,15 +869,11 @@ static MIGRATIONS: &[Migration] = &[
873869
version: 16,
874870
statements: SCHEMA_16,
875871
},
876-
Migration {
877-
version: 17,
878-
statements: SCHEMA_17,
879-
},
880872
];
881873

882874
impl SignerDb {
883875
/// The current schema version used in this build of the signer binary.
884-
pub const SCHEMA_VERSION: u32 = 17;
876+
pub const SCHEMA_VERSION: u32 = 16;
885877

886878
/// Create a new `SignerState` instance.
887879
/// This will create a new SQLite database at the given path

0 commit comments

Comments
 (0)