New Account and AccountStore API.
This change better organizes account handling by creating a new AccountStore type and accountstore global variable, with receiver funcs for all operations that require all accounts. More Account funcs are also added to clean up account handling in the RPC code. Intial work on this done by dhill.
This commit is contained in:
parent
2dd3fd0a21
commit
3c528f81ec
8 changed files with 923 additions and 504 deletions
|
@ -69,8 +69,8 @@ func (w *Account) writeDirtyToDisk() error {
|
|||
// for validity, and moved to replace the main file.
|
||||
timeStr := fmt.Sprintf("%v", time.Now().Unix())
|
||||
|
||||
adir := accountdir(cfg, w.name)
|
||||
if err := checkCreateAccountDir(adir); err != nil {
|
||||
adir := w.accountdir(cfg)
|
||||
if err := w.checkCreateAccountDir(adir); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue