Rename some Account variables.

This commit is contained in:
Josh Rickmar 2013-11-21 11:23:50 -05:00
parent 649112b764
commit 57802d8daf
2 changed files with 16 additions and 16 deletions

View file

@ -41,8 +41,8 @@ type Account struct {
name string
dirty bool
fullRescan bool
NewBlockTxSeqN uint64
SpentOutpointSeqN uint64
NewBlockTxJSONID uint64
SpentOutpointJSONID uint64
UtxoStore struct {
sync.RWMutex
dirty bool
@ -222,7 +222,7 @@ func (a *Account) ImportWIFPrivateKey(wif, label string,
func (a *Account) Track() {
n := <-NewJSONID
a.mtx.Lock()
a.NewBlockTxSeqN = n
a.NewBlockTxJSONID = n
a.mtx.Unlock()
replyHandlers.Lock()
@ -234,7 +234,7 @@ func (a *Account) Track() {
n = <-NewJSONID
a.mtx.Lock()
a.SpentOutpointSeqN = n
a.SpentOutpointJSONID = n
a.mtx.Unlock()
replyHandlers.Lock()
@ -366,7 +366,7 @@ func (a *Account) ReqNewTxsForAddress(addr string) {
log.Debugf("Requesting notifications of TXs sending to address %v", addr)
a.mtx.RLock()
n := a.NewBlockTxSeqN
n := a.NewBlockTxJSONID
a.mtx.RUnlock()
cmd := btcws.NewNotifyNewTXsCmd(fmt.Sprintf("btcwallet(%d)", n),
@ -386,7 +386,7 @@ func (a *Account) ReqSpentUtxoNtfn(u *tx.Utxo) {
u.Out.Hash, u.Out.Index)
a.mtx.RLock()
n := a.SpentOutpointSeqN
n := a.SpentOutpointJSONID
a.mtx.RUnlock()
cmd := btcws.NewNotifySpentCmd(fmt.Sprintf("btcwallet(%d)", n),

View file

@ -804,7 +804,7 @@ func CreateEncryptedWallet(frontend chan []byte, icmd btcjson.Cmd) {
Wallet: wlt,
name: cmd.Account,
dirty: true,
NewBlockTxSeqN: <-NewJSONID,
NewBlockTxJSONID: <-NewJSONID,
}
// Begin tracking account against a connected btcd.
@ -869,7 +869,7 @@ func WalletLock(frontend chan []byte, icmd btcjson.Cmd) {
ReplySuccess(frontend, icmd.Id(), nil)
NotifyWalletLockStateChange("", true)
} else {
ReplyError(frontend, cmd.Id(),
ReplyError(frontend, icmd.Id(),
&btcjson.ErrWalletInvalidAccountName)
}
}