CodeChain-io / CodeChain-io/codechain

Tracker method calling part needs to be refactored

Đang mở
#1,551 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
refactoring
Ngôn ngữ chính
Rust
Star
256
Fork
50
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.