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[, core, enabled, …]) |
Abstraction of an underlying ledger subsystem that is typically a blockchain. |
-
class
ledger_subsystem.
LedgerSubsystem
(config, core=None, enabled=False, dbtype='sqlite', loglevel='all', logname=None)[source]¶ Bases:
object
Abstraction of an underlying ledger subsystem that is typically a blockchain. This takes one transaction each to record and verifies its existence. It forms some Merkle trees of transaction IDs, and writes their root digests only to the underlying ledger.
-
register_transaction
(asset_group_id, transaction_id)[source]¶ Registers a transaction.
Parameters: - asset_group_id – asset group
- transaction_id – transaction to register
Returns:
-