-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from Electric-Coin-Company/add-missing-file
Add missing file
- Loading branch information
Showing
7 changed files
with
98 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: CI checks | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
name: Build on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build binary | ||
run: cargo build | ||
- name: Verify working directory is clean | ||
run: git diff --exit-code | ||
|
||
build-latest: | ||
name: Build latest on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
continue-on-error: true | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Remove lockfile to build with latest dependencies | ||
run: rm Cargo.lock | ||
- name: Build binary | ||
run: cargo build | ||
- name: Verify working directory is clean (excluding lockfile) | ||
run: git diff --exit-code ':!Cargo.lock' | ||
|
||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run Clippy | ||
uses: auguwu/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
working-directory: ${{ inputs.target }} | ||
deny: warnings | ||
|
||
fmt: | ||
name: Rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check formatting | ||
run: cargo fmt --all -- --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
use gumdrop::Options; | ||
|
||
use zcash_primitives::consensus::Parameters; | ||
|
||
use crate::{ | ||
data::{erase_wallet_state, get_wallet_seed_and_birthday}, | ||
remote::connect_to_lightwalletd, | ||
}; | ||
|
||
// Options accepted for the `reset` command | ||
#[derive(Debug, Options)] | ||
pub(crate) struct Command {} | ||
|
||
impl Command { | ||
pub(crate) async fn run( | ||
self, | ||
params: impl Parameters + 'static, | ||
wallet_dir: Option<String>, | ||
) -> Result<(), anyhow::Error> { | ||
// Connect to the client (for re-initializing the wallet). | ||
let client = connect_to_lightwalletd().await?; | ||
|
||
// Load the wallet seed and birthday from disk. | ||
let (seed, birthday) = get_wallet_seed_and_birthday(wallet_dir.as_ref())?; | ||
|
||
// Erase the wallet state (excluding key material). | ||
erase_wallet_state(wallet_dir.as_ref()).await; | ||
|
||
// Re-initialize the wallet state. | ||
super::init::Command::init_dbs(client, params, wallet_dir, seed, birthday.into()).await | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters