Skip to content

Simulate subaddress generate duplication - #61

Open
napoly wants to merge 1 commit into
btcpay-monero:masterfrom
napoly:simulate-subaddress-duplicate-key-violation
Open

Simulate subaddress generate duplication#61
napoly wants to merge 1 commit into
btcpay-monero:masterfrom
napoly:simulate-subaddress-duplicate-key-violation

Conversation

@napoly

@napoly napoly commented Nov 24, 2025

Copy link
Copy Markdown
Member

This PR simulates the duplicate key value violates unique constraint "PK_AddressInvoices" from #57

High level steps:

  1. test EnableMoneroPluginSuccessfully creates a view wallet and generates an invoice (subaddress)
  2. once test runs successfully the wallet is closed and view_wallet with view_wallet.keys are removed..
  3. test EnableMoneroPluginSuccessfullySecond runs creating the same view wallet and tries to generate an invoice but it fails as this subaddress violates the unique constrain on db https://github.com/btcpay-monero/btcpayserver-monero-plugin/actions/runs/19635416708/job/56224799919?pr=61#step:9:2238

Wanted behavior:

A unique subaddress should be generated under all circumstances.

@napoly
napoly force-pushed the simulate-subaddress-duplicate-key-violation branch 2 times, most recently from 9b132b9 to 2cfc4ed Compare November 26, 2025 11:28
@napoly
napoly force-pushed the simulate-subaddress-duplicate-key-violation branch from 2cfc4ed to 70f516d Compare April 1, 2026 21:19
@codacy-production

codacy-production Bot commented Apr 1, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 21 critical · 1 medium

Alerts:
⚠ 22 issues (≤ 0 issues of at least minor severity)

Results:
22 new issues

Category Results
BestPractice 1 medium
ErrorProne 21 critical

View in Codacy

🟢 Metrics 0 complexity · 2 duplication

Metric Results
Complexity 0
Duplication 2

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@napoly
napoly force-pushed the simulate-subaddress-duplicate-key-violation branch 6 times, most recently from 2105ded to 6874ede Compare April 3, 2026 10:06
@napoly
napoly force-pushed the simulate-subaddress-duplicate-key-violation branch from 6874ede to d35783c Compare April 3, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant