Skip to content

Commit 23cc19f

Browse files
historian: skip private gossip_store fields
enum gossip_store_wire { /* This always follows the channel_announce / private_announce */ WIRE_GOSSIP_STORE_CHANNEL_AMOUNT = 4101, /* Mimics a channel_announce */ WIRE_GOSSIP_STORE_PRIVATE_CHANNEL_OBS = 4104, WIRE_GOSSIP_STORE_PRIVATE_UPDATE_OBS = 4102, WIRE_GOSSIP_STORE_DELETE_CHAN = 4103, WIRE_GOSSIP_STORE_ENDED = 4105, WIRE_GOSSIP_STORE_CHAN_DYING = 4106, };
1 parent f6e02a6 commit 23cc19f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

archived/historian/historian.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,14 @@ def resume(self):
8787
f.seek(self.pos)
8888
continue
8989

90+
if typ in [4102, 4103, 4104, 4105, 4106]:
91+
f.seek(self.pos)
92+
continue
93+
9094
if length > MAX_MSG_SIZE:
91-
logging.warn(
92-
f"Unreasonably large message type {typ} at position {self.pos} ({length} bytes), skipping"
93-
)
95+
plugin.log(
96+
f"Unreasonably large message type {typ} at position {self.pos} ({length} bytes), skipping",
97+
level="warn")
9498
continue
9599

96100
ev_count += 1

0 commit comments

Comments
 (0)