It's also not optimal to review, since I basically only did restructuring, without changing any logic. So mostly it was cutting up parts into different files, fixing imports and adding pub where necessary. So it's not necessary to check every line of "new" code for correctness.
This fixes #165, adds a structure for documentation and adds the following code structure:
src
main.rs (only contains initialization code)
config.rs
constants.rs
util/
mod.rs (general utils)
number_to_words.rs
rsa.rs (rsa code from main.rs)
blockchain/
mod.rs (entrypoint and common logic)
block.rs
chain.rs
dht/
mod.rs (entrypoint)
client.rs
event_loop.rs
behaviour.rs
external/
mod.rs
bitcoin.rs (bitcoin interop)
mint.rs (previous work_with_mint.rs - since mint can be considered an external system)
time.rs (atomic time API)
web/
mod.rs (entry point, router)
data.rs (data objects - e.g. forms)
handlers/ (the handlers from web.rs split into parts, but no separate logic, just the handlers)
mod.rs
bill.rs
contacts.rs
identity.rs
quotes.rs
bill/ (most of the logic from main.rs split into parts)
mod.rs
identity.rs
contacts.rs
quotes.rs
tests/
mod.rs (previous test.rs - entry point for integration tests in the project)
The goal of this PR was to change the structure of the code, without changing functionality to better be able to understand and iterate on the codebase.
The idea was also to introduce some interface boundaries, so the different parts are better encapsulated and thus easier to change/test/replace.
@mtbitcr It would be great to hear some feedback from your side here, if this roughly represents your mental structure of the project and if the different pieces of logic are where they belong.
Unfortunately a bigger one. :)
It's also not optimal to review, since I basically only did restructuring, without changing any logic. So mostly it was cutting up parts into different files, fixing imports and adding
pub
where necessary. So it's not necessary to check every line of "new" code for correctness.This fixes #165, adds a structure for documentation and adds the following code structure:
work_with_mint.rs
- since mint can be considered an external system)(I commented out the failing tests same as in https://github.com/BitcreditProtocol/E-Bill/pull/182, so the build runs through - they'll be fixed in a different task)
The goal of this PR was to change the structure of the code, without changing functionality to better be able to understand and iterate on the codebase. The idea was also to introduce some interface boundaries, so the different parts are better encapsulated and thus easier to change/test/replace.
@mtbitcr It would be great to hear some feedback from your side here, if this roughly represents your mental structure of the project and if the different pieces of logic are where they belong.