From: Ian Jackson Date: Thu, 12 Nov 2020 11:58:05 +0000 (+0000) Subject: minor tidying before move TokensRevealed X-Git-Tag: otter-0.2.0~536 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=97a29c7b7e3df5259c844cfab6f9bec0d1f68ab0;p=otter.git minor tidying before move TokensRevealed Signed-off-by: Ian Jackson --- diff --git a/src/accounts.rs b/src/accounts.rs index dae8b581..cbc277a6 100644 --- a/src/accounts.rs +++ b/src/accounts.rs @@ -64,8 +64,8 @@ pub struct AccountRecord { #[derive(Copy,Clone,Debug,Ord,PartialOrd,Eq,PartialEq)] #[derive(Serialize,Deserialize)] pub struct TokenRevelation { - pub latest: Timestamp, pub earliest: Timestamp, + pub latest: Timestamp, } //---------- errors ---------- diff --git a/src/bin/otter.rs b/src/bin/otter.rs index 9ddb23c7..abf77bed 100644 --- a/src/bin/otter.rs +++ b/src/bin/otter.rs @@ -359,7 +359,7 @@ fn connect(ma: &MainOpts) -> Conn { .with_context(||ma.socket_path.clone()).context("connect to server")?; let chan = MgmtChannel::new(unix)?; let mut chan = Conn { chan }; - chan.cmd(&MgmtCommand::SetAccount(ma.account.clone()))?; + chan.cmd(&MgmtCommand::SelectAccount(ma.account.clone()))?; chan } diff --git a/src/cmdlistener.rs b/src/cmdlistener.rs index 49605596..00c47ae4 100644 --- a/src/cmdlistener.rs +++ b/src/cmdlistener.rs @@ -128,7 +128,7 @@ fn execute(cs: &mut CommandStream, cmd: MgmtCommand) -> MgmtResponse { Fine } - SetAccount(wanted_account) => { + SelectAccount(wanted_account) => { let auth = authorise_scope_direct(cs, &wanted_account.scope)?; cs.account = Some(AccountSpecified { cooked: wanted_account.to_string(), diff --git a/src/commands.rs b/src/commands.rs index 7a7bd8cd..bd79d444 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -13,7 +13,7 @@ pub enum MgmtCommand { UpdateAccont(AccountDetails), DeleteAccount(AccountName), - SetAccount(AccountName), // success does not mean account exists + SelectAccount(AccountName), // success does not mean account exists CreateGame { game: InstanceName,