File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1231,7 +1231,7 @@ export class PgDataStore
1231
1231
SET microblock_canonical = false, canonical = $1
1232
1232
WHERE parent_index_block_hash = $2
1233
1233
AND microblock_hash = ANY($3)
1234
- AND index_block_hash = $4
1234
+ AND ( index_block_hash = $4 OR index_block_hash = '\\x'::bytea)
1235
1235
RETURNING tx_id, microblock_hash, block_hash
1236
1236
` ,
1237
1237
[
@@ -1252,6 +1252,7 @@ export class PgDataStore
1252
1252
isCanonical ,
1253
1253
hexToBuffer ( parentIndexBlockHash ) ,
1254
1254
orphanedMicroblocks . map ( mb => hexToBuffer ( mb ) ) ,
1255
+ hexToBuffer ( indexBlockHash ) ,
1255
1256
orphanedMicroblockTxs . map ( txId => hexToBuffer ( txId ) ) ,
1256
1257
] ;
1257
1258
for ( const associatedTableName of TX_METADATA_TABLES ) {
@@ -1261,7 +1262,8 @@ export class PgDataStore
1261
1262
SET microblock_canonical = false, canonical = $1
1262
1263
WHERE parent_index_block_hash = $2
1263
1264
AND microblock_hash = ANY($3)
1264
- AND tx_id = ANY($4)
1265
+ AND (index_block_hash = $4 OR index_block_hash = '\\x'::bytea)
1266
+ AND tx_id = ANY($5)
1265
1267
` ,
1266
1268
orphanedAssociatedTableParams
1267
1269
) ;
You can’t perform that action at this time.
0 commit comments