state: only revert child if it was previously accepted
@@ -308,10 +308,12 @@ func (ledger *Ledger) revertTransaction(symbol string) {
if _, seen := visited[child]; !seen {
visited[child] = struct{}{}
+ if ledger.WasAccepted(child) {
queue.PushBack(child)
}
}
}
+ }
sort.Slice(pendingList, func(i, j int) bool {
if pendingList[i].depth < pendingList[j].depth {
