Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- fixed: Disabled decoy address routines for performance reasons.

## 4.65.0 (2025-11-18)

- changed: Upgrade react-native-zcash to v0.10.0
Expand Down
38 changes: 21 additions & 17 deletions src/ethereum/EthereumEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ import { RpcAdapter } from './networkAdapters/RpcAdapter'
// How long to wait before the next scheduled sync
const SYNC_NETWORK_INTERVAL = 20000
const DECOY_ADDRESS_GEN_DELAY_MS = 10000
// Temporarily disable decoy address functionality
const DECOY_ADDRESSES_ENABLED = false

export class EthereumEngine extends CurrencyEngine<
EthereumTools,
Expand Down Expand Up @@ -811,24 +813,26 @@ export class EthereumEngine extends CurrencyEngine<
this.ethNetwork.start()

// Start decoy address generation background routine if needed
const decoyAddressConfig = this.networkInfo.decoyAddressConfig
if (decoyAddressConfig != null) {
if (this.decoyAddressCount < decoyAddressConfig.count) {
this.addToLoop(
'generateDecoyAddress',
DECOY_ADDRESS_GEN_DELAY_MS,
async () => {
// Find a decoy address.
await this.findDecoyAddress(decoyAddressConfig)

if (this.decoyAddressCount >= decoyAddressConfig.count) {
// Merge and re-subscribe addresses.
await this.mergePendingDecoyAddresses()
// End the loop after merging pending decoy addresses.
this.removeFromLoop('generateDecoyAddress')
if (DECOY_ADDRESSES_ENABLED) {
const decoyAddressConfig = this.networkInfo.decoyAddressConfig
if (decoyAddressConfig != null) {
if (this.decoyAddressCount < decoyAddressConfig.count) {
this.addToLoop(
'generateDecoyAddress',
DECOY_ADDRESS_GEN_DELAY_MS,
async () => {
// Find a decoy address.
await this.findDecoyAddress(decoyAddressConfig)

if (this.decoyAddressCount >= decoyAddressConfig.count) {
// Merge and re-subscribe addresses.
await this.mergePendingDecoyAddresses()
// End the loop after merging pending decoy addresses.
this.removeFromLoop('generateDecoyAddress')
}
}
}
)
)
}
}
}

Expand Down
Loading