Skip to content

Commit

Permalink
use local proxy for web
Browse files Browse the repository at this point in the history
  • Loading branch information
ec2 committed Sep 13, 2024
1 parent 182ee1b commit fb6eb06
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@ alias cw := check-wasm
check-wasm:
cargo check --no-default-features --features="wasm-parallel,no-bundler" --target=wasm32-unknown-unknown

# run a local proxy to the lightwalletd server on port 443
run-proxy:
grpcwebproxy --backend_max_call_recv_msg_size=10485760 --server_http_max_write_timeout=1000s --server_http_max_read_timeout=1000s \
--backend_addr=zec.rocks:443 --run_tls_server=false --backend_tls --allow_all_origins --server_http_debug_port 443
# run a local proxy to the lightwalletd server on port 443
run-test-proxy:
grpcwebproxy --backend_max_call_recv_msg_size=10485760 --server_http_max_write_timeout=1000s --server_http_max_read_timeout=1000s \
--backend_addr=testnet.zec.rocks:443 --run_tls_server=false --backend_tls --allow_all_origins --server_http_debug_port 443
2 changes: 1 addition & 1 deletion src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ where
self.db.put_blocks(
&chainstate,
blocks
.into_iter()
.into_par_iter()
.map(|compact_block| {
scan_block(
&self.network,
Expand Down
2 changes: 1 addition & 1 deletion tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async fn test_get_and_scan_range() {
#[cfg(all(feature = "wasm-parallel"))]
init_threadpool(THREADS).await;

let mut w = WebWallet::new("test", "https://zcash-testnet.chainsafe.dev", 1).unwrap();
let mut w = WebWallet::new("test", "http://localhost:443", 1).unwrap();
is_sync::<WebWallet>();
is_send::<WebWallet>();
let id = w.create_account(SEED, HD_INDEX, BIRTHDAY).await.unwrap();
Expand Down

0 comments on commit fb6eb06

Please sign in to comment.