Fold bank serialisation into serde snapshot (#10581)

* Move bank (de)serialisation logic from bank and snapshot_utils to serde_snapshot.
Add sanity assertions between genesis config and bank fields on deserialisation.
Atomically update atomic bool in quote_for_specialization_detection().
Use same genesis config when restoring snapshots in test cases.

* Tidy up namings and duplicate structs to version

* Apply struct renames to tests

* Update abi hashes

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
This commit is contained in:
Kristofer Peterson
2020-07-13 15:00:59 +01:00
committed by GitHub
parent 5c86766fb2
commit ed5a2f2a90
13 changed files with 805 additions and 204 deletions

View File

@ -38,7 +38,9 @@ pub fn create_genesis<T: Client>(from: &Keypair, client: &T, amount: u64) -> Key
let instruction = librapay_instruction::genesis(&genesis.pubkey(), amount);
let message = Message::new(&[instruction], Some(&from.pubkey()));
client.send_and_confirm_message(&[from, &genesis], message).unwrap();
client
.send_and_confirm_message(&[from, &genesis], message)
.unwrap();
genesis
}