Class Scorer


  • public class Scorer
    extends Object
    [`routing::Score`] implementation that provides reasonable default behavior. Used to apply a fixed penalty to each channel, thus avoiding long paths when shorter paths with slightly higher fees are available. Will further penalize channels that fail to relay payments. See [module-level documentation] for usage. [module-level documentation]: crate::routing::scorer
    • Method Detail

      • of

        public static Scorer of​(long params_base_penalty_msat_arg,
                                long params_failure_penalty_msat_arg,
                                long params_failure_penalty_half_life_arg)
        Creates a new scorer using the given scoring parameters.
      • with_default

        public static Scorer with_default()
        Creates a "default" Scorer. See struct and individual field documentaiton for details on which values are used.
      • as_Score

        public Score as_Score()
        Constructs a new Score which calls the relevant methods on this_arg. This copies the `inner` pointer in this_arg and thus the returned Score must be freed before this_arg is
      • write

        public byte[] write()
        Serialize the Scorer object into a byte array which can be read by Scorer_read
      • read

        public static Result_ScorerDecodeErrorZ read​(byte[] ser)
        Read a Scorer from a byte array, created by Scorer_write