Skip to content

Add ValidateAddress to stakepoold RPC#406

Merged
dajohi merged 1 commit intodecred:masterfrom
jholdstock:merged
Jun 11, 2019
Merged

Add ValidateAddress to stakepoold RPC#406
dajohi merged 1 commit intodecred:masterfrom
jholdstock:merged

Conversation

@jholdstock
Copy link
Copy Markdown
Member

This work is on top of #403, #402 and #395. Marking the PR as a draft, and I will rebase and request a review once the previous three are merged.

More work towards #227

@jholdstock jholdstock force-pushed the merged branch 2 times, most recently from 9a3b47b to 1aba75a Compare June 11, 2019 15:33
@jholdstock jholdstock marked this pull request as ready for review June 11, 2019 15:35
@jholdstock
Copy link
Copy Markdown
Member Author

Rebased and ready for a review.

import (
"errors"
"fmt"
"github.com/decred/dcrd/dcrutil"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

imports need ordering (separate std lib from others)


if v.IsMine != lastResponse.IsMine ||
v.PubKeyAddr != lastResponse.PubKeyAddr {
vErr := fmt.Errorf("wallets %d and %d have different ValideAddress responses",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

would be good to log the mismatching fields (or just both fields from both responses)


// Ensure responses are identical
var lastResponse *pb.ValidateAddressResponse
lastServer := 0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just a style thing - at least in dcrdata's codebase, we always init with var name type when the zero value is desired. I'm not sure how consistent dcrstakepool is with variable initialization though.

@dajohi dajohi merged commit b25f430 into decred:master Jun 11, 2019
@jholdstock jholdstock mentioned this pull request Jun 14, 2019
@jholdstock jholdstock deleted the merged branch August 12, 2019 12:35
girino added a commit to girino/dcrstakepool that referenced this pull request Sep 7, 2019
* commit 'b25f4307a2f1f956ab04c32919f7e88f66a4938d':
  multi: add ValidateAddress to stakepoold RPC (decred#406)
  show invalid ticket warning. (decred#395)
  multi: show last N voted tickets (decred#402)
  Get VoteVersion from stakepoold instead of dcrwallet (decred#403)
  remove enable stake pool as an option, always enabled (decred#398)
  prevent horizontal scrolling (decred#401)

# Conflicts:
#	config.go
girino added a commit to girino/dcrstakepool that referenced this pull request Sep 7, 2019
* commit 'b25f4307a2f1f956ab04c32919f7e88f66a4938d':
  multi: add ValidateAddress to stakepoold RPC (decred#406)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants