- public NodeAnnouncement[] get_next_node_announcements(byte[] starting_point, byte batch_amount) {
- long[] ret = bindings.RoutingMessageHandler_get_next_node_announcements(this.ptr, starting_point, batch_amount);
- NodeAnnouncement[] arr_conv_18_arr = new NodeAnnouncement[ret.length];
- for (int s = 0; s < ret.length; s++) {
- long arr_conv_18 = ret[s];
- NodeAnnouncement arr_conv_18_hu_conv = new NodeAnnouncement(null, arr_conv_18);
- arr_conv_18_hu_conv.ptrs_to.add(this);
- arr_conv_18_arr[s] = arr_conv_18_hu_conv;
+ /**
+ * Gets a subset of the node announcements required to dump our routing table to a remote node,
+ * starting at the node *after* the provided publickey and including batch_amount entries
+ * immediately higher (as defined by <PublicKey as Ord>::cmp) than starting_point.
+ * If None is provided for starting_point, we start at the first node.
+ *
+ * Note that starting_point (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public NodeAnnouncement[] get_next_node_announcements(@Nullable byte[] starting_point, byte batch_amount) {
+ long[] ret = bindings.RoutingMessageHandler_get_next_node_announcements(this.ptr, InternalUtils.check_arr_len(starting_point, 33), batch_amount);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(starting_point);
+ Reference.reachabilityFence(batch_amount);
+ int ret_conv_18_len = ret.length;
+ NodeAnnouncement[] ret_conv_18_arr = new NodeAnnouncement[ret_conv_18_len];
+ for (int s = 0; s < ret_conv_18_len; s++) {
+ long ret_conv_18 = ret[s];
+ NodeAnnouncement ret_conv_18_hu_conv = null; if (ret_conv_18 < 0 || ret_conv_18 > 4096) { ret_conv_18_hu_conv = new NodeAnnouncement(null, ret_conv_18); }
+ ret_conv_18_hu_conv.ptrs_to.add(this);
+ ret_conv_18_arr[s] = ret_conv_18_hu_conv;