add ancestry check

This commit is contained in:
CJ Cobb
2021-03-24 14:46:48 -04:00
parent c74f9654af
commit 14fd6d24ad
5 changed files with 23 additions and 13 deletions

View File

@@ -757,8 +757,9 @@ CassandraBackend::open()
continue;
query = {};
query << " update " << tablePrefix << "ledger_range"
<< " set sequence = ? where is_latest = ?";
query
<< " update " << tablePrefix << "ledger_range"
<< " set sequence = ? where is_latest = ? if sequence in (?,null)";
if (!updateLedgerRange_.prepareStatement(query, session_.get()))
continue;