SetWalletInfo([]byte)
DeleteWalletTransactions()
DeleteWalletUTXOs()
- GetAccountUtxos(key string) []*account.UTXO
+ GetAccountUTXOs(key string) []*account.UTXO
SetRecoveryStatus([]byte, []byte)
DeleteRecoveryStatus([]byte)
GetRecoveryStatus([]byte) []byte
storeBatch.Write()
}
-// GetAccountUtxos get all account unspent outputs
-func (store *LevelDBStore) GetAccountUtxos(key string) []*account.UTXO {
+// GetAccountUTXOs get all account unspent outputs
+func (store *LevelDBStore) GetAccountUTXOs(key string) []*account.UTXO {
accountUtxos := []*account.UTXO{}
accountUtxoIter := store.DB.IteratorPrefix([]byte(key))
defer accountUtxoIter.Release()
for accountUtxoIter.Next() {
accountUtxo := &account.UTXO{}
if err := json.Unmarshal(accountUtxoIter.Value(), accountUtxo); err != nil {
- log.WithFields(log.Fields{"module": logModule, "err": err}).Warn("GetAccountUtxos fail on unmarshal utxo")
+ log.WithFields(log.Fields{"module": logModule, "err": err}).Warn("GetAccountUTXOs fail on unmarshal utxo")
continue
}
accountUtxos = append(accountUtxos, accountUtxo)
accountUtxos = w.AccountMgr.ListUnconfirmedUtxo(accountID, isSmartContract)
}
- confirmedUtxos := w.store.GetAccountUtxos(prefix + id)
+ confirmedUtxos := w.store.GetAccountUTXOs(prefix + id)
accountUtxos = append(accountUtxos, confirmedUtxos...)
newAccountUtxos := []*account.UTXO{}
for _, accountUtxo := range accountUtxos {