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

refactor(core)!: replace OutputFlags with OutputType #4174

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Jun 8, 2022

Description

  • Replaces OutputFlags WithOutputType enum
  • Updates transactionBuilder for integration tests
  • Updates test faucet json files (The reason this PR is so massive!)

Motivation and Context

Many new types of UTXOs are being added to the protocol. The OutputFlags type uses 2 bytes to represent up to 16 different types. These flags could not meaningfully be combined which is the primary use case of using bitflags.

This PR replaces the 2 byte bitflags with a 1-byte enum that represents the various output types available.

New dependency
serde_repr - allows repr enums to be de/serialized with serde as an integer (https://serde.rs/enum-number.html)

How Has This Been Tested?

Existing tests updated as necessary

@sdbondi sdbondi force-pushed the core-change-output-flags-to-output-type branch from 47c7ad3 to d851544 Compare June 8, 2022 14:26
@delta1
Copy link
Contributor

delta1 commented Jun 8, 2022

Nice those output flags had definitely gotten unwieldy

concept ack

@sdbondi sdbondi force-pushed the core-change-output-flags-to-output-type branch 8 times, most recently from a2ea334 to f492d88 Compare June 10, 2022 07:28
@sdbondi sdbondi force-pushed the core-change-output-flags-to-output-type branch from f492d88 to e5dbb5d Compare June 10, 2022 07:28
@aviator-app aviator-app bot merged commit d779f43 into tari-project:development Jun 13, 2022
@sdbondi sdbondi deleted the core-change-output-flags-to-output-type branch June 13, 2022 09:42
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.

3 participants