Reverse order of addtx and importprivkey

This commit is contained in:
jholdstock 2020-05-31 09:05:25 +01:00 committed by David Hill
parent d407af35c0
commit fc5749545d
2 changed files with 8 additions and 7 deletions

View File

@ -141,12 +141,6 @@ func (n *NotificationHandler) Notify(method string, params json.RawMessage) erro
continue continue
} }
for _, walletClient := range walletClients { for _, walletClient := range walletClients {
err = walletClient.AddTransaction(rawTicket.BlockHash, rawTicket.Hex)
if err != nil {
log.Errorf("AddTransaction error on dcrwallet '%s': %v",
walletClient.String(), err)
continue
}
err = walletClient.ImportPrivKey(ticket.VotingWIF) err = walletClient.ImportPrivKey(ticket.VotingWIF)
if err != nil { if err != nil {
log.Errorf("ImportPrivKey error on dcrwallet '%s': %v", log.Errorf("ImportPrivKey error on dcrwallet '%s': %v",
@ -154,6 +148,13 @@ func (n *NotificationHandler) Notify(method string, params json.RawMessage) erro
continue continue
} }
err = walletClient.AddTransaction(rawTicket.BlockHash, rawTicket.Hex)
if err != nil {
log.Errorf("AddTransaction error on dcrwallet '%s': %v",
walletClient.String(), err)
continue
}
// Update vote choices on voting wallets. // Update vote choices on voting wallets.
for agenda, choice := range ticket.VoteChoices { for agenda, choice := range ticket.VoteChoices {
err = walletClient.SetVoteChoice(agenda, choice, ticket.Hash) err = walletClient.SetVoteChoice(agenda, choice, ticket.Hash)

View File

@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8"> <meta charset="utf-8">
<title>dcrwages</title> <title>vspd</title>
<link rel="stylesheet" type="text/css" href="/public/css/fonts.css" /> <link rel="stylesheet" type="text/css" href="/public/css/fonts.css" />
<link rel="stylesheet" type="text/css" href="/public/css/vspd.css" /> <link rel="stylesheet" type="text/css" href="/public/css/vspd.css" />