-
Couldn't load subscription status.
- Fork 16
feat: Integrate MinFeeVerifier and DaoScriptSizeVerifier into light-client
#216
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
Conversation
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.
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
light-client-lib/src/verify.rs:254
- [nitpick] Consider using an explicit conversion method instead of relying on into() here so that the intended type conversion for swc is clearer and more readable.
swc.clone().into(),
light-client-lib/src/tests/verify.rs:43
- Consider adding a test case to verify the error path when the transaction fee is below the minimum fee rate, ensuring that MinFeeVerifier::verify returns an appropriate error.
assert_eq!(fee_calculator.transaction_fee(&rtx).unwrap(), Capacity::shannons(1_0000_0000));
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #216 +/- ##
===========================================
+ Coverage 71.58% 71.90% +0.32%
===========================================
Files 27 27
Lines 6925 6966 +41
===========================================
+ Hits 4957 5009 +52
+ Misses 1968 1957 -11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
MinFeeVerifier and DaoScriptSizeVerifier into light-client
This PR adds min fee check and DAO script size check when sending transactions through light client
send_transactionwill get their fee rate calculated, and compared to a pre-set fixed fee rate (1000 shannon per kilobytes). Transactions with insufficient fee rate will be rejected bysend_transaction.DaoScriptSizeVerifier.