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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
@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.

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