Note this is a modified backport that does not SAVE the new fields, but does load them. (#24074)

Original:
Start saving/loading prior_roots(_with_hash) to snapshot (#23844)

    * Start saving/loading prior_roots(_with_hash) to snapshot

    * Update runtime/src/accounts_index.rs

    Co-authored-by: Michael Vines <mvines@gmail.com>

    * Update runtime/src/accounts_index.rs

    Co-authored-by: Michael Vines <mvines@gmail.com>

    * update comment

    Co-authored-by: Michael Vines <mvines@gmail.com>
    (cherry picked from commit 396b49a7c1)

Co-authored-by: Jeff Washington (jwash) <wash678@gmail.com>
This commit is contained in:
mergify[bot]
2022-04-02 17:22:33 +00:00
committed by GitHub
parent f2f20af768
commit b157a9111f
2 changed files with 17 additions and 3 deletions

View File

@ -12,6 +12,7 @@ where
let result = T::deserialize(d);
match result {
Err(err) if err.to_string() == "io error: unexpected end of file" => Ok(T::default()),
Err(err) if err.to_string() == "io error: failed to fill whole buffer" => Ok(T::default()),
result => result,
}
}