Skip to content

test: add CreateParams / LoadParams wallet constructor smoke coverage - #136

Open
Johnosezele wants to merge 2 commits into
bitcoindevkit:mainfrom
Johnosezele:test/create-load-params-smoke
Open

Johnosezele wants to merge 2 commits into
bitcoindevkit:mainfrom
Johnosezele:test/create-load-params-smoke

Conversation

@Johnosezele

Copy link
Copy Markdown
Collaborator

Summary

  • add offline smoke coverage for the generated CreateParams / LoadParams wallet constructors
  • construct through Wallet.createWithParams and Wallet.createSingleWithParams
  • persist staged derivation state, dispose the wallet and persister, and reopen through Wallet.loadWithParams and Wallet.loadSingleWithParams
  • assert the reloaded wallets expose a usable network and can peek an address

Closes #135

Why

Existing tests cover Wallet(...), Wallet.createSingle, and Wallet.load. They do not call the *WithParams constructors added in bdk-ffi v3.1.0. This only proves those Dart binding paths are callable and that the returned wallets lift into usable objects.

@Johnosezele
Johnosezele force-pushed the test/create-load-params-smoke branch from f33af76 to 702b439 Compare September 16, 2026 20:30

@j-kon j-kon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new smoke tests look great!

Since both tests already call revealNextAddress(keychain: KeychainKind.external_) before persisting to SQLite, we could also verify that the persisted derivation state survived the reload by asserting the reloaded wallet's derivation index:

expect(
  reopenedWallet.derivationIndex(keychain: KeychainKind.external_),
  equals(0),
);

Tested locally against Wallet.loadWithParams and Wallet.loadSingleWithParams and it passes cleanly.

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.

test: add CreateParams / LoadParams wallet constructor smoke coverage

2 participants