1414#include <plugins/renepay/routetracker.h>
1515#include <unistd.h>
1616
17- #define INVALID_ID UINT32_MAX
17+ #define INVALID_ID UINT64_MAX
1818
1919#define OP_NULL NULL
2020#define OP_CALL (void *)1
@@ -99,7 +99,7 @@ static struct command_result *payment_rpc_failure(struct command *cmd,
9999 */
100100
101101struct success_data {
102- u32 parts , created_at , groupid ;
102+ u64 parts , created_at , groupid ;
103103 struct amount_msat deliver_msat , sent_msat ;
104104 struct preimage preimage ;
105105};
@@ -122,7 +122,7 @@ static bool success_data_from_listsendpays(const char *buf,
122122
123123 json_for_each_arr (i , t , arr )
124124 {
125- u32 groupid ;
125+ u64 groupid ;
126126 struct amount_msat this_msat , this_sent ;
127127
128128 const jsmntok_t * status_tok = json_get_member (buf , t , "status" );
@@ -150,10 +150,10 @@ static bool success_data_from_listsendpays(const char *buf,
150150 ",amount_sent_msat:%"
151151 ",created_at:%"
152152 ",payment_preimage:%}" ,
153- JSON_SCAN (json_to_u32 , & groupid ),
153+ JSON_SCAN (json_to_u64 , & groupid ),
154154 JSON_SCAN (json_to_msat , & this_msat ),
155155 JSON_SCAN (json_to_msat , & this_sent ),
156- JSON_SCAN (json_to_u32 , & success -> created_at ),
156+ JSON_SCAN (json_to_u64 , & success -> created_at ),
157157 JSON_SCAN (json_to_preimage , & success -> preimage ));
158158
159159 if (err )
@@ -927,12 +927,12 @@ static struct command_result *pendingsendpays_done(struct command *cmd,
927927 size_t i ;
928928 const char * err ;
929929 const jsmntok_t * t , * arr ;
930- u32 max_group_id = 0 ;
930+ u64 max_group_id = 0 ;
931931
932932 /* Data for pending payments, this will be the one
933933 * who's result gets replayed if we end up suspending. */
934- u32 pending_group_id = INVALID_ID ;
935- u32 max_pending_partid = 0 ;
934+ u64 pending_group_id = INVALID_ID ;
935+ u64 max_pending_partid = 0 ;
936936 struct amount_msat pending_sent = AMOUNT_MSAT (0 ),
937937 pending_msat = AMOUNT_MSAT (0 );
938938
@@ -964,14 +964,14 @@ static struct command_result *pendingsendpays_done(struct command *cmd,
964964 // find if there is one pending group
965965 json_for_each_arr (i , t , arr )
966966 {
967- u32 groupid ;
967+ u64 groupid ;
968968 const char * status ;
969969
970970 err = json_scan (tmpctx , buf , t ,
971971 "{status:%"
972972 ",groupid:%}" ,
973973 JSON_SCAN_TAL (tmpctx , json_strdup , & status ),
974- JSON_SCAN (json_to_u32 , & groupid ));
974+ JSON_SCAN (json_to_u64 , & groupid ));
975975
976976 if (err )
977977 plugin_err (pay_plugin -> plugin ,
@@ -989,7 +989,7 @@ static struct command_result *pendingsendpays_done(struct command *cmd,
989989 * pending sendpays. */
990990 json_for_each_arr (i , t , arr )
991991 {
992- u32 partid = 0 , groupid ;
992+ u64 partid = 0 , groupid ;
993993 struct amount_msat this_msat , this_sent ;
994994 const char * status ;
995995
@@ -1003,8 +1003,8 @@ static struct command_result *pendingsendpays_done(struct command *cmd,
10031003 ",amount_msat:%"
10041004 ",amount_sent_msat:%}" ,
10051005 JSON_SCAN_TAL (tmpctx , json_strdup , & status ),
1006- JSON_SCAN (json_to_u32 , & partid ),
1007- JSON_SCAN (json_to_u32 , & groupid ),
1006+ JSON_SCAN (json_to_u64 , & partid ),
1007+ JSON_SCAN (json_to_u64 , & groupid ),
10081008 JSON_SCAN (json_to_msat , & this_msat ),
10091009 JSON_SCAN (json_to_msat , & this_sent ));
10101010
@@ -1052,9 +1052,9 @@ static struct command_result *pendingsendpays_done(struct command *cmd,
10521052
10531053 plugin_log (pay_plugin -> plugin , LOG_DBG ,
10541054 "There are pending sendpays to this invoice. "
1055- "groupid = %" PRIu32 " "
1055+ "groupid = %" PRIu64 " "
10561056 "delivering = %s, "
1057- "last_partid = %" PRIu32 ,
1057+ "last_partid = %" PRIu64 ,
10581058 pending_group_id ,
10591059 fmt_amount_msat (tmpctx , payment -> total_delivering ),
10601060 max_pending_partid );
0 commit comments