-
Notifications
You must be signed in to change notification settings - Fork 97
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
client/dcr: Add rpc staking. #2316
Conversation
71ce084
to
c8d7ff4
Compare
e8a76ec
to
25a52a4
Compare
25a52a4
to
064af34
Compare
Make core methods asset neutral and cleaning up help messages https://github.com/decred/dcrdex/compare/25a52a4119c86738aeb58f9909da03fc79eefff9..064af34478e9098c95ea04f5dcf4c3cbc70316e0 |
f4f9f02
to
a465c48
Compare
Added |
client/asset/dcr/rpcwallet.go
Outdated
@@ -912,26 +912,36 @@ func (w *rpcWallet) Tickets(ctx context.Context) ([]*asset.Ticket, error) { | |||
w.log.Errorf("GetTransaction error for ticket %s: %v", h, err) | |||
continue | |||
} | |||
blkHash, err := chainhash.NewHashFromStr(tx.BlockHash) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would this work for unmined tickets? Or are all tickets guaranteed to be included in a block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it errors and I saw this while testing with a block hash of all zeros....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing out on simnet, it seems vsp is only including mined tickets in the results. @buck54321 do we need confirming tickets for native wallets? Or we can ignore these here as well so they act the same. Probably we want the unconfirmed tickets in results...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw that too, but I figured we could follow up since it's not particular to RPC staking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will set unmined block heights to -1 here and leave a TODO in the vsp wallet logic.
a465c48
to
ea84ec5
Compare
Fixed update balance logic and adding unmined tickets to rpc wallet stake status response. https://github.com/decred/dcrdex/compare/a465c48681aca261a21c62f62bf24575c9820227..ea84ec5eac9a56a29524596167db2d165a21b0c5 |
ea84ec5
to
57879a0
Compare
isSPV -> isNative as pointed out by @itswisdomagain an rpcwallet can also be SPV https://github.com/decred/dcrdex/compare/ea84ec5eac9a56a29524596167db2d165a21b0c5..57879a0b1f780f9fad2834ee31f0ef5ba6f97a53 |
part of #2264
depends on #2290Adds a rpc consumer for ticket purchasing.