Closed kkonevets closed 2 years ago
Hi! Please excuse me if I am wrong, but why do you use
let minimum_balance = Lamports(rent.minimum_balance(0));
instead of
let minimum_balance = Lamports(rent.minimum_balance(reserve_account.data_len()));
in here?
The point is to get the minimum rent for the reserve account to be alive. And the reserve_account.data_len() could be non zero.
reserve_account.data_len()
The reserve account doesn’t store any data, it only holds SOL, that’s why it’s data_len() is 0.
data_len()
Thanks
Hi! Please excuse me if I am wrong, but why do you use
instead of
in here?
The point is to get the minimum rent for the reserve account to be alive. And the
reserve_account.data_len()
could be non zero.