system-program: Remove zero lamport check on transfers (backport #17726) (#17763)

* system-program: Remove zero lamport check on transfers (#17726)

* system-program: Move lamports == 0 check on transfers

* Address feedback

* Update stake split to explicitly allocate + assign

* Update stake tests referring to split instruction

* Revert whitespace

* Update split instruction index in test

* Remove unnecessary `assign_with_seed` from `split_with_seed`

* Fix stake instruction parser

* Update test to allow splitting into account with lamports

(cherry picked from commit 8f5e773caf)

# Conflicts:
#	runtime/src/system_instruction_processor.rs
#	sdk/src/feature_set.rs

* Resolve merge conflicts

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
This commit is contained in:
mergify[bot]
2021-06-07 12:55:57 +00:00
committed by GitHub
parent a29344e681
commit b777bbf7db
6 changed files with 59 additions and 46 deletions

View File

@@ -1289,7 +1289,7 @@ mod tests {
)); // Same recipient, same lockups
}
const SET_LOCKUP_INDEX: usize = 4;
const SET_LOCKUP_INDEX: usize = 5;
#[test]
fn test_set_stake_lockup() {