@@ -1087,28 +1087,24 @@ impl StacksChainState {
1087
1087
while db_config. version != CHAINSTATE_VERSION {
1088
1088
match db_config. version . as_str ( ) {
1089
1089
"1" => {
1090
- // migrate to 2
1091
1090
info ! ( "Migrating chainstate schema from version 1 to 2" ) ;
1092
1091
for cmd in CHAINSTATE_SCHEMA_2 . iter ( ) {
1093
1092
tx. execute_batch ( cmd) ?;
1094
1093
}
1095
1094
}
1096
1095
"2" => {
1097
- // migrate to 3
1098
1096
info ! ( "Migrating chainstate schema from version 2 to 3" ) ;
1099
1097
for cmd in CHAINSTATE_SCHEMA_3 . iter ( ) {
1100
1098
tx. execute_batch ( cmd) ?;
1101
1099
}
1102
1100
}
1103
1101
"3" => {
1104
- // migrate to nakamoto 1
1105
1102
info ! ( "Migrating chainstate schema from version 3 to 4: nakamoto support" ) ;
1106
1103
for cmd in NAKAMOTO_CHAINSTATE_SCHEMA_1 . iter ( ) {
1107
1104
tx. execute_batch ( cmd) ?;
1108
1105
}
1109
1106
}
1110
1107
"4" => {
1111
- // migrate to nakamoto 2
1112
1108
info ! (
1113
1109
"Migrating chainstate schema from version 4 to 5: fix nakamoto tenure typo"
1114
1110
) ;
@@ -1117,14 +1113,12 @@ impl StacksChainState {
1117
1113
}
1118
1114
}
1119
1115
"5" => {
1120
- // migrate to nakamoto 3
1121
1116
info ! ( "Migrating chainstate schema from version 5 to 6: adds height_in_tenure field" ) ;
1122
1117
for cmd in NAKAMOTO_CHAINSTATE_SCHEMA_3 . iter ( ) {
1123
1118
tx. execute_batch ( cmd) ?;
1124
1119
}
1125
1120
}
1126
1121
"6" => {
1127
- // migrate to nakamoto 3
1128
1122
info ! (
1129
1123
"Migrating chainstate schema from version 6 to 7: adds signer_stats table"
1130
1124
) ;
@@ -1133,9 +1127,8 @@ impl StacksChainState {
1133
1127
}
1134
1128
}
1135
1129
"7" => {
1136
- // migrate to nakamoto 3
1137
1130
info ! (
1138
- "Migrating chainstate schema from version 7 to 8: just bump the schema (added indexes) "
1131
+ "Migrating chainstate schema from version 7 to 8: add index for nakamoto block headers "
1139
1132
) ;
1140
1133
for cmd in NAKAMOTO_CHAINSTATE_SCHEMA_5 . iter ( ) {
1141
1134
tx. execute_batch ( cmd) ?;
0 commit comments