make bank commit_credits non public (#4944)

* make bank commit_credits non pub

* track down create() failure

* move bank_client to process_transaction(), which commits credits
This commit is contained in:
Rob Walker
2019-07-08 15:37:54 -07:00
committed by GitHub
parent bb6bcd79c0
commit eb4edd75e6
4 changed files with 29 additions and 19 deletions

View File

@@ -92,7 +92,15 @@ impl AppendVec {
.write(true)
.create(create)
.open(file)
.expect("Unable to open data file");
.map_err(|e| {
panic!(
"Unable to {} data file {}, err {:?}",
if create { "create" } else { "open" },
file.display(),
e
);
})
.unwrap();
data.seek(SeekFrom::Start((size - 1) as u64)).unwrap();
data.write_all(&[0]).unwrap();