balance subtraction bug , found in the movie :)

This commit is contained in:
romanman 2014-06-04 16:12:57 +03:00
parent e5e65b48d3
commit 8677b77def
1 changed files with 2 additions and 2 deletions

View File

@ -89,8 +89,8 @@ public class Wallet {
AccountState senderState = rows.get(Hex.toHexString(senderAddress));
if (senderState != null){
BigInteger value = new BigInteger(transaction.getValue());
senderState.addToBalance(value.negate());
BigInteger value = new BigInteger(-1, transaction.getValue());
senderState.addToBalance(value);
senderState.incrementNonce();
}