archethic-foundation / archethic-foundation/archethic-node
Refactor VersionedUnspentOutput / Inputs
- Dominant language
- Elixir
- Stars
- 82
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
### Is your feature request related to a problem?
Currently the structs `VersionedUnspentOutput` contains the unspent output and the protocol version:
```elixir
%VersionedUnspentOutput{
protocol_version: v,
unspent_output: %UnspentOutput{]}
}
```
But this is makes the code more complex to write and understand
### Describe the solution you'd like
It could be more easy to keep the `UnspentOutput` struct and add the protocol version in it directly.
### Additional context
_No response_
### Epic
_No response_
Contributor guide
Research direction
Start by locating the VersionedUnspentOutput, UnspentOutput, and corresponding input struct definitions and all their usages. Trace how the protocol version is read and passed through the code, then update the affected callers consistently; the refactor is complete when the separate versioned wrappers are no longer needed and the existing behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- blockchain
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100