[QT] Don't ask for a passphrase to getnewaddress.#2904
Conversation
|
So, the design choices here were to reuse or prompt when the keypool ran dry. Reuse has the advantage that the behavior would never change even when the pool empties, but it would reuse a previously assigned address, which is really surprising. There would also be an option to reuse after prompting if the wallet didn't unlock. Codeshark, said prompt on empty. I agree. If someone wants to reuse when they don't have the key— the list is there. I tested this by starting up with an encrypted wallet and hitting new address until the keypool ran out and it promoted me. I dismissed the dialog and retried a few times before finally letting it unlock and confirming it worked as expected. |
|
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/0eb506a01a32cc78609ee9071b0d5302488496ec for binaries and test log. |
|
I took a quick look at Code looks good and does what it sais, no need to enter the passphrase when requesting a new receiving address. |
|
@Diapolo Good observation on default, I hadn't thought to check to find out if that were the last user of it. |
|
Good change. Agree with @Diapolo with regard to default key and allow reuse. |
|
AFAIK GetKeyFromPool() is now true at least once after paymentrequest pull was merged. Can you guys have a look into if this makes sense. |
With an encrypted wallet the GUI was prompting for a passphrase every time the user requested a new address. This is unnecessary, increases the exposure to keyboard sniffers, and discourages using fresh addresses for every transaction. Instead only prompt for a passphrase when the keypool runs out, also call the new address function with the flag that prevents reuse. Thanks to AlexNagy on IRC for pointing this out and who wouldn't take any lip from a curmudgeonly developer and insisted on what he knew to be true.
With the GUI password fix this was always false.
|
fAllowReuse gone and rebased post paymentrequests so I could remove the flag there too. |
|
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/71ac5052d83fcba21a09e5e2b7ad66faea6bd42a for binaries and test log. |
|
ACK |
|
ACK core changes. |
[QT] Don't ask for a passphrase to getnewaddress.
…#2904) * Move code to write archived ISLOCKs into its own method We'll need this from another method as well later. * Return ISLOCK instead of conflicting txid in GetConflictingTx/GetConflictingLock * Implement GetInstantSendLocksByParent and RemoveChainedInstantSendLocks These allow to easily delete multiple chains (actually trees) of ISLOCKs in one go. * Implement RemoveConflictedTx and call it from RemoveMempoolConflictsForLock Also add "retryChildren" parameter to RemoveNonLockedTx so that we can skip retrying of non-locked children TXs. * Properly handle/remove conflicted TXs (between mempool and new blocks) * Track non-locked TXs by inputs * Implement and call ResolveBlockConflicts * Also call ResolveBlockConflicts from ConnectBlock But only when a block is known to have a conflict and at the same time is ChainLocked, which causes the ISLOCK to be pruned. * Split out RemoveChainLockConflictingLock from ResolveBlockConflicts * Implement "quorum getrecsig" RPC * Include decoded TX data in result of create_raw_tx * Implement support for CLSIG in mininode.py * Fix condition for update of nonLockedTxs.pindexMined * Only add entries to nonLockedTxsByInputs when AddNonLockedTx is called for the first time * Implement support for ISLOCK in mininode.py * Implement tests for ChainLock vs InstantSend lock conflict resolution * Handle review comment Bail out (continue) early
With an encrypted wallet the GUI was prompting for a passphrase every time
the user requested a new address. This is unnecessary, increases the
exposure to keyboard sniffers, and discourages using fresh addresses for
every transaction.
Instead only prompt for a passphrase when the keypool runs out, also call
the new address function with the flag that prevents reuse.