diff --git a/ledger/acctonline.go b/ledger/acctonline.go index bd1cbedc86..f14c61ed29 100644 --- a/ledger/acctonline.go +++ b/ledger/acctonline.go @@ -360,8 +360,6 @@ func (ao *onlineAccounts) prepareCommit(dcc *deferredCommitContext) error { // Index that corresponds to the oldest round still in deltas startIndex := len(ao.onlineRoundParamsData) - len(ao.deltas) - 1 if ao.onlineRoundParamsData[startIndex+1].CurrentProtocol != ao.onlineRoundParamsData[startIndex+int(offset)].CurrentProtocol { - ao.accountsMu.RUnlock() - // in scheduleCommit, we expect that this function to update the catchpointWriting when // it's on a catchpoint round and the node is configured to generate catchpoints. Doing this in a deferred function // here would prevent us from "forgetting" to update this variable later on.