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

Add more specific error when linked inputs are pending. #904

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

nodech
Copy link
Contributor

@nodech nodech commented Oct 4, 2024

Linked inputs, such as REVEAL, REDEEM, REGISTER ... REVOKE, are tied to specific coins. Coins can't be used when they are either spent or spent in the mempool. Already spent errors are handled properly by checking existence of coins.

Credits when they are in the wallets pending list (Most likely in the mempool as well) are not properly handled. Wallet will allow creation of covenant inputs, but it will fail later on coin selection. Coin selection can't use coins spent in pending, so it will fail with error: "Could not resolve preferred inputs". This should not happen again, and instead, new error will be thrown: "Credit is already pending for: ${name}"

@nodech nodech added bug general - Something isn't working intermediate review difficulty - intermediate patch Release version quick review difficulty - easy and removed intermediate review difficulty - intermediate labels Oct 4, 2024
@nodech nodech force-pushed the preferred-inputs-bug branch from 310273f to a2728a9 Compare October 4, 2024 10:37
@nodech nodech force-pushed the preferred-inputs-bug branch from a2728a9 to 7b5aab1 Compare October 4, 2024 11:13
@coveralls
Copy link

Coverage Status

coverage: 70.06% (+0.02%) from 70.04%
when pulling 7b5aab1 on nodech:preferred-inputs-bug
into 45c6ac1 on handshake-org:master.

@nodech nodech merged commit 1b331ee into handshake-org:master Oct 7, 2024
6 checks passed
@nodech nodech deleted the preferred-inputs-bug branch November 28, 2024 14:56
@nodech nodech mentioned this pull request Nov 29, 2024
@nodech nodech mentioned this pull request Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug general - Something isn't working patch Release version quick review difficulty - easy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants