Skip to content

Commit 7aff618

Browse files
committed
proxy paths
1 parent 64bcffe commit 7aff618

File tree

4 files changed

+29
-7
lines changed

4 files changed

+29
-7
lines changed

dynamic.yml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
http:
22
routers:
3-
routerTest:
4-
service: srv-grpc
5-
rule: Host(`localhost`)
3+
routerMainnet:
4+
service: srv-grpc-mainnet
5+
rule: PathPrefix(`/mainnet`)
66
middlewares:
7+
- strip-network-prefix
8+
- "test-grpc-web"
9+
entryPoints:
10+
- web
11+
12+
routerTestnet:
13+
service: srv-grpc-testnet
14+
rule: PathPrefix(`/testnet`)
15+
middlewares:
16+
- strip-network-prefix
717
- "test-grpc-web"
818
entryPoints:
919
- web
@@ -13,8 +23,20 @@ http:
1323
grpcWeb:
1424
allowOrigins:
1525
- "*"
26+
27+
strip-network-prefix:
28+
stripPrefix:
29+
prefixes:
30+
- "/mainnet"
31+
- "/testnet"
32+
1633
services:
17-
srv-grpc:
34+
srv-grpc-mainnet:
35+
loadBalancer:
36+
servers:
37+
- url: https://zec.rocks:443
38+
39+
srv-grpc-testnet:
1840
loadBalancer:
1941
servers:
2042
- url: https://testnet.zec.rocks:443

src/wallet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const PRUNING_DEPTH: usize = 100;
5151

5252
fn is_sync<T: Sync>() {}
5353
fn is_send<T: Send>() {}
54-
const BATCH_SIZE: u32 = 3000;
54+
const BATCH_SIZE: u32 = 10000;
5555

5656
/// # A Zcash wallet
5757
///

tests/message-board-sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async fn test_message_board() {
2525
let _ = wasm_bindgen_futures::JsFuture::from(wasm_bindgen_rayon::init_thread_pool(10)).await;
2626
let main_handler = thread::Builder::new()
2727
.spawn_async(|| async {
28-
let mut w = WebWallet::new("main", "http://localhost:1234", 1).unwrap();
28+
let mut w = WebWallet::new("main", "http://localhost:1234/mainnet", 1).unwrap();
2929

3030
let s = zcash_keys::encoding::decode_extended_full_viewing_key(
3131
constants::mainnet::HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY,

tests/simple-sync-and-send.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ async fn test_get_and_scan_range() {
3838
assert!(!thread::is_web_worker_thread());
3939
let main_handler = thread::Builder::new().spawn_async(|| async {
4040
assert!(thread::is_web_worker_thread());
41-
let mut w = WebWallet::new("test", "http://localhost:1234", 1).unwrap();
41+
let mut w = WebWallet::new("test", "http://localhost:1234/testnet", 1).unwrap();
4242

4343
let id = w.create_account(SEED, HD_INDEX, BIRTHDAY).await.unwrap();
4444
tracing::info!("Created account with id: {}", id);

0 commit comments

Comments
 (0)