Update project to use new account serialization format (#5848)

This commit is contained in:
Parth
2019-09-10 04:47:10 +05:30
committed by Michael Vines
parent 9dc5da7dbd
commit 468095ede2
7 changed files with 36 additions and 13 deletions

View File

@ -9,8 +9,10 @@ use crate::bench::{
do_bench_tps, generate_and_fund_keypairs, generate_keypairs, Config, NUM_LAMPORTS_PER_ACCOUNT,
};
use solana_core::gossip_service::{discover_cluster, get_multi_client};
use solana_genesis::PrimordialAccountDetails;
use solana_sdk::fee_calculator::FeeCalculator;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::system_program;
use std::collections::HashMap;
use std::fs::File;
use std::io::prelude::*;
@ -55,7 +57,12 @@ fn main() {
keypairs.iter().for_each(|keypair| {
accounts.insert(
serde_json::to_string(&keypair.to_bytes().to_vec()).unwrap(),
num_lamports_per_account,
PrimordialAccountDetails {
balance: num_lamports_per_account,
executable: false,
owner: system_program::id().to_string(),
data: String::new(),
},
);
});