Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Add MIN_REMAINING_BALANCE static property in the base transaction, and verify after updating the account #4848

Closed
shuse2 opened this issue Feb 17, 2020 · 1 comment · Fixed by #4880 or #4898
Assignees
Milestone

Comments

@shuse2
Copy link
Collaborator

shuse2 commented Feb 17, 2020

Description

With the new dynamic fee system, MIN_REMAINING_BALANCE should be adjustable.
It should add MIN_REMAINING_BALANCE a static property in the base transaction, and after subtracting balance from the sender, it should check against this MIN_REMAINING_BALANCE

Motivation

Motivation is described in https://github.com/LiskHQ/lips/blob/master/proposals/lip-0025.md

Acceptance Criteria

  • The base transaction should have this property set to 500000 Beddow in bigint as a static property

  • When subtracting fee from sender account in the apply step, it should check if the remaining balance is equal or greater than specified MIN_REMAINING_BALANCE

  • Test base transaction where sender balance is the same amount as minimum balance

  • Test base transaction where sender balance is below the MIN_REMAINING_BALANCE

  • Test base transaction where sender balance is above the MIN_REMAINING_BALANCE

  • When recipient exists in transaction (only type 8), check resulting balance is is equal or greater than specified MIN_REMAINING_BALANCE

  • Test transfer transaction where recipient resulting balance is below the MIN_REMAINING_BALANCE

Related issues

#4837

@sridharmeganathan sridharmeganathan added this to the Next Sprint milestone Feb 24, 2020
@nazarhussain nazarhussain changed the title Add minBalance property in the base transaction, and verify when updating the account Add MIN_REMAINING_BALANCE static property in the base transaction, and verify after updating the account Feb 25, 2020
shuse2 added a commit that referenced this issue Feb 27, 2020
Add MIN_REMAINING_BALANCE static property in the base transaction, and verify after updating the account - Closes #4848
@shuse2 shuse2 reopened this Feb 29, 2020
@shuse2
Copy link
Collaborator Author

shuse2 commented Feb 29, 2020

Reopened and added 2 missing points

  • When recipient exists in transaction (only type 8), check resulting balance is is equal or greater than specified MIN_REMAINING_BALANCE
  • Test transfer transaction where recipient resulting balance is below the MIN_REMAINING_BALANCE

@shuse2 shuse2 self-assigned this Mar 2, 2020
shuse2 added a commit that referenced this issue Mar 3, 2020
Add min balance check for recipient - Closes #4848
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.