Class LockableScore


  • public class LockableScore
    extends Object
    A scorer that is accessed under a lock. Needed so that calls to [`Score::channel_penalty_msat`] in [`find_route`] can be made while having shared ownership of a scorer but without requiring internal locking in [`Score`] implementations. Internal locking would be detrimental to route finding performance and could result in [`Score::channel_penalty_msat`] returning a different value for the same channel. [`find_route`]: crate::routing::router::find_route
    • Method Detail

      • of

        public static LockableScore of​(Score score)
        Constructs a new LockableScore from a Score
      • write

        public byte[] write()
        Serialize the LockableScore object into a byte array which can be read by LockableScore_read