Skip to content

Commit

Permalink
xxx
Browse files Browse the repository at this point in the history
  • Loading branch information
xtaci committed Dec 13, 2017
1 parent 33d7258 commit 03091ea
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions AElf.Kernel/LiteDBDataProvider.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Threading.Tasks;
using System.Linq;
using LiteDB;

namespace AElf.Kernel
Expand All @@ -25,11 +26,12 @@ public LiteDBDataProvider(string path)
this.db = new LiteDatabase(@"path");
}

Task<ISerializable> IAccountDataProvider.GetAsync(IHash key)
async Task<ISerializable> IAccountDataProvider.GetAsync(IHash key)
{
var c = this.db.GetCollection<Record>("data");
var result = c.Find(x => x.Key.Equals(key));
return result;
Task<ISerializable> task = new Task<ISerializable>(() => c.Find(x => x.Key.Equals(key)));
task.Start();
return await task;
}

IHash<IMerkleTree<ISerializable>> IAccountDataProvider.GetDataMerkleTreeRoot()
Expand Down

0 comments on commit 03091ea

Please sign in to comment.