Pass staged page cursor metadata in the adapter contract order

This commit is contained in:
evgeny committed 2026-11-04 00:54:02 +01:00
1 parent 63751b3715
commit 20ba312340
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -45,7 +45,7 @@ static int admitted(struct UTUN_INSTANCE* inst, unsigned person) {
static void page(struct UTUN_INSTANCE* src, struct UTUN_INSTANCE* dst, void* pull, uint64_t prefix) {
uint8_t data[8192]; size_t size = sizeof(data); int more; merkle_key_t after = {{0}}, next;
assert(!_member_get_page(src, "1001", prefix, 0, &after, data, &size, &next, &more) && !more);
assert(!member_stage_page(dst, pull, prefix, 0, &after, data, size, &next, more));
assert(!member_stage_page(dst, pull, prefix, 0, &after, &next, more, data, size));
}
static void complete(struct UTUN_INSTANCE* inst, void* pull) {
+1 -1
View File
@@ -12,7 +12,7 @@ static int receive_page(struct UTUN_INSTANCE* inst, uint64_t peer, uint64_t pref
void* pull; merkle_key_t after = {{0}};
int rc = member_begin_pull(inst, "1001", peer, 1, &pull);
if (rc < 0) return rc;
rc = member_stage_page(inst, pull, prefix, 0, &after, data, len, next, 0);
rc = member_stage_page(inst, pull, prefix, 0, &after, next, 0, data, len);
if (!rc && commit) rc = member_commit_pull(inst, pull);
if (!rc && commit) member_publish_pull(inst, pull);
member_abort_pull(inst, pull); return rc;