-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add FeeProvider #54
Add FeeProvider #54
Conversation
25ca54a
to
b6280e6
Compare
…hich are processed in FeeProvider
…threads. There is a possibility of conflicts even if it is applied this change. We should consider more serious exclusive control like using Mutex or RDB atomicity.
b6280e6
to
5bea5f7
Compare
class FeeProvider | ||
include Singleton | ||
|
||
class NoUtxosInUtxoPool < StandardError; end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NoUtxosInUtxoPool
is a word inside FeeProvider, so it is desirable to have a word that users can understand, like InsufficientFee
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
今の作り方だと、UTXO pool についてユーザには意識してもらう必要がどうしてもあるかと思います。poolが枯渇しないように管理するのはユーザの責任担ってしまうので。もちろんそのための rake タスク等は用意しますが。
UTXOについて完全にユーザに意識させないようにするには、別のアプローチを考える必要があると思います。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APIとかで使う場合は、これらをキャッチして別のエラーとして返すという認識ですか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
そうですね。APIで使う場合にこのエラーが出たら 500 番台のエラーになると思いますし、リカバリは API 側の責任かと思います。
This PR adds FeeProvider feature
What this PR doesn't do(and it going to be another PRs)
glueby:fee_provider:manage_utxo_pool
rake taskglueby:fee_provider:status
rake task