CodeChain-io / CodeChain-io/codechain
Tracker method calling part needs to be refactored
- Lingua principale
- Rust
- Stelle
- 256
- Fork
- 50
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Now the `tracker()` method can be called through the structs [`ShardTransaction`](https://github.com/CodeChain-io/codechain/blob/a9686064fd36c3325f5c985047bf4529cce0d3b0/types/src/transaction/shard.rs#L101), [`Action`](https://github.com/CodeChain-io/codechain/blob/a9686064fd36c3325f5c985047bf4529cce0d3b0/types/src/transaction/action.rs#L183) and [`Transaction`](https://github.com/CodeChain-io/codechain/blob/a9686064fd36c3325f5c985047bf4529cce0d3b0/types/src/transaction/transaction.rs#L54).
Some caller function code is now using useless conversion from `Action` to `ShardTransaction` though the conversion was already implemented inside of the `tracker()` of `Action`.
As well as the above, after the [pr#1548](https://github.com/CodeChain-io/codechain/pull/1548), the implementations will become inconsistent. Previously the tracker was needed only for asset transactions, but now the `WrapCCC` needs tracker though it's not an asset transaction.
From this semantic inconsistency, there is an implementation gap between `tracker()` of `Action` and the others. Therefore, the refactoring needs for `tracker()` and related caller functions not to be confused in the future.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start by comparing the tracker() implementations in types/src/transaction/shard.rs, types/src/transaction/action.rs, and types/src/transaction/transaction.rs, then inspect the related caller functions and the changes from PR #1548. Trace the existing Action-to-ShardTransaction conversions and the WrapCCC path. Done means the tracker API and its callers have consistent semantics without redundant conversions.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- blockchain
- Tipo di issue
- Refactoring
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100