ledger_subsystem module

Copyright (c) 2017 beyond-blockchain.org.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

LedgerSubsystem(config[, enabled, dbtype, ...])
class ledger_subsystem.LedgerSubsystem(config, enabled=False, dbtype='sqlite', loglevel='all', logname=None)[source]

Bases: object

append_msg(msg)[source]
check_table_existence(dbname, name)[source]
close_db(dbname)[source]
close_merkle_tree(jTemp)[source]
create_table_in_db(dbname, tbl, tbl_definition, primary_keys=[], indices=[])[source]
disable()[source]

Disable the ledger subsystem :return:

enable()[source]
exec_sql(dbname, sql, *dat)[source]
exec_sql_fetchone(dbname, sql, *dat)[source]
get_merkle_base(digest)[source]
open_db(dbname)[source]
register_transaction(asset_group_id, transaction_id)[source]
subsystem_loop()[source]
subsystem_timer()[source]
verify_digest(digest, dic)[source]
verify_transaction(asset_group_id, transaction_id)[source]
write_branch(digest=None, left=None, right=None)[source]
write_leaf(jTemp, digest=None, left=None, right=None)[source]
write_merkle_root(root)[source]
write_root(root=None, spec=None)[source]
class ledger_subsystem.Queue[source]

Bases: object

append_msg(msg)[source]
wait_msg(flash_others=False)[source]