Skip to content

Commit

Permalink
Merge pull request #87 from SiaFoundation/revert-expiration
Browse files Browse the repository at this point in the history
chain: Revert confusion in revision expiration reversion
  • Loading branch information
n8maninger authored Aug 14, 2024
2 parents 40722f8 + fee4ef5 commit 6bd5795
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chain/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,8 @@ func (db *DBStore) revertElements(cru consensus.RevertUpdate) {
// contract no longer revised; restore prior revision
db.putFileContractElement(fce)
if rev.FileContract.WindowEnd != fce.FileContract.WindowEnd {
db.deleteFileContractExpiration(types.FileContractID(fce.ID), fce.FileContract.WindowEnd)
db.putFileContractExpiration(types.FileContractID(fce.ID), rev.FileContract.WindowEnd)
db.deleteFileContractExpiration(types.FileContractID(fce.ID), rev.FileContract.WindowEnd)
db.putFileContractExpiration(types.FileContractID(fce.ID), fce.FileContract.WindowEnd)
}
} else {
// contract no longer exists; delete it
Expand Down

0 comments on commit 6bd5795

Please sign in to comment.