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

[WIP] Improve unconfirmed txn handling in wallet #2641

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ChrisSchinnerl
Copy link
Contributor

The wallet should be able to track transactions even if they haven't been accepted into the transaction set. For this to work, the wallet has to be able to add transactions to its set of unconfirmed transactions without relying on the transaction pool. This PR introduces a wrapper for AcceptTransactionSet to achieve this.

@ChrisSchinnerl ChrisSchinnerl force-pushed the unconfirmed-txns-improv branch 3 times, most recently from 3740aea to 2e85664 Compare January 11, 2018 19:11
@@ -24,6 +24,16 @@ func ComposeErrors(errs ...error) error {
return nil
}

// If there is only a single error return it directly. This still allows
// callers of functions to check for specific errors
if len(errStrings) == 1 {
Copy link
Member

Choose a reason for hiding this comment

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

this will have to be added to NebulousLabs/errors as well. We should make a PR that strips out build/errors.go.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe we should create an issue for that to make sure we don't forget about it.

@ChrisSchinnerl
Copy link
Contributor Author

The changes I made so far should allow the wallet to ignore certain errors returned by tpool.AcceptTransactionSet while still being able to keep track of the set in wallet.unconfirmedSets. The todo in wallet.commitTransactionSet still has to be replaced by the errors that should be ignored.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants