Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notification-ticket #3314

Merged
merged 2 commits into from Mar 22, 2021
Merged

notification-ticket #3314

merged 2 commits into from Mar 22, 2021

Conversation

gabizou
Copy link
Member

@gabizou gabizou commented Mar 7, 2021

API | Sponge

Implements the new NotifyNeighborBlockEvent

return Optional.of((context, frame) -> {
frame.pushCause(this.locatableBlock.get());
});
return Optional.of((context, frame) -> frame.pushCause(this.ticketSupplier.get()));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where I'm debating whether there should be more to the frame mutator, but as it stands, it's suiting nicely
idea64_MHQmocvSwW.png

Copy link
Member Author

@gabizou gabizou Mar 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like, something I could imagine being useful is:

        return Optional.of((context, frame) -> {
            if (parent instanceof ChangeBlock) {
                frame.pushCause(((ChangeBlock) parent).original);
            }
            frame.pushCause(this.ticketSupplier.get());
        });

to populate the original changeblock being changed (may look at potentially providing the parent transaction as a BlockTransaction accessor if available)

@gabizou gabizou requested review from Faithcaio and Zidane March 8, 2021 06:32
@ImMorpheus ImMorpheus added status: needs review a code review is needed status: needs testing does this run, does it solve the issue etc version: 1.16 (u) API: 8 labels Mar 10, 2021
@gabizou gabizou force-pushed the notification-ticket branch 2 times, most recently from 923fb24 to 46163ab Compare March 21, 2021 18:57
gabizou and others added 2 commits March 22, 2021 23:06
This revamps the previously meticulous brain-ache
NotifyNeighborBlockEvent into a more
streamlined event similar to ChangeBlock event. As
the batching system has proven useful, this can
safely expose directional suppliers
without explicitly relying on legacy logic of
"Always notify every neighbor on a target position"

Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
@ImMorpheus ImMorpheus merged commit bd4978f into api-8 Mar 22, 2021
@dualspiral dualspiral deleted the notification-ticket branch July 18, 2021 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs review a code review is needed status: needs testing does this run, does it solve the issue etc version: 1.16 (u) API: 8
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants