3
0
mirror of https://github.com/Qortal/AT.git synced 2025-01-30 10:52:14 +00:00

MachineState's initial previousBalance is set to AT's balance at deployment

This commit is contained in:
catbref 2020-04-07 17:00:01 +01:00
parent d22e16e033
commit 18f679e6eb

View File

@ -237,7 +237,7 @@ public class MachineState {
this.frozenBalance = null; this.frozenBalance = null;
this.isFinished = false; this.isFinished = false;
this.hadFatalError = false; this.hadFatalError = false;
this.previousBalance = 0; this.previousBalance = this.api.getCurrentBalance(this); // Initial previousBalance is deployment balance
// If we have a minimum activation amount then create AT in frozen state, requiring that amount to unfreeze. // If we have a minimum activation amount then create AT in frozen state, requiring that amount to unfreeze.
// If creator also sends funds with creation then AT will unfreeze on first call. // If creator also sends funds with creation then AT will unfreeze on first call.
@ -409,8 +409,7 @@ public class MachineState {
this.currentBalance = currentBalance; this.currentBalance = currentBalance;
} }
// For FunctionCode use public long getPreviousBalance() {
/* package */ long getPreviousBalance() {
return this.previousBalance; return this.previousBalance;
} }