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

【改进方案】升级交易类型处理方式 #74

Closed
imfly opened this issue Apr 22, 2020 · 1 comment
Closed

【改进方案】升级交易类型处理方式 #74

imfly opened this issue Apr 22, 2020 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@imfly
Copy link
Member

imfly commented Apr 22, 2020

当前,交易类型的处理采取的阿拉伯数字形式,然后使用transaction_types对应来引用。主要问题是:

1. 容易冲突

这个问题很好解决,因为可以通过文档或代码约束,如果用户提供了与系统类型重复的交易类型,可以提醒错误,这需要在资产插件脚手架、插件扩展逻辑、以及文档等方面提供说明和编码。

2. 定义分散

需要在asset-*等资产插件中定义,另外,在node-sdk中重复定义,这不是很好的解决方法。当前版本,在@ddn/peer 的 transaction_types 里也有,需要做到一处定义,多出使用才对。

还有一种方案,可以考虑将 交易类型 插件化,专门用于交易类型的处理。

@imfly imfly added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 22, 2020
@imfly
Copy link
Member Author

imfly commented Apr 23, 2020

统一在 @ddn/utils 定义了,方便以后修改和扩展。

@imfly imfly closed this as completed in a2a5513 Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant