]> git.bitcoin.ninja Git - rust-lightning/commit
Split LockableScore responsibilities between read & write operations
authorjbesraa <jbesraa@gmail.com>
Tue, 22 Aug 2023 15:57:06 +0000 (18:57 +0300)
committerjbesraa <jbesraa@gmail.com>
Fri, 25 Aug 2023 01:35:11 +0000 (04:35 +0300)
commit3695b2aa13dcd271c9c4252cda3a0b9b79d3d879
tree4a2ab1064683758c64fa9b5da46e8cf06fcaf2e6
parentbbe20c3327d3af37a7d5f82a021af1945d689547
Split LockableScore responsibilities between read & write operations

    - Split Score from LockableScore to ScoreLookUp to handle read
      operations and ScoreUpdate to handle write operations
    - Change all struct that implemented Score to implement ScoreLookUp
      and/or ScoreUpdate
    - Change Mutex's to RwLocks to allow multiple data readers
    - Change LockableScore to Deref in ScorerAccountingForInFlightHtlcs
      as we only need to read
    - Add ScoreLookUp and ScoreUpdate docs
    - Remove reference(&'a) and Sized from Score in ScorerAccountingForInFlightHtlcs
      as Score implements Deref
    - Split MultiThreadedScoreLock into MultiThreadedScoreLockWrite and MultiThreadedScoreLockRead.
      After splitting LockableScore, we split MultiThreadedScoreLock following
      the same way, splitting a single score into two srtucts, one for read and
      other for write.
      MultiThreadedScoreLock is used in c_bindings.
lightning-background-processor/src/lib.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/outbound_payment.rs
lightning/src/ln/payment_tests.rs
lightning/src/routing/router.rs
lightning/src/routing/scoring.rs
lightning/src/util/test_utils.rs