Skip to content

Commit

Permalink
Integrate Rust blockstore into Validator
Browse files Browse the repository at this point in the history
Replace the Python blockstore with the Rust blockstoer.

Signed-off-by: Adam Ludvik <ludvik@bitwise.io>
  • Loading branch information
Adam Ludvik committed Oct 1, 2018
1 parent 35f89e9 commit 0173e37
Show file tree
Hide file tree
Showing 10 changed files with 752 additions and 278 deletions.
10 changes: 5 additions & 5 deletions validator/sawtooth_validator/journal/block_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ def __init__(self):
_libexec("block_manager_new",
ctypes.byref(self.pointer))

def add_store(self, name, block_store):
_pylibexec("block_manager_add_store",
self.pointer,
ctypes.c_char_p(name.encode()),
ctypes.py_object(block_store))
def add_commit_store(self, block_store):
_libexec(
"block_manager_add_commit_store",
self.pointer,
block_store.pointer)

def put(self, branch):
c_put_items = (ctypes.POINTER(_PutEntry) * len(branch))()
Expand Down
Loading

0 comments on commit 0173e37

Please sign in to comment.