Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Preperation to support different database backends #939

Merged
merged 27 commits into from
Jun 12, 2019
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
09376f3
feat, wip, first step towards a generic db interface
merl111 Apr 5, 2019
76542b8
removed old LevelDB implementation
merl111 Apr 14, 2019
4d39469
feat, reworked blockchain db layer
merl111 Apr 14, 2019
bd02494
feat, NotificationDB now uses the new layer too
merl111 Apr 14, 2019
9ebdde6
feat, factory for prefixed db and snapshot. DB unit tests, Notificati…
merl111 Apr 24, 2019
d3aead8
fix, fixed a few things to make UTs pass
merl111 Apr 24, 2019
7771107
fix, added locking, removed unused code
merl111 Apr 25, 2019
c912b2b
fixed typo
merl111 Apr 29, 2019
94017a8
moved AbstractDBInterface to AbstractDBImplementation to avoid confusion
merl111 Apr 29, 2019
7952819
Documented new classes and methods to povide information on how to im…
merl111 Apr 29, 2019
631228f
extended doc strings, made linter happy
merl111 May 10, 2019
5ac7e58
fixed typos, changed DBFactory
merl111 May 14, 2019
11e644b
extended docstrings + fixed minor bugs
merl111 May 15, 2019
2237261
added unit test for db factory, default values for db settings
merl111 May 16, 2019
281264d
corrected database paths in configs
merl111 May 16, 2019
728666b
Merge branch 'development' into alt-db-support
merl111 May 16, 2019
f08dd6b
fixed paths to data directories
merl111 May 20, 2019
df26c05
fix, fixed typos, minor refactoring after review, fixed bug with paths
merl111 May 21, 2019
50a8c7d
made linter happy
merl111 May 21, 2019
71262dd
removed files slipped in through upstream merge
merl111 May 30, 2019
0f12117
Merge remote-tracking branch 'upstream/development' into alt-db-support
merl111 May 30, 2019
50ac3e1
made linter happy...again
merl111 May 30, 2019
5ab843b
Merge remote-tracking branch 'upstream/development' into alt-db-support
merl111 May 30, 2019
98c9ed4
updated import_blocks and export_blocks to new database layer, remove…
merl111 Jun 5, 2019
c5bb6ce
fix, minor fixes
merl111 Jun 5, 2019
939749d
fix, take --datadir intou account when starting np=prompt, removed du…
merl111 Jun 12, 2019
bc6883e
Merge remote-tracking branch 'upstream/development' into alt-db-support
merl111 Jun 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
870 changes: 772 additions & 98 deletions neo/Core/Blockchain.py

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions neo/Core/Helper.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from base58 import b58decode
import binascii
from neo.Blockchain import GetBlockchain, GetStateReader
from neo.Implementations.Blockchains.LevelDB.CachedScriptTable import CachedScriptTable
from neo.Implementations.Blockchains.LevelDB.DBCollection import DBCollection
from neo.Implementations.Blockchains.LevelDB.DBPrefix import DBPrefix
from neo.Storage.Interface.DBInterface import DBInterface
from neo.Storage.Common.CachedScriptTable import CachedScriptTable
from neo.Storage.Common.DBPrefix import DBPrefix
from neo.Core.State.ContractState import ContractState
from neo.Core.State.AssetState import AssetState
from neo.Core.Cryptography.Crypto import Crypto
Expand Down Expand Up @@ -201,7 +201,7 @@ def VerifyScripts(verifiable):
return False

state_reader = GetStateReader()
script_table = CachedScriptTable(DBCollection(blockchain._db, DBPrefix.ST_Contract, ContractState))
script_table = CachedScriptTable(DBInterface(blockchain._db, DBPrefix.ST_Contract, ContractState))

engine = ApplicationEngine(TriggerType.Verification, verifiable, script_table, state_reader, Fixed8.Zero())
engine.LoadScript(verification)
Expand Down
Loading