electrum icon indicating copy to clipboard operation
electrum copied to clipboard

Send only confirmed coins ?

Open bsbits opened this issue 9 years ago • 11 comments

I would like to know if it is possible to send coins from confirmed parent transactions only and exclude unconfirmed ones.

If it is possible, how can I do it via command line ?

bsbits avatar May 07 '17 02:05 bsbits

Electrum already prioritizes confirmed utxos over all else.

You mean you want it to return an error and fail sending if the send amount is over the total of confirmed utxos amounts?

dabura667 avatar May 07 '17 06:05 dabura667

Correct.

Also if there is a way to get the confirmed bitcoins then send them all while excluding unconfirmed transaction.

Alternatively, using "Max" feature when sending but exclude unconfirmed transactions.

bsbits avatar May 07 '17 14:05 bsbits

I took a peek at the source code, and it's doable. You would need to pass an boolean arg through like 5 nested methods, but it's doable.

Currently the source can not do as you ask via CLI.

In GUI mode you can use coin control to manually select the utxos.

dabura667 avatar May 07 '17 16:05 dabura667

I will actually use the GUI to spend coins.

So the solution is enabling coin table and select the address / addresses to spend from ?

bsbits avatar May 08 '17 01:05 bsbits

The only solution I came up with is using command line to list an export addresses with no pending transactions and use the GUI to select them

bsbits avatar May 09 '17 14:05 bsbits

reopening. I think it would be useful to have that as an option.

ecdsa avatar May 10 '17 12:05 ecdsa

In my recent experience, Electrum picked coins from an unconfirmed transaction with priority. It would be good to have some control over this.

janhn avatar May 26 '17 10:05 janhn

If @ecdsa can craft us something on the next release, it will be perfect.

bsbits avatar May 29 '17 18:05 bsbits

currently, miners do not take coin age into account in order to decide transaction priority. Thus, the only reason not to use the 'privacy' policy is that it uses unconfirmed inputs. The correct way to fix that is to have a single policy, that prioritizes confirmed inputs and then behaves like the current privacy coin chooser.

ecdsa avatar Jul 01 '17 07:07 ecdsa

then we can remove the policy selector from the GUI, and replace it with an option to send only confirmed inputs.

ecdsa avatar Jul 01 '17 07:07 ecdsa

I added the option, but I did not remove the coin selection policy choice; the privacy policy must first be fixed, so that it prioritizes confirmed inputs, when the option is disabled.

ecdsa avatar Jul 03 '17 06:07 ecdsa