Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core)!: replace block and transaction hashes with FixedHash type #4533

Merged
merged 11 commits into from
Aug 25, 2022

Conversation

SWvheerden
Copy link
Collaborator

@SWvheerden SWvheerden commented Aug 24, 2022

Description

This removes the usage of Vec for all hashes except the mmr and RPC requests.
All other internal hashing now uses the FixedHash type.
We now know each hash will always be of the correct length when processing the hash.
This gets rid of a good amount of technical debt.

How Has This Been Tested?

unit tests

@SWvheerden SWvheerden changed the title wip remove vec<u8> feat!: remove vec<u8> Aug 24, 2022
@sdbondi sdbondi changed the title feat!: remove vec<u8> feat!: replace block and transaction hashes with FixedHash type Aug 25, 2022
base_layer/core/src/base_node/proto/chain_metadata.rs Outdated Show resolved Hide resolved
base_layer/core/src/base_node/rpc/service.rs Outdated Show resolved Hide resolved
base_layer/core/src/base_node/rpc/service.rs Show resolved Hide resolved
base_layer/core/src/base_node/rpc/service.rs Outdated Show resolved Hide resolved
base_layer/core/src/blocks/block_header.rs Outdated Show resolved Hide resolved
base_layer/core/src/blocks/block_header.rs Outdated Show resolved Hide resolved
base_layer/core/src/blocks/new_blockheader_template.rs Outdated Show resolved Hide resolved
Copy link
Member

@sdbondi sdbondi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@sdbondi sdbondi changed the title feat!: replace block and transaction hashes with FixedHash type fix(core)!: replace block and transaction hashes with FixedHash type Aug 25, 2022
@sdbondi sdbondi merged commit 501f550 into tari-project:development Aug 25, 2022
@SWvheerden SWvheerden deleted the sw_remove_vec<u8> branch August 31, 2022 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants