make accounts_db own the directory paths (#5230)
* change paths to something accounts_db (the singleton) owns, fixes SIGILL * fail deserialize if paths don't work serialize paths, too * test that paths are populated from a bank snapshot
This commit is contained in:
@@ -2750,10 +2750,7 @@ mod tests {
|
||||
let mut rdr = Cursor::new(&buf[..]);
|
||||
let mut dbank: Bank = deserialize_from(&mut rdr).unwrap();
|
||||
let mut reader = BufReader::new(&buf[rdr.position() as usize..]);
|
||||
dbank.set_bank_rc(
|
||||
&BankRc::new(Some(bank0.accounts().paths.clone()), 0),
|
||||
&StatusCacheRc::default(),
|
||||
);
|
||||
dbank.set_bank_rc(&BankRc::new(None, 0), &StatusCacheRc::default());
|
||||
assert!(dbank.rc.update_from_stream(&mut reader).is_ok());
|
||||
assert_eq!(dbank.get_balance(&key.pubkey()), 10);
|
||||
bank.compare_bank(&dbank);
|
||||
|
Reference in New Issue
Block a user