Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

swap: expand RPC calls for cheque info querying #1863

Merged
merged 95 commits into from
Oct 30, 2019
Merged

Conversation

mortelli
Copy link
Contributor

@mortelli mortelli commented Oct 4, 2019

This PR builds on the work done in #1842 with the aim of implementing (at least some of) issue #1445.

Its main purpose is to improve RPC calls to query cheque information.

Changes:

  • adds the Cheques function, which returns all known cheques. This includes both last sent as well as last received, and for peers in memory and on disk.
  • adds the PeerCheques function, which returns the last known sent and received cheques for a specific peer.
  • these new functions differ from the previous RPC calls because those were limited by cheque type. Said calls are therefore removed (as are their tests) since their original functionality is now superseded.
  • improved coverage of existing tests.
  • improved comments.
  • piggybacks renaming storeKeysTestCases struct to storeKeysTestCase

swap/swap_test.go Outdated Show resolved Hide resolved
@mortelli
Copy link
Contributor Author

Both tests have been re-written in table-driven form.

The PR description has been updated and reviews have been re-requested.

@mortelli mortelli requested a review from acud October 25, 2019 18:39
@mortelli
Copy link
Contributor Author

added new PeerCheques struct for increased readability/maintainability.

both Cheques and PeerCheques functions make use of this struct.

as a result, the response keys are no longer needed.

@acud acud requested review from acud and removed request for acud October 30, 2019 11:26
@mortelli mortelli merged commit e34af5c into master Oct 30, 2019
@mortelli mortelli deleted the swap-query-cheque-info branch October 30, 2019 13:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants