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 )
@@ -920,12 +920,12 @@ static struct command_result *pendingsendpays_done(struct command *cmd,
920920 size_t i ;
921921 const char * err ;
922922 const jsmntok_t * t , * arr ;
923- u32 max_group_id = 0 ;
923+ u64 max_group_id = 0 ;
924924
925925 /* Data for pending payments, this will be the one
926926 * who's result gets replayed if we end up suspending. */
927- u32 pending_group_id = INVALID_ID ;
928- u32 max_pending_partid = 0 ;
927+ u64 pending_group_id = INVALID_ID ;
928+ u64 max_pending_partid = 0 ;
929929 struct amount_msat pending_sent = AMOUNT_MSAT (0 ),
930930 pending_msat = AMOUNT_MSAT (0 );
931931
@@ -957,14 +957,14 @@ static struct command_result *pendingsendpays_done(struct command *cmd,
957957 // find if there is one pending group
958958 json_for_each_arr (i , t , arr )
959959 {
960- u32 groupid ;
960+ u64 groupid ;
961961 const char * status ;
962962
963963 err = json_scan (tmpctx , buf , t ,
964964 "{status:%"
965965 ",groupid:%}" ,
966966 JSON_SCAN_TAL (tmpctx , json_strdup , & status ),
967- JSON_SCAN (json_to_u32 , & groupid ));
967+ JSON_SCAN (json_to_u64 , & groupid ));
968968
969969 if (err )
970970 plugin_err (pay_plugin -> plugin ,
@@ -982,7 +982,7 @@ static struct command_result *pendingsendpays_done(struct command *cmd,
982982 * pending sendpays. */
983983 json_for_each_arr (i , t , arr )
984984 {
985- u32 partid = 0 , groupid ;
985+ u64 partid = 0 , groupid ;
986986 struct amount_msat this_msat , this_sent ;
987987 const char * status ;
988988
@@ -996,8 +996,8 @@ static struct command_result *pendingsendpays_done(struct command *cmd,
996996 ",amount_msat:%"
997997 ",amount_sent_msat:%}" ,
998998 JSON_SCAN_TAL (tmpctx , json_strdup , & status ),
999- JSON_SCAN (json_to_u32 , & partid ),
1000- JSON_SCAN (json_to_u32 , & groupid ),
999+ JSON_SCAN (json_to_u64 , & partid ),
1000+ JSON_SCAN (json_to_u64 , & groupid ),
10011001 JSON_SCAN (json_to_msat , & this_msat ),
10021002 JSON_SCAN (json_to_msat , & this_sent ));
10031003
@@ -1045,9 +1045,9 @@ static struct command_result *pendingsendpays_done(struct command *cmd,
10451045
10461046 plugin_log (pay_plugin -> plugin , LOG_DBG ,
10471047 "There are pending sendpays to this invoice. "
1048- "groupid = %" PRIu32 " "
1048+ "groupid = %" PRIu64 " "
10491049 "delivering = %s, "
1050- "last_partid = %" PRIu32 ,
1050+ "last_partid = %" PRIu64 ,
10511051 pending_group_id ,
10521052 fmt_amount_msat (tmpctx , payment -> total_delivering ),
10531053 max_pending_partid );
0 commit comments