chore: properly consumme lastKnownHLC on list operations call

This commit is contained in:
Yohan Boniface 2024-12-19 13:25:45 +01:00
parent 471abe1f1b
commit 6caf4c3ed1

View file

@ -183,9 +183,13 @@ export class SyncEngine {
* @param {string} payload.sender the uuid of the requesting peer * @param {string} payload.sender the uuid of the requesting peer
* @param {string} payload.latestKnownHLC the latest known HLC of the requesting peer * @param {string} payload.latestKnownHLC the latest known HLC of the requesting peer
*/ */
onListOperationsRequest({ sender, lastKnownHLC }) { onListOperationsRequest({ sender, message }) {
debug(
`received operations request from peer ${sender} (since ${message.lastKnownHLC})`
)
this.sendToPeer(sender, 'ListOperationsResponse', { this.sendToPeer(sender, 'ListOperationsResponse', {
operations: this._operations.getOperationsSince(lastKnownHLC), operations: this._operations.getOperationsSince(message.lastKnownHLC),
}) })
} }