MCPcopy Create free account
hub / github.com/DNAProject/DNA / load

Method load

account/client.go:123–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

121}
122
123func (this *ClientImpl) load() error {
124 err := this.walletData.Load(this.path)
125 if err != nil {
126 return fmt.Errorf("error loading wallet %s: %s", this.path, err)
127 }
128 for _, accData := range this.walletData.Accounts {
129 this.accAddrs[accData.Address] = accData
130 if accData.Label != "" {
131 this.accLabels[accData.Label] = accData
132 }
133 if accData.IsDefault {
134 this.defaultAcc = accData
135 }
136 }
137 return nil
138}
139
140func (this *ClientImpl) save() error {
141 return this.walletData.Save(this.path)

Callers 1

NewClientImplFunction · 0.95

Calls 2

LoadMethod · 0.80
ErrorfMethod · 0.80

Tested by

no test coverage detected