File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -197,10 +197,6 @@ pub struct FixedPenaltyScorer {
197197 penalty_msat : u64 ,
198198}
199199
200- impl_writeable_tlv_based ! ( FixedPenaltyScorer , {
201- ( 0 , penalty_msat, required) ,
202- } ) ;
203-
204200impl FixedPenaltyScorer {
205201 /// Creates a new scorer using `penalty_msat`.
206202 pub fn with_penalty ( penalty_msat : u64 ) -> Self {
@@ -218,6 +214,22 @@ impl Score for FixedPenaltyScorer {
218214 fn payment_path_successful ( & mut self , _path : & [ & RouteHop ] ) { }
219215}
220216
217+ impl Writeable for FixedPenaltyScorer {
218+ #[ inline]
219+ fn write < W : Writer > ( & self , w : & mut W ) -> Result < ( ) , io:: Error > {
220+ write_tlv_fields ! ( w, { } ) ;
221+ Ok ( ( ) )
222+ }
223+ }
224+
225+ impl ReadableArgs < u64 > for FixedPenaltyScorer {
226+ #[ inline]
227+ fn read < R : Read > ( r : & mut R , penalty_msat : u64 ) -> Result < Self , DecodeError > {
228+ read_tlv_fields ! ( r, { } ) ;
229+ Ok ( Self { penalty_msat } )
230+ }
231+ }
232+
221233/// [`Score`] implementation that provides reasonable default behavior.
222234///
223235/// Used to apply a fixed penalty to each channel, thus avoiding long paths when shorter paths with
You can’t perform that action at this time.
0 commit comments