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

Update fee vs amount being sent validation #2584

Merged
merged 1 commit into from
Jan 29, 2021

Conversation

philipr-za
Copy link
Contributor

Description

Currently when the SenderTransactionInitializer validates the components of the transaction it is building it will check that if the fee is more than the amount being sent + the change.

This PR updates this behaviour to check if the fee being sent is more than just the amounts being send, ignoring the change. This prevents the case where a large UTXO that produces a lot of change will still allow a transaction to be sent where the outbound amount is less than the fee.

How Has This Been Tested?

Manual testing

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Feature refactor (No new feature or functional changes, but performance or technical debt improvements)
  • New Tests
  • Documentation

Checklist:

  • I'm merging against the development branch.
  • I ran cargo-fmt --all before pushing.
  • I ran cargo test successfully before submitting my PR.
  • I have squashed my commits into a single commit.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

Currently when the `SenderTransactionInitializer` validates the components of the transaction it is building it will check that if the fee is more than the amount being sent + the change. 

This PR updates this behaviour to check if the fee being sent is more than just the amounts being send, ignoring the change. This prevents the case where a large UTXO that produces a lot of change will still allow a transaction to be sent where the outbound amount is less than the fee.
@stringhandler stringhandler merged commit 7011b09 into tari-project:development Jan 29, 2021
stringhandler added a commit that referenced this pull request Jan 29, 2021
Changes since v0.8.0

- [#2587](#2587) Correct block times
- [#2572](#2572) Fix console wallet runtime calls
- [#2559](#2559) Add Cucumber to CI
- [#2574](#2574) Update libwallet build for Github actions
- [#2583](#2583) Remove "add one to port" hack in console wallet
- [#2585](#2585) Move generated proto files to OUT_DIR
- [#2584](#2584) Update fee vs amount being sent validation
- [#2578](#2578) Fix submit block in integration test
- [#2576](#2576) Remove Ridcully references from Stibbons code
- [#2582](#2582) Remove generated proto files from tari_core
- [#2577](#2577) Fix for auotmated wallet startup
@stringhandler stringhandler mentioned this pull request Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants