OSDN Git Service

Wallet store interface (#217)
[bytom/vapor.git] / test / chain_test_util.go
index 9181053..2f5fdb0 100644 (file)
@@ -110,12 +110,12 @@ func (ctx *chainTestContext) getUtxoEntries() map[string]*storage.UtxoEntry {
        defer iter.Release()
 
        for iter.Next() {
-               utxoEntry := storage.UtxoEntry{}
-               if err := proto.Unmarshal(iter.Value(), &utxoEntry); err != nil {
+               utxoEntry := new(storage.UtxoEntry)
+               if err := proto.Unmarshal(iter.Value(), utxoEntry); err != nil {
                        return nil
                }
                key := string(iter.Key())
-               utxoEntries[key] = &utxoEntry
+               utxoEntries[key] = utxoEntry
        }
        return utxoEntries
 }