Rename some Account variables.
This commit is contained in:
parent
649112b764
commit
57802d8daf
2 changed files with 16 additions and 16 deletions
12
account.go
12
account.go
|
@ -41,8 +41,8 @@ type Account struct {
|
||||||
name string
|
name string
|
||||||
dirty bool
|
dirty bool
|
||||||
fullRescan bool
|
fullRescan bool
|
||||||
NewBlockTxSeqN uint64
|
NewBlockTxJSONID uint64
|
||||||
SpentOutpointSeqN uint64
|
SpentOutpointJSONID uint64
|
||||||
UtxoStore struct {
|
UtxoStore struct {
|
||||||
sync.RWMutex
|
sync.RWMutex
|
||||||
dirty bool
|
dirty bool
|
||||||
|
@ -222,7 +222,7 @@ func (a *Account) ImportWIFPrivateKey(wif, label string,
|
||||||
func (a *Account) Track() {
|
func (a *Account) Track() {
|
||||||
n := <-NewJSONID
|
n := <-NewJSONID
|
||||||
a.mtx.Lock()
|
a.mtx.Lock()
|
||||||
a.NewBlockTxSeqN = n
|
a.NewBlockTxJSONID = n
|
||||||
a.mtx.Unlock()
|
a.mtx.Unlock()
|
||||||
|
|
||||||
replyHandlers.Lock()
|
replyHandlers.Lock()
|
||||||
|
@ -234,7 +234,7 @@ func (a *Account) Track() {
|
||||||
|
|
||||||
n = <-NewJSONID
|
n = <-NewJSONID
|
||||||
a.mtx.Lock()
|
a.mtx.Lock()
|
||||||
a.SpentOutpointSeqN = n
|
a.SpentOutpointJSONID = n
|
||||||
a.mtx.Unlock()
|
a.mtx.Unlock()
|
||||||
|
|
||||||
replyHandlers.Lock()
|
replyHandlers.Lock()
|
||||||
|
@ -366,7 +366,7 @@ func (a *Account) ReqNewTxsForAddress(addr string) {
|
||||||
log.Debugf("Requesting notifications of TXs sending to address %v", addr)
|
log.Debugf("Requesting notifications of TXs sending to address %v", addr)
|
||||||
|
|
||||||
a.mtx.RLock()
|
a.mtx.RLock()
|
||||||
n := a.NewBlockTxSeqN
|
n := a.NewBlockTxJSONID
|
||||||
a.mtx.RUnlock()
|
a.mtx.RUnlock()
|
||||||
|
|
||||||
cmd := btcws.NewNotifyNewTXsCmd(fmt.Sprintf("btcwallet(%d)", n),
|
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)
|
u.Out.Hash, u.Out.Index)
|
||||||
|
|
||||||
a.mtx.RLock()
|
a.mtx.RLock()
|
||||||
n := a.SpentOutpointSeqN
|
n := a.SpentOutpointJSONID
|
||||||
a.mtx.RUnlock()
|
a.mtx.RUnlock()
|
||||||
|
|
||||||
cmd := btcws.NewNotifySpentCmd(fmt.Sprintf("btcwallet(%d)", n),
|
cmd := btcws.NewNotifySpentCmd(fmt.Sprintf("btcwallet(%d)", n),
|
||||||
|
|
|
@ -804,7 +804,7 @@ func CreateEncryptedWallet(frontend chan []byte, icmd btcjson.Cmd) {
|
||||||
Wallet: wlt,
|
Wallet: wlt,
|
||||||
name: cmd.Account,
|
name: cmd.Account,
|
||||||
dirty: true,
|
dirty: true,
|
||||||
NewBlockTxSeqN: <-NewJSONID,
|
NewBlockTxJSONID: <-NewJSONID,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Begin tracking account against a connected btcd.
|
// Begin tracking account against a connected btcd.
|
||||||
|
@ -869,7 +869,7 @@ func WalletLock(frontend chan []byte, icmd btcjson.Cmd) {
|
||||||
ReplySuccess(frontend, icmd.Id(), nil)
|
ReplySuccess(frontend, icmd.Id(), nil)
|
||||||
NotifyWalletLockStateChange("", true)
|
NotifyWalletLockStateChange("", true)
|
||||||
} else {
|
} else {
|
||||||
ReplyError(frontend, cmd.Id(),
|
ReplyError(frontend, icmd.Id(),
|
||||||
&btcjson.ErrWalletInvalidAccountName)
|
&btcjson.ErrWalletInvalidAccountName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue