Rusty Russell
b6d347a6d3
db: add optional column string helper, and make db_col amounts return sat/msat.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-26 06:55:48 +09:30
Rusty Russell
0bcff1e76d
db/bindings: now bindings are always in order, remove index.
...
Simply always bind the next one. No arithmetic required now!
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-18 14:24:01 +09:30
Rusty Russell
a1c20bfc87
db: implement BIND_NEXT for autocounting.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-18 14:24:01 +09:30
Rusty Russell
7acaccfb36
wallet: add channel_type field to db.
...
This was always the intent, but now we have to reconstruct from the
disparate fields.
This means `option_anchor_outputs` is now redundant.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-04-10 17:26:47 +09:30
Rusty Russell
aae77802ef
db_col_optional: wrapper for case where a field is allowed to be NULL.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-03-25 15:28:02 +10:30
Rusty Russell
d9e274cee2
db_bind_scid: rename to db_bind_short_channel_id
...
We used to have a text version, so this was named 'scid'. Fix it now.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-03-25 15:28:02 +10:30
Rusty Russell
d7c1325e38
wallet: use scid not string for failchannel (now failscid) in payments table.
...
And remove the now-unused string-based helper functions.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-09-22 15:19:46 +02:00
Rusty Russell
33a6b18891
db/bindings: rename db_bind_short_channel_id to db_bind_short_channel_id_str, add db_bind_scid.
...
Although it's deprecated already (because it stores as string), it's
better to make the name explicit. And create a new helper which stores as BIGINT.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-09-22 15:19:46 +02:00
niftynei
ce12d2b8a9
database: pull out database code into a new module
...
We're going to reuse the database controllers for the accounting plugin
2022-03-05 15:03:34 +10:30