pygossmap: read .disabled from channel_flags

This commit is contained in:
Michael Schmoock
2023-03-01 21:30:31 +01:00
committed by Rusty Russell
parent 6a16a31a98
commit 3130f4ec27

View File

@@ -53,6 +53,7 @@ class GossmapHalfchannel(object):
self.htlc_maximum_msat: Optional[int] = fields.get('htlc_maximum_msat', None)
self.fee_base_msat: int = fields['fee_base_msat']
self.fee_proportional_millionths: int = fields['fee_proportional_millionths']
self.disabled = fields['channel_flags'] & 2 > 0
# Cache the _scidd and hash to have faster operation later
# Unfortunately the @final decorator only comes for python3.8