Ensure that the spl-token 2 native mint account is owned by the spl-token 2 program.
Workaround for https://github.com/solana-labs/solana-program-library/issues/374 until spl-token 3 is shipped
This commit is contained in:
committed by
mergify[bot]
parent
53a900a28c
commit
7341e60043
@ -96,7 +96,9 @@ solana_sdk::pubkeys!(
|
||||
mod tests {
|
||||
use super::*;
|
||||
use solana_sdk::{
|
||||
account::Account, epoch_schedule::EpochSchedule, genesis_config::GenesisConfig,
|
||||
account::Account,
|
||||
epoch_schedule::EpochSchedule,
|
||||
genesis_config::{GenesisConfig, OperatingMode},
|
||||
};
|
||||
use solana_stake_program::stake_state::{Authorized, Lockup, Meta, StakeState};
|
||||
use std::{collections::BTreeMap, sync::Arc};
|
||||
@ -147,6 +149,7 @@ mod tests {
|
||||
let genesis_config = GenesisConfig {
|
||||
accounts,
|
||||
epoch_schedule: EpochSchedule::new(slots_per_epoch),
|
||||
operating_mode: OperatingMode::Stable,
|
||||
..GenesisConfig::default()
|
||||
};
|
||||
let mut bank = Arc::new(Bank::new(&genesis_config));
|
||||
|
@ -2873,7 +2873,7 @@ pub mod tests {
|
||||
let largest_accounts: Vec<RpcAccountBalance> =
|
||||
serde_json::from_value(json["result"]["value"].clone())
|
||||
.expect("actual response deserialization");
|
||||
assert_eq!(largest_accounts.len(), 19);
|
||||
assert_eq!(largest_accounts.len(), 20);
|
||||
|
||||
// Get Alice balance
|
||||
let req = format!(
|
||||
@ -2910,7 +2910,7 @@ pub mod tests {
|
||||
let largest_accounts: Vec<RpcAccountBalance> =
|
||||
serde_json::from_value(json["result"]["value"].clone())
|
||||
.expect("actual response deserialization");
|
||||
assert_eq!(largest_accounts.len(), 18);
|
||||
assert_eq!(largest_accounts.len(), 19);
|
||||
let req = r#"{"jsonrpc":"2.0","id":1,"method":"getLargestAccounts","params":[{"filter":"nonCirculating"}]}"#;
|
||||
let res = io.handle_request_sync(&req, meta);
|
||||
let json: Value = serde_json::from_str(&res.unwrap()).unwrap();
|
||||
@ -4906,7 +4906,7 @@ pub mod tests {
|
||||
.expect("actual response deserialization");
|
||||
let accounts: Vec<RpcKeyedAccount> =
|
||||
serde_json::from_value(result["result"].clone()).unwrap();
|
||||
assert_eq!(accounts.len(), 3);
|
||||
assert_eq!(accounts.len(), 4);
|
||||
|
||||
// Test returns only mint accounts
|
||||
let req = format!(
|
||||
|
@ -386,7 +386,7 @@ mod tests {
|
||||
use solana_runtime::{
|
||||
bank::Bank, bank_forks::CompressionType, snapshot_utils::SnapshotVersion,
|
||||
};
|
||||
use solana_sdk::signature::Signer;
|
||||
use solana_sdk::{genesis_config::OperatingMode, signature::Signer};
|
||||
use std::net::{IpAddr, Ipv4Addr};
|
||||
|
||||
#[test]
|
||||
@ -438,7 +438,10 @@ mod tests {
|
||||
}
|
||||
|
||||
fn create_bank_forks() -> Arc<RwLock<BankForks>> {
|
||||
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(10_000);
|
||||
let GenesisConfigInfo {
|
||||
mut genesis_config, ..
|
||||
} = create_genesis_config(10_000);
|
||||
genesis_config.operating_mode = OperatingMode::Stable;
|
||||
let bank = Bank::new(&genesis_config);
|
||||
Arc::new(RwLock::new(BankForks::new(bank)))
|
||||
}
|
||||
|
Reference in New Issue
Block a user