1515#include <unistd.h>
1616#include <wire/bolt12_wiregen.h>
1717
18- #define INVALID_ID UINT32_MAX
18+ #define INVALID_ID UINT64_MAX
1919
2020#define OP_NULL NULL
2121#define OP_CALL (void *)1
@@ -107,7 +107,7 @@ static void add_hintchan(struct payment *payment, const struct node_id *src,
107107 */
108108
109109struct success_data {
110- u32 parts , created_at , groupid ;
110+ u64 parts , created_at , groupid ;
111111 struct amount_msat deliver_msat , sent_msat ;
112112 struct preimage preimage ;
113113};
@@ -130,7 +130,7 @@ static bool success_data_from_listsendpays(const char *buf,
130130
131131 json_for_each_arr (i , t , arr )
132132 {
133- u32 groupid ;
133+ u64 groupid ;
134134 struct amount_msat this_msat , this_sent ;
135135
136136 const jsmntok_t * status_tok = json_get_member (buf , t , "status" );
@@ -158,10 +158,10 @@ static bool success_data_from_listsendpays(const char *buf,
158158 ",amount_sent_msat:%"
159159 ",created_at:%"
160160 ",payment_preimage:%}" ,
161- JSON_SCAN (json_to_u32 , & groupid ),
161+ JSON_SCAN (json_to_u64 , & groupid ),
162162 JSON_SCAN (json_to_msat , & this_msat ),
163163 JSON_SCAN (json_to_msat , & this_sent ),
164- JSON_SCAN (json_to_u32 , & success -> created_at ),
164+ JSON_SCAN (json_to_u64 , & success -> created_at ),
165165 JSON_SCAN (json_to_preimage , & success -> preimage ));
166166
167167 if (err )
@@ -941,12 +941,12 @@ static struct command_result *pendingsendpays_done(struct command *cmd,
941941 size_t i ;
942942 const char * err ;
943943 const jsmntok_t * t , * arr ;
944- u32 max_group_id = 0 ;
944+ u64 max_group_id = 0 ;
945945
946946 /* Data for pending payments, this will be the one
947947 * who's result gets replayed if we end up suspending. */
948- u32 pending_group_id = INVALID_ID ;
949- u32 max_pending_partid = 0 ;
948+ u64 pending_group_id = INVALID_ID ;
949+ u64 max_pending_partid = 0 ;
950950 struct amount_msat pending_sent = AMOUNT_MSAT (0 ),
951951 pending_msat = AMOUNT_MSAT (0 );
952952
@@ -978,14 +978,14 @@ static struct command_result *pendingsendpays_done(struct command *cmd,
978978 // find if there is one pending group
979979 json_for_each_arr (i , t , arr )
980980 {
981- u32 groupid ;
981+ u64 groupid ;
982982 const char * status ;
983983
984984 err = json_scan (tmpctx , buf , t ,
985985 "{status:%"
986986 ",groupid:%}" ,
987987 JSON_SCAN_TAL (tmpctx , json_strdup , & status ),
988- JSON_SCAN (json_to_u32 , & groupid ));
988+ JSON_SCAN (json_to_u64 , & groupid ));
989989
990990 if (err )
991991 plugin_err (pay_plugin -> plugin ,
@@ -1003,7 +1003,7 @@ static struct command_result *pendingsendpays_done(struct command *cmd,
10031003 * pending sendpays. */
10041004 json_for_each_arr (i , t , arr )
10051005 {
1006- u32 partid = 0 , groupid ;
1006+ u64 partid = 0 , groupid ;
10071007 struct amount_msat this_msat , this_sent ;
10081008 const char * status ;
10091009
@@ -1017,8 +1017,8 @@ static struct command_result *pendingsendpays_done(struct command *cmd,
10171017 ",amount_msat:%"
10181018 ",amount_sent_msat:%}" ,
10191019 JSON_SCAN_TAL (tmpctx , json_strdup , & status ),
1020- JSON_SCAN (json_to_u32 , & partid ),
1021- JSON_SCAN (json_to_u32 , & groupid ),
1020+ JSON_SCAN (json_to_u64 , & partid ),
1021+ JSON_SCAN (json_to_u64 , & groupid ),
10221022 JSON_SCAN (json_to_msat , & this_msat ),
10231023 JSON_SCAN (json_to_msat , & this_sent ));
10241024
@@ -1066,9 +1066,9 @@ static struct command_result *pendingsendpays_done(struct command *cmd,
10661066
10671067 plugin_log (pay_plugin -> plugin , LOG_DBG ,
10681068 "There are pending sendpays to this invoice. "
1069- "groupid = %" PRIu32 " "
1069+ "groupid = %" PRIu64 " "
10701070 "delivering = %s, "
1071- "last_partid = %" PRIu32 ,
1071+ "last_partid = %" PRIu64 ,
10721072 pending_group_id ,
10731073 fmt_amount_msat (tmpctx , payment -> total_delivering ),
10741074 max_pending_partid );
0 commit comments