Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #394 from horizontalsystems/add_migration
Browse files Browse the repository at this point in the history
Add migration for change wrong checkpoint block timestamp
  • Loading branch information
ealymbaev committed Jun 17, 2019
2 parents 7cedb29 + a772acf commit e4c4d22
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions BitcoinCore/BitcoinCore/Storage/GrdbStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ open class GrdbStorage {
try db.execute(sql: "UPDATE \(Block.databaseTableName) SET \(Block.Columns.hasTransactions.name) = true")
}

migrator.registerMigration("setCorrectTimestampForCheckpointBlock578592") { db in
try db.execute(sql: "UPDATE \(Block.databaseTableName) SET \(Block.Columns.timestamp.name) = 1559256184 WHERE \(Block.Columns.height.name) == 578592 AND \(Block.Columns.timestamp.name) == 1559277784")
}

return migrator
}

Expand Down

0 comments on commit e4c4d22

Please sign in to comment.