-
Notifications
You must be signed in to change notification settings - Fork 55
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
Fix issue with owner payouts to setland34 #19
Open
Setland34
wants to merge
7
commits into
vbuterin:master
Choose a base branch
from
Setland34:fix-owner-payouts
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes vbuterin#15 Add logic to handle owner payouts and balance updates. * **blocks.py** - Add `handle_owner_payout` method to handle owner payouts and update balances. - Modify `pay_fee` method to call `handle_owner_payout` for owner payouts. * **manager.py** - Add logic to handle owner payouts and balance updates in the `receive` function. - Modify the `broadcast` function to handle owner payouts. * **processblock.py** - Add logic to handle owner payouts and balance updates in the `process_transactions` function. - Modify the `eval` function to handle owner payouts during transaction processing. * **tests/test_owner_payouts.py** - Add tests to verify correct handling of owner payouts and balance updates. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/vbuterin/pyethereum/issues/15?shareId=XXXX-XXXX-XXXX-XXXX).
* Remove logic to handle owner payouts in the `process_transactions` function
…ates * **Setup**: Modify `setUp` method to initialize test address and balance. * **Test Owner Payout**: Add test for owner payout and balance update. * **Test Owner Payout with Fee**: Add test for owner payout with transaction fee. * **Test Multiple Owner Payouts**: Add test for multiple owner payouts and balance updates.
* Add `test_owner_payout_balance_update` to verify correct balance updates after owner payout * Add `test_owner_payout_insufficient_balance` to verify behavior when balance is insufficient for owner payout
* Add `test_owner_payout_on_transaction` to verify owner payout during transaction processing * Add `test_owner_payout_on_receive` to verify owner payout during transaction reception * Add `test_owner_payout_on_multiple_transactions` to verify owner payout with multiple transactions * Update `setUp` method to initialize sender, receiver, and owner addresses and balances * Remove old test cases for owner payouts
…ates * Update `txpool` and `broadcast` calls to use `blk` instead of `obj` * Add logic to handle owner payouts by calling `mainblk.handle_owner_payout` with `tx.sender` and `tx.value`
* Add `test_owner_payout_on_transaction` to verify owner payout on a single transaction * Add `test_owner_payout_on_fee` to verify owner payout on transaction fee * Add `test_owner_payout_on_multiple_transactions` to verify owner payout on multiple transactions * Update `setUp` method to initialize balances and addresses * Remove unused imports and update imports for `Trie` and `rlp`
Setland34
commented
Jan 18, 2025
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.
Approved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #15
Add logic to handle owner payouts and balance updates.
blocks.py
handle_owner_payout
method to handle owner payouts and update balances.pay_fee
method to callhandle_owner_payout
for owner payouts.manager.py
receive
function.broadcast
function to handle owner payouts.processblock.py
process_transactions
function.eval
function to handle owner payouts during transaction processing.tests/test_owner_payouts.py
For more details, open the Copilot Workspace session.