lnd/lnrpc/devrpc
Elle Mouton 3fe40c6540
graph/db: add v2 fields to ChannelEdgePolicy model
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.
2026-02-13 07:21:24 +02:00
..
config_active.go refactor: move graph related DB code to graph/db from channeldb 2024-11-28 13:36:13 +02:00
config_default.go lnrpc: add the devrpc development only subserver + devrpc.ImportGraph 2022-01-24 17:42:59 +01:00
dev.pb.go lnrpc add new RPC 'Quiesce' to protobuf definitions 2024-11-26 13:51:57 -07:00
dev.pb.gw.go build: add temporary kvdb mod replace 2025-04-01 12:40:32 +02:00
dev.pb.json.go lnrpc add new RPC 'Quiesce' to protobuf definitions 2024-11-26 13:51:57 -07:00
dev.proto lnrpc add new RPC 'Quiesce' to protobuf definitions 2024-11-26 13:51:57 -07:00
dev.swagger.json lnrpc: update description for RoutingPolicy.CustomRecords 2025-07-01 19:59:51 +08:00
dev.yaml lnrpc add new RPC 'Quiesce' to protobuf definitions 2024-11-26 13:51:57 -07:00
dev_grpc.pb.go lnrpc add new RPC 'Quiesce' to protobuf definitions 2024-11-26 13:51:57 -07:00
dev_server.go graph/db: add v2 fields to ChannelEdgePolicy model 2026-02-13 07:21:24 +02:00
driver.go lnrpc: add the devrpc development only subserver + devrpc.ImportGraph 2022-01-24 17:42:59 +01:00
log.go multi: start updating various loggers to use the new v2 type 2024-10-22 17:03:55 +02:00