mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-10 17:44:22 +01:00
lightningd: don't discard const in get_chainparams().
In general, it is true that accessors should take const and discard it, but chainparams is *always* const. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
30b290cb8f
commit
5d5c1a5da5
@@ -217,10 +217,9 @@ static void shutdown_subdaemons(struct lightningd *ld)
|
||||
db_commit_transaction(ld->wallet->db);
|
||||
}
|
||||
|
||||
struct chainparams *get_chainparams(const struct lightningd *ld)
|
||||
const struct chainparams *get_chainparams(const struct lightningd *ld)
|
||||
{
|
||||
return cast_const(struct chainparams *,
|
||||
ld->topology->bitcoind->chainparams);
|
||||
return ld->topology->bitcoind->chainparams;
|
||||
}
|
||||
|
||||
static void init_txfilter(struct wallet *w, struct txfilter *filter)
|
||||
|
||||
@@ -169,7 +169,7 @@ struct lightningd {
|
||||
#endif /* DEVELOPER */
|
||||
};
|
||||
|
||||
struct chainparams *get_chainparams(const struct lightningd *ld);
|
||||
const struct chainparams *get_chainparams(const struct lightningd *ld);
|
||||
|
||||
/* State for performing backtraces. */
|
||||
struct backtrace_state *backtrace_state;
|
||||
|
||||
Reference in New Issue
Block a user