File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -857,10 +857,10 @@ s64 wallet_get_newindex(struct lightningd *ld, enum addrtype addrtype)
857
857
return newidx ;
858
858
}
859
859
860
- enum addrtype wallet_get_addrtype (struct wallet * wallet , u64 idx )
860
+ bool wallet_get_addrtype (struct wallet * wallet , u64 idx ,
861
+ enum addrtype * addrtype )
861
862
{
862
863
struct db_stmt * stmt ;
863
- enum addrtype type ;
864
864
865
865
stmt = db_prepare_v2 (wallet -> db ,
866
866
SQL ("SELECT addrtype"
@@ -872,12 +872,12 @@ enum addrtype wallet_get_addrtype(struct wallet *wallet, u64 idx)
872
872
/* Unknown means prior to v24.11 */
873
873
if (!db_step (stmt )) {
874
874
tal_free (stmt );
875
- return ADDR_P2TR | ADDR_BECH32 ;
875
+ return false ;
876
876
}
877
877
878
- type = wallet_addrtype_in_db (db_col_int (stmt , "addrtype" ));
878
+ * addrtype = wallet_addrtype_in_db (db_col_int (stmt , "addrtype" ));
879
879
tal_free (stmt );
880
- return type ;
880
+ return true ;
881
881
}
882
882
883
883
static void wallet_shachain_init (struct wallet * wallet ,
Original file line number Diff line number Diff line change @@ -606,8 +606,12 @@ s64 wallet_get_newindex(struct lightningd *ld, enum addrtype addrtype);
606
606
* wallet_get_addrtype - get the address types for this key.
607
607
* @wallet: (in) wallet
608
608
* @keyidx: what address types we've published.
609
+ * @addrtype: filled in if true.
610
+ *
611
+ * If we don't know, returns false.
609
612
*/
610
- enum addrtype wallet_get_addrtype (struct wallet * w , u64 keyidx );
613
+ bool wallet_get_addrtype (struct wallet * wallet , u64 idx ,
614
+ enum addrtype * addrtype );
611
615
612
616
/**
613
617
* wallet_shachain_add_hash -- wallet wrapper around shachain_add_hash
You can’t perform that action at this time.
0 commit comments