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

fix: get_transaction does not work for non-wallet txs #509

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

gregdhill
Copy link
Member

@gregdhill gregdhill commented Aug 1, 2023

In most cases the wait_for_transaction_metadata method would never return when monitoring issue txs (via process_issue_requests) since most transactions are external to the wallet and the RPC call would fail silently. This was the cause of the failure in the API tests here but I assume this also affects production.

As pointed out by @sander2, this bug was only recently introduced here: https://github.com/interlay/interbtc-clients/pull/505/files#diff-81edb9dff73f644e5f570d16889c0316836cb9730ef3bcdf1b3a2707e5336989R299-R301

Err(e) => Err(e.into()),
}?)
let (block_hash, fee) = retry(get_exponential_backoff(), || async {
if is_wallet {
Copy link
Member

Choose a reason for hiding this comment

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

Can we use https://github.com/interlay/interbtc-clients/blob/eeb2fda6d584dbf851ad851dc013e3cf52463de4/bitcoin/src/lib.rs#L750C27-L750C27 ? I'm not sure it works, it looks like it might need decoding, but would be nice to avoid having to branch here

Copy link
Member Author

Choose a reason for hiding this comment

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

We would need to manually calculate the fee for the metrics which I'd like to avoid adding right now (to unblock the next release).

@gregdhill gregdhill force-pushed the fix/get-tx branch 2 times, most recently from d7bcd44 to cef1c28 Compare August 2, 2023 09:33
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
@sander2 sander2 merged commit 890cb73 into interlay:master Aug 2, 2023
6 checks passed
@gregdhill gregdhill deleted the fix/get-tx branch August 2, 2023 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants