forked from btcsuite/btcwallet
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
ticketbuyer: Add RPC calls to get/set config #1
Open
tuxcanfly
wants to merge
25
commits into
loader-ticketbuyer
Choose a base branch
from
ticketbuyer-rpcs
base: loader-ticketbuyer
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tuxcanfly
force-pushed
the
loader-ticketbuyer
branch
4 times, most recently
from
February 28, 2017 16:23
a49b561
to
e86e29a
Compare
This bucket has been unused since headers syncing was introduced. Remove it from the database with an upgrade. While here, change the waddrmgr db version check to check for an exact version match. We do not want old code to be used on upgraded databases.
tuxcanfly
force-pushed
the
loader-ticketbuyer
branch
from
February 28, 2017 19:03
e86e29a
to
e54d88b
Compare
tuxcanfly
force-pushed
the
ticketbuyer-rpcs
branch
3 times, most recently
from
March 1, 2017 16:14
4315d00
to
3811740
Compare
The new database format contains only a single version, and allows for each separate component to be upgraded together when necessary (e.g. upgrades that must change stuff in the address manager and transaction store buckets can now be done atomically). A migration must be performed to convert the old DB into the newer format. This migration consists of performing any legacy upgrades that have not yet been done, removing the old separate versions, and writing a single version to the new unified database metadata bucket. Because each of the three manager packages previously defined their own error types, and all did essentially the exact same thing, these were replaced with a single apperrors package containing the same functionality. The long term goal is to use this package for more than just the database layer, but also the wallet package itself.
The github.com/btcsuite/golangcrypto fork is still being pulled in due to dcrd deps, which will also have to be switched over.
This also removes the last traces of github.com/btcsuite/golangcrypto which was previously being pulled in as a dep of a dep.
Ticket purchase manager now keeps a copy of the passphrase so that the wallet can be unlocked to make purchases.
tuxcanfly
force-pushed
the
ticketbuyer-rpcs
branch
from
March 8, 2017 18:34
3811740
to
7bf874f
Compare
- Include immature coinbase credits - SSTXs are not coinbase rewards - Also include unconfirmed in the total. - Correctly add normal transactions to Spendable when minConf==0 - Handle unmined stake transactions properly.
This new method takes a read-only database transaction, rather than the bucket. This differs from the rest of the API which currently takes namespace buckets themselves, but this is the direction that I want to take the API. To remove some generated garbage created by creating the bucket key bytes, do the conversion once and save the keys as package variables. Use these consistently across the entire package.
This one does not derive branch keys, so it can be used slightly more efficiently when multiple branch xpubs must be derived. While here, fix a data race caused by reading and writing cached manager data without the write lock held.
tuxcanfly
force-pushed
the
ticketbuyer-rpcs
branch
from
March 15, 2017 12:58
3d8844e
to
095fe3b
Compare
Increase linter time limit Remove go 1.8 since it has issues and we don't currently use or recommend it anyway.
This change moves the wait for the session RPC response (used as a pong) to a new goroutine that does not run directly in the queue handler. By moving this out to a new goroutine, the handler can continue enqueuing and dequeueing notifications while waiting for the session response. Previously, if a notifiation was sent after the session RPC was called and before the response was received, the rpcclient main loop would block due to being unable to enqueue the notification.
This resolves double spend errors that are caused by creating and publishing multiple transactions while in a single database transaction. If any of the tickets can not be purchased, the transactions that were published remain tracked by the database. The PurchaseTickets method has also been changed to always return the hashes of all successfully published tickets, even if less than the requested number could be bought. This allows ticketbuyer to update its statistics with the number of bought tickets if only some were successfully sent. While here, add a comment about why a hardcoded minconf=0 in the auto ticket buyer code is needed.
This updates dcrd and dcrutil deps.
tuxcanfly
force-pushed
the
ticketbuyer-rpcs
branch
2 times, most recently
from
March 24, 2017 17:28
b54f076
to
8ee128c
Compare
* Added docs * Bumped version * Rename max_fee -> max_fee_per_kb for consistency
tuxcanfly
force-pushed
the
ticketbuyer-rpcs
branch
from
March 24, 2017 17:42
8ee128c
to
43245d5
Compare
* Rename ticket address -> voting address
* SetPoolAddress - remove unnecessary check
tuxcanfly
force-pushed
the
ticketbuyer-rpcs
branch
from
April 5, 2017 19:17
db48201
to
5e13d38
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As mentioned in btcsuite#509 added gRPC methods which allow fine tuning the configuration options for ticketbuyer.
Depends on btcsuite#532