xaya / libxayagame

MIT License
21 stars 19 forks source link

Process ZMQ notifications about pending moves #43

Open domob1812 opened 5 years ago

domob1812 commented 5 years ago

With https://github.com/xaya/xaya/pull/91 (also backported to 1.2), Xaya Core now supports publishing ZMQ notifications about pending moves. We should check whether that is enabled in getzmqnotifications and if it is, support processing them and forwarding to game-specific callbacks.

domob1812 commented 4 years ago

We will add a new interface PendingMoveProcessor, which has two methods Clear and AddPendingMove. The first one will be called whenever a new block comes in, and then moves that are still pending as well as pending moves that come in over time will be added with the second method.

Concrete GSP implementations can then (if they want to) pass an instance of PendingMoveProcessor to Game, and have it process moves based on their needs.

domob1812 commented 4 years ago

The unit tests for processing of pending moves in ChainToChannelFeeder seem to run into this issue: https://github.com/cinemast/libjson-rpc-cpp/issues/277

domob1812 commented 4 years ago

With #84 done, all that remains is actually using the pending moves exposed by a GSP in a channel daemon. This is work in progress, but currently blocked on the issue mentioned in the previous comment. It is not very important, though.