Skip to content

blockchain: move blockchain logic from module to class - #10876

Open
f321x wants to merge 2 commits into
spesmilo:masterfrom
f321x:blockchain_manager
Open

blockchain: move blockchain logic from module to class#10876
f321x wants to merge 2 commits into
spesmilo:masterfrom
f321x:blockchain_manager

Conversation

@f321x

@f321x f321x commented Aug 20, 2026

Copy link
Copy Markdown
Member

Move the blockchain logic in blockchain.py from the module level
into a BlockchainManager class whose instance is owned by the Network.

This separates the blockchain handling from the process and allows
to have different blockchain setups in the same process, which can
e.g. be used in unittests, as those might simulate different
"users" in a single process.

@f321x f321x added the topic-blockchain ⛓ related to logic in blockchain.py label Aug 20, 2026
f321x added 2 commits August 20, 2026 14:36
os.system() is marked deprecated, the docs say to use
subprocess instead.
move the blockchain logic in `blockchain.py` from the module level
into a class whose instance is owned by the Network.
This separates the blockchain handling from the process and allows
to have different blockchain setups in the same process, which can
e.g. be used in unittests as unittests might simulate different
"users" in a single process.
@f321x
f321x force-pushed the blockchain_manager branch from 8f906ed to 45ad677 Compare August 20, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic-blockchain ⛓ related to logic in blockchain.py

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant