Consolidate Nonce state under one struct (#8624)

automerge
This commit is contained in:
Trent Nelson
2020-03-04 09:51:48 -07:00
committed by GitHub
parent 8f60f1093a
commit 1cc7131bb7
12 changed files with 180 additions and 163 deletions

View File

@@ -3261,10 +3261,11 @@ mod tests {
// Nonced pay
let blockhash = Hash::default();
let data = nonce::state::Versions::new_current(nonce::State::Initialized(
nonce::state::Meta::new(&config.signers[0].pubkey()),
blockhash,
));
let data =
nonce::state::Versions::new_current(nonce::State::Initialized(nonce::state::Data {
authority: config.signers[0].pubkey(),
blockhash,
}));
let nonce_response = json!(Response {
context: RpcResponseContext { slot: 1 },
value: json!(RpcAccount::encode(
@@ -3288,10 +3289,11 @@ mod tests {
let bob_keypair = Keypair::new();
let bob_pubkey = bob_keypair.pubkey();
let blockhash = Hash::default();
let data = nonce::state::Versions::new_current(nonce::State::Initialized(
nonce::state::Meta::new(&bob_pubkey),
blockhash,
));
let data =
nonce::state::Versions::new_current(nonce::State::Initialized(nonce::state::Data {
authority: bob_pubkey,
blockhash,
}));
let nonce_authority_response = json!(Response {
context: RpcResponseContext { slot: 1 },
value: json!(RpcAccount::encode(