Reject close of active vote accounts (backport #22651) (#22896)

* Reject close of active vote accounts (#22651)

* 10461 Reject close of vote accounts unless it earned no credits in the previous epoch. This is checked by comparing current epoch (from clock sysvar) with the most recent epoch with credits in vote state.

(cherry picked from commit 75563f6c7b)

# Conflicts:
#	programs/vote/src/vote_processor.rs
#	sdk/src/feature_set.rs

* Resolve merge conflicts

Co-authored-by: Will Hickey <csu_hickey@yahoo.com>
Co-authored-by: Will Hickey <will.hickey@solana.com>
This commit is contained in:
mergify[bot]
2022-02-03 19:59:07 +00:00
committed by GitHub
parent 69e207ca58
commit 643442e830
9 changed files with 867 additions and 17 deletions

View File

@@ -113,6 +113,7 @@ enum InstructionErrorType {
UNSUPPORTED_SYSVAR = 48;
ILLEGAL_OWNER = 49;
ACCOUNTS_DATA_BUDGET_EXCEEDED = 50;
ACTIVE_VOTE_ACCOUNT_CLOSE = 51;
}
message UnixTimestamp {