Commit a9e3ca0e authored by linj's avatar linj

fix withdraw terminated unfreeze

parent c8e83a73
......@@ -81,6 +81,9 @@ func (opt *leftProportion) calcFrozen(unfreeze *pty.Unfreeze, now int64) (int64,
}
func withdraw(unfreeze *pty.Unfreeze, frozen int64) (*pty.Unfreeze, int64) {
if unfreeze.Remaining == 0 {
return unfreeze, 0
}
amount := unfreeze.Remaining - frozen
unfreeze.Remaining = frozen
return unfreeze, amount
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment