Try to fix offsets

This commit is contained in:
Neil Alexander 2021-04-19 14:27:38 +01:00
parent e665490e58
commit 3bae18d9cc
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -84,6 +84,10 @@ func UpStateBlocksRefactor(tx *sql.Tx) error {
var snapshotrows *sql.Rows
for batchoffset := 0; batchoffset < snapshotcount; batchoffset += batchsize {
if batchoffset > snapshotcount {
batchoffset -= batchoffset - snapshotcount
}
snapshotrows, err = tx.Query(`
SELECT
state_snapshot_nid,