mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-17 13:06:14 +02:00
Extend ChannelEdgePolicy to support v2 channel updates by adding: - Version field to track gossip protocol version (v1 or v2). - LastBlockHeight for v2's block-height-based timestamps. - SecondPeer flag to indicate which peer announced the policy in v2. - DisableFlags for v2-specific channel disable signaling. - ExtraSignedFields map for v2 extra signed TLV data. Add version-aware methods: - IsNode1() determines if the policy was announced by node_1, handling both v1 (via ChannelFlags direction bit) and v2 (via SecondPeer). - IsDisabled() checks disable status using ChannelFlags for v1 and DisableFlags for v2. - String() provides version-appropriate string representations. The new fields use zero values for v1 compatibility (Version defaults to GossipVersion1, LastBlockHeight to 0, SecondPeer to false). This lays the groundwork for v2 policy support; a subsequent commit will handle reading and writing these fields from/to the database. |
||
|---|---|---|
| .. | ||
| agent.go | ||
| agent_constraints.go | ||
| agent_constraints_test.go | ||
| agent_test.go | ||
| betweenness_centrality.go | ||
| betweenness_centrality_test.go | ||
| centrality_testdata_test.go | ||
| choice.go | ||
| choice_test.go | ||
| combinedattach.go | ||
| externalscoreattach.go | ||
| externalscoreattach_test.go | ||
| graph.go | ||
| graph_test.go | ||
| interface.go | ||
| log.go | ||
| manager.go | ||
| prefattach.go | ||
| prefattach_test.go | ||
| setup_test.go | ||
| simple_graph.go | ||
| simple_graph_test.go | ||
| top_centrality.go | ||
| top_centrality_test.go | ||