bulwark-crypto / Bulwark

The primary development repository for the Bulwark project
https://bulwarkcrypto.com/
MIT License
58 stars 57 forks source link

Wrong total amount of BWK when a transaction is pending #114

Closed DaanWillemsen closed 6 years ago

DaanWillemsen commented 6 years ago

Bulwark core version 2.0.0

User Story:

As a user I want to see the correct amount of BWK when a transaction is pending.

Description:

I send a certain amount of BWK to my wallet and noticed that during the 'pending' phase the total amount of BWK is not correctly shown.

Type: Bug

Reproduction:

  1. My current total is 1000 BWK
  2. I send 200 BWK over to my wallet.
  3. The amount of the new transaction is correctly shown in 'pending' under 'balances'.
  4. However the amount in 'available' under 'balances' is now wrong. It is less than what I before the new transaction.
  5. The amount under 'avaible' (previous + amount of new transaction) is correctly show again after the transaction gets some confirmations.

Expected behavior: As a user I want to see the correct amount of BWK when a transaction is pending.

dustinengle commented 6 years ago

Thank you for your time.

Available = The spendable balance. Pending = Transaction not yet confirmed doesn't count towards spendable balance.

This means that while the 200 BWK is pending (waiting to be included in the blockchain) it is not spendable and should not show up under the spendable balance. If the wallet treated the Pending amount as Available then the potential for a double spend now exists and will result in your wallet/node being flagged by its connected nodes and potentially banned, or etc.

I am closing this issue as it is the desired behavior.