Preserve wallet signing keys across moves, imports and watch-only additions (#5308) * Preserve signing keys when moving accounts within the same wallet Validate same-wallet moves without erasing the entry just inserted. Exercise imported and deterministic keys through account_move, along with missing, watch-only, and locked entries. * Keep owned wallet keys when adding watch-only accounts Only create a watch entry if the key is absent. Verify wallet_add_watch preserves both an imported private key and a deterministic account. * Restore watch-only accounts from wallet backups Use the stored watch marker during import. Preserve existing signing keys and recover an imported signing key even when its plaintext is zero. * Restore signing access to watched seed accounts Restore each requested seed index directly. Upgrade matching watch entries, retain imported keys and keep the next allocation at the correct index. * Validate the entire account batch before moving wallet entries Prepare all destination entries in the wallet transaction before changing either wallet. Preserve both wallets when a missing or watch-only source account makes the move fail. * Add watched wallet accounts in a single validated batch Decode every address and validate all wallet keys before inserting any entries. Check the password and insert the full batch in one wallet write transaction. * Preserve existing signing keys and their derivation type on wallet import * Precache work for the current frontier of restored wallet accounts * Preserve existing signing entries when moving accounts between wallets * Keep representatives available across duplicate wallet entries Track each wallet that holds a representative while counting its weight once. Deduplicate keys after unlocking a usable signing key so a locked or watch-only copy cannot hide another wallet. * Replace wallet entries that cannot sign when restoring or allocating seed accounts Seed restore kept any nonzero entry, so key data the wallet cannot sign with stayed in place while its account was reported as restored. Allocating the next seed account skipped every index whose account existed, so a watched seed account never got its key. Move, import, seed restore and allocation now share one check: an entry the wallet can sign with keeps its type and cached work, anything else is replaced by the incoming signing entry. * Cover existing wallet entries in import, move and watch batch tests Import and move over a watch-only, an unusable, a seed and an imported destination entry, a source entry that cannot be read, a watch batch refused by a locked wallet or an invalid key, and a representative scan that meets a watch-only copy before the wallet holding the key. * Keep signing entries when creating an account at an explicit index Creating an account at an explicit seed index overwrote whatever the wallet held for that account. An imported key became a seed entry and lost its cached work, and the next seed change deleted it. The indexed insert now writes through the signing entry check and reports whether it wrote the entry or kept one the wallet can already sign with. Sequential allocation and seed restore are built on it, and the wallet logs which of the two happened.
__________
Type: commit
Hash: 6cde25d80efbbf68627f1a4dad3744632146be72
Created: yesterday
__________
gr0v1ty/nano-node:6cde25d80efbbf68627f1a4dad3744632146be72
| Test Case | Status | Duration | Median Deviation | Log | Graph |
|---|---|---|---|---|---|
| No test results available yet. Check the GitHub test run for job status and logs. | |||||