-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Permit paying oneself #10337
Permit paying oneself #10337
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.
@garious You're right, I was keeping the semantics but didn't notice the self pay case. Passing the KeyedAccount
seems cleaner and clearer anyway. Was an account passed to make the tests simpler? Maybe because only an account was originally necessary?
Codecov Report
@@ Coverage Diff @@
## master #10337 +/- ##
=========================================
- Coverage 81.3% 81.3% -0.1%
=========================================
Files 288 288
Lines 67000 67094 +94
=========================================
+ Hits 54510 54584 +74
- Misses 12490 12510 +20 |
💔 Unable to automerge due to CI failure |
No test here because we're just removing an [untested] special case. Fixes solana-labs#10339
2b858cb
to
2bc3d2d
Compare
💔 Unable to automerge due to CI failure |
💔 Unable to automerge due to CI failure |
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.
Sweet
Fixes #10339
check_unique_pubkeys( | ||
(&from.pubkey(), "cli keypair".to_string()), | ||
(to, "to".to_string()), | ||
)?; | ||
|
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.
I think we can remove this check from process_pay
as well.
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.
About time we rip out all things Budget. All that code can have a new home in the SPL. We can add a new solana-budget
CLI as well.
💔 Unable to automerge due to CI failure |
Problem
Can't transfer SOL to oneself. A while back, it wasn't possible to hold two references to the same account, and we went as far as ensuring that returned a nice error code (3c6af52). Now that's no problem, but the System instruction program still holds a write lock on the
to
account for no obvious reason, preventing the program from capturing thefrom
lock.Summary of Changes
Permit pay-to-self transactions.
Towards #10336