mirror of
https://github.com/SimplexDevelopment/FreedomNetworkSuite.git
synced 2024-11-22 08:54:59 +00:00
Add method for directly setting a transaction's balance
This commit is contained in:
parent
cd5c42801d
commit
0429604737
@ -53,4 +53,10 @@ public class SimpleTransaction implements Transaction
|
|||||||
{
|
{
|
||||||
return this.addBalance(-amount);
|
return this.addBalance(-amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setBalance(long newBalance)
|
||||||
|
{
|
||||||
|
balance.set(newBalance);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,4 +13,6 @@ public interface Transaction
|
|||||||
long addBalance(final long amount);
|
long addBalance(final long amount);
|
||||||
|
|
||||||
long removeBalance(final long amount);
|
long removeBalance(final long amount);
|
||||||
|
|
||||||
|
void setBalance(final long newBalance);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user