mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-10 00:24:19 +01:00
gossipd: make helpers const-correct.
Always be const if you can. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
89fbae4198
commit
f64eee717d
@@ -140,7 +140,8 @@ static inline int pubkey_idx(const struct pubkey *id1, const struct pubkey *id2)
|
||||
}
|
||||
|
||||
/* Fast versions: if you know n is one end of the channel */
|
||||
static inline struct node *other_node(const struct node *n, struct chan *chan)
|
||||
static inline struct node *other_node(const struct node *n,
|
||||
const struct chan *chan)
|
||||
{
|
||||
int idx = (chan->nodes[1] == n);
|
||||
|
||||
@@ -159,7 +160,7 @@ static inline struct half_chan *half_chan_from(const struct node *n,
|
||||
}
|
||||
|
||||
/* If you know n is one end of the channel, get index dst == n */
|
||||
static inline int half_chan_to(const struct node *n, struct chan *chan)
|
||||
static inline int half_chan_to(const struct node *n, const struct chan *chan)
|
||||
{
|
||||
int idx = (chan->nodes[1] == n);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user