bdk icon indicating copy to clipboard operation
bdk copied to clipboard

Retry failed RPC calls on error

Open evanlinjin opened this issue 3 years ago • 1 comments

This PR replaces #707 (which attempted to fix #650), but is based on top of work done in #740.

Description

Refer to #707 and #740

I don't think we can ever fix #650 fully, however the work done in this PR seems to reduce the failure rate.

In addition to the work done by @afilini in #707, this PR introduces logic that catches error code -4 during descriptor/scriptPubKey import, and treats it like a successful import (so we continue syncing as usual). The caveat of this is that some sync cycles will miss out on importing some scriptPubKeys/descriptors, but is this better than a complete failure?

Checklists

All Submissions:

  • [x] I've signed all my commits
  • [x] I followed the contribution guidelines
  • [x] I ran cargo fmt and cargo clippy before committing

Bugfixes:

~* [ ] This pull request breaks the existing API~ ~* [ ] I've added tests to reproduce the issue which are now passing~

  • [x] I'm linking the issue being fixed by this PR

evanlinjin avatar Sep 01 '22 10:09 evanlinjin

@afilini do you think this is still worth working on?

evanlinjin avatar Sep 27 '22 12:09 evanlinjin