NebulousLabs / Sia

Blockchain-based marketplace for file storage. Project has moved to GitLab: https://gitlab.com/NebulousLabs/Sia
https://sia.tech
MIT License
2.71k stars 442 forks source link

Renter wallet transactions' impact on allowance #3118

Open MSevey opened 6 years ago

MSevey commented 6 years ago

Need to write tests in order to see how the renter's allowance and contract formation is impacted by other wallet transactions.

For example: Renter has 1000SC in wallet and sets allowance of 1000SC. After initial contracts are formed the renter sends SC to someone else.

MSevey commented 5 years ago

[WIP]

Scenarios To Check

Create Allowance Greater than Wallet Balance

Expected Behavior

The expected behavior would be that the allowance is not created as the renter does not have the funds available to see the allowance to the end of the period.

Discussion Points

Funds Transferred out of Wallet During Allowance Period

Example

If the renter starts with 5000SC in their wallet and creates an allowance of 5000SC. Then after the initial contracts are created, the renter transfers 2500SC to another wallet.

Expected Behavior

Contracts fail to be renewed.