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

feat: borsh sized serialization should be fallible #5537

Conversation

jorgeantonio21
Copy link
Contributor

Description

Adds fallibility to borsh serialized size method.

Motivation and Context

Audit

How Has This Been Tested?

What process can a PR reviewer use to test or verify this change?

Breaking Changes

  • None
  • Requires data directory on base node to be deleted
  • Requires hard fork
  • Other - Please specify

@github-actions
Copy link

github-actions bot commented Jun 28, 2023

Test Results (CI)

1 179 tests   1 179 ✔️  11m 29s ⏱️
     37 suites         0 💤
       1 files           0

Results for commit e021bea.

♻️ This comment has been updated with latest results.

@ghpbot-tari-project ghpbot-tari-project added P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged labels Jun 28, 2023
@github-actions
Copy link

github-actions bot commented Jun 28, 2023

Test Results (Integration tests)

26 tests   26 ✔️  14m 1s ⏱️
11 suites    0 💤
  2 files      0

Results for commit e021bea.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@SWvheerden SWvheerden left a comment

Choose a reason for hiding this comment

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

This is going the correct way.
But we should remove the expects as they are the same as the unwrap we replace.
I would prefer to replace them with Result<>

base_layer/core/src/transactions/aggregated_body.rs Outdated Show resolved Hide resolved
base_layer/core/src/transactions/test_helpers.rs Outdated Show resolved Hide resolved
base_layer/core/src/transactions/test_helpers.rs Outdated Show resolved Hide resolved
SWvheerden
SWvheerden previously approved these changes Jun 29, 2023
Copy link
Collaborator

@SWvheerden SWvheerden left a comment

Choose a reason for hiding this comment

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

It is so nice to see all these unwraps disappear

@ghpbot-tari-project ghpbot-tari-project removed the P-reviews_required Process - Requires a review from a lead maintainer to be merged label Jun 29, 2023
@ghpbot-tari-project ghpbot-tari-project added the P-reviews_required Process - Requires a review from a lead maintainer to be merged label Jun 29, 2023
@SWvheerden SWvheerden merged commit 53058ce into tari-project:development Jun 29, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants