forked from stratisproject/StratisBitcoinFullNode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request stratisproject#8 from quantumagi/kvstore
Add a LevelDB Key-Value Store and upgrade the Block Repository
- Loading branch information
Showing
28 changed files
with
1,637 additions
and
433 deletions.
There are no files selected for viewing
292 changes: 154 additions & 138 deletions
292
src/Stratis.Bitcoin.Features.BlockStore.Tests/BlockRepositoryTests.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/Stratis.Bitcoin.Features.BlockStore/BlockKeyValueStore.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Microsoft.Extensions.Logging; | ||
using NBitcoin; | ||
using Stratis.Bitcoin.Configuration; | ||
using Stratis.Bitcoin.Utilities; | ||
using Stratis.Features.NodeStorage.Interfaces; | ||
using Stratis.Features.NodeStorage.KeyValueStore; | ||
using Stratis.Features.NodeStorage.KeyValueStoreLevelDB; | ||
|
||
namespace Stratis.Bitcoin.Features.BlockStore | ||
{ | ||
public interface IBlockKeyValueStore : IKeyValueStore | ||
{ | ||
} | ||
|
||
public class BlockKeyValueStore : KeyValueStore<KeyValueStoreLevelDB>, IBlockKeyValueStore | ||
{ | ||
public BlockKeyValueStore(Network network, DataFolder dataFolder, ILoggerFactory loggerFactory, IDateTimeProvider dateTimeProvider) | ||
:base(dataFolder.BlockPath, loggerFactory, dateTimeProvider, new DBreezeSerializer(network.Consensus.ConsensusFactory)) | ||
{ | ||
} | ||
} | ||
} |
Oops, something went wrong.