Skip to content

coin selection code does very badly in some cases #1643

@dooglus

Description

@dooglus

Take a look at transaction ce9c9afee7b3dd1deebdc49ceb1560d2771acb4cd0a4725042beecde726a3463.

He was trying to send 0.0011 BTC, and was charged 0.0445 in fees. That's a 4045% charge. According to the user, there were "a lot of better fitting inputs".

The coin selection code doesn't attempt to minimise fees. Perhaps it should.

The transaction spent the following outputs:

571 single satoshis, plus these 15 amounts which sum to 0.05559429:

0.00007550 0.00009679 0.00011887 0.00014177 0.00019014
0.00042293 0.00045708 0.00049249 0.00056730 0.00134063
0.00178897 0.00187366 0.00196149 0.01070019 0.03536648

If just the last of those 15 was used, the fee would have been either 0.0005 or 0.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions