diff --git a/AElf.Kernel/LiteDBDataProvider.cs b/AElf.Kernel/LiteDBDataProvider.cs index 50bff5b03b..e35a93febc 100644 --- a/AElf.Kernel/LiteDBDataProvider.cs +++ b/AElf.Kernel/LiteDBDataProvider.cs @@ -1,13 +1,12 @@ using System; using System.Threading.Tasks; -using System.Linq; using LiteDB; namespace AElf.Kernel { public class LiteDBDataProvider:IAccountDataProvider { - class Record:ISerializable + struct Record:ISerializable { public IHash Key { get; set; } public byte[] Value { get; set; } @@ -29,7 +28,7 @@ public LiteDBDataProvider(string path) async Task IAccountDataProvider.GetAsync(IHash key) { var c = this.db.GetCollection("data"); - Task task = new Task(() => c.Find(x => x.Key.Equals(key))); + Task task = new Task(() => c.FindOne(x => x.Key.Equals(key))); task.Start(); return await task; }