Skip to content
Snippets Groups Projects
  1. Aug 18, 2021
    • Callum Brown's avatar
    • Richard van der Hoff's avatar
      Refactor `on_receive_pdu` code (#10615) · 964f29cb
      Richard van der Hoff authored
      * drop room pdu linearizer sooner
      
      No point holding onto it while we recheck the db
      
      * move out `missing_prevs` calculation
      
      we're going to need `missing_prevs` whatever we do, so we may as well calculate
      it eagerly and just update it if it gets outdated.
      
      * Add another `if missing_prevs` condition
      
      this should be a no-op, since all the code inside the block already checks `if
      missing_prevs`
      
      * reorder if conditions
      
      This shouldn't change the logic at all.
      
      * Push down `min_depth` read
      
      No point reading it from the database unless we're going to use it.
      
      * Collect the sent_to_us_directly code together
      
      Move the remaining `sent_to_us_directly` code inside the `if
      sent_to_us_directly` block.
      
      * Properly separate the `not sent_to_us_directly` branch
      
      Since the only way this second block is now reachable is if we
      *didn't* go into the `sent_to_us_directly` branch, we can replace it with a
      simple `else`.
      
      * changelog
      964f29cb
    • Patrick Cloke's avatar
  2. Aug 17, 2021
  3. Aug 16, 2021
  4. Aug 13, 2021
  5. Aug 12, 2021
  6. Aug 11, 2021
  7. Aug 10, 2021
Loading