New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent multiple calls to CWallet::AvailableCoins #7649

Merged
merged 1 commit into from Mar 23, 2016

Conversation

Projects
None yet
7 participants
@promag
Member

promag commented Mar 8, 2016

CWallet::CreateTransaction goes through several iterations to select the best coins and fee to fulfil the request. In each iteration the set of available coins is computed.

This PR moves the computation of available coins to the begin and reuses it in each iteration.

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Mar 8, 2016

Member

Nice!
utACK d9668e7b87a34c7b8100a565a6ebd991cf03ef26.

Makes sense because in master, the current repetitive calls to SelectCoins() are locked with cs_main and cs_wallet. During the loops its impossible to have a different AvailableCoins set.

Member

jonasschnelli commented Mar 8, 2016

Nice!
utACK d9668e7b87a34c7b8100a565a6ebd991cf03ef26.

Makes sense because in master, the current repetitive calls to SelectCoins() are locked with cs_main and cs_wallet. During the loops its impossible to have a different AvailableCoins set.

@MarcoFalke

This comment has been minimized.

Show comment
Hide comment
@MarcoFalke

MarcoFalke Mar 8, 2016

Member

utACK d9668e7

Member

MarcoFalke commented Mar 8, 2016

utACK d9668e7

@sipa

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa Mar 9, 2016

Member

ACK

Member

sipa commented Mar 9, 2016

ACK

@laanwj

View changes

Show outdated Hide outdated src/wallet/wallet.cpp
@jtimon

This comment has been minimized.

Show comment
Hide comment
@jtimon

jtimon Mar 16, 2016

Member

utACK besides @laanwj 's nit.

Member

jtimon commented Mar 16, 2016

utACK besides @laanwj 's nit.

@promag

This comment has been minimized.

Show comment
Hide comment
@promag

promag Mar 22, 2016

Member

@laanwj fixed nit and rebased.

Member

promag commented Mar 22, 2016

@laanwj fixed nit and rebased.

@morcos

This comment has been minimized.

Show comment
Hide comment
@morcos

morcos Mar 22, 2016

Member

utACK bb16c88

i like it!

Member

morcos commented Mar 22, 2016

utACK bb16c88

i like it!

@laanwj laanwj merged commit bb16c88 into bitcoin:master Mar 23, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Mar 23, 2016

Merge #7649: Prevent multiple calls to CWallet::AvailableCoins
bb16c88 Prevent multiple calls to CWallet::AvailableCoins (João Barbosa)

@ruimarinho ruimarinho deleted the uphold:enhancement/prevent-multiple-calls-availablecoins branch Mar 28, 2016

codablock added a commit to codablock/dash that referenced this pull request Sep 16, 2017

Merge #7649: Prevent multiple calls to CWallet::AvailableCoins
bb16c88 Prevent multiple calls to CWallet::AvailableCoins (João Barbosa)

codablock added a commit to codablock/dash that referenced this pull request Sep 19, 2017

Merge #7649: Prevent multiple calls to CWallet::AvailableCoins
bb16c88 Prevent multiple calls to CWallet::AvailableCoins (João Barbosa)

codablock added a commit to codablock/dash that referenced this pull request Dec 9, 2017

Merge #7649: Prevent multiple calls to CWallet::AvailableCoins
bb16c88 Prevent multiple calls to CWallet::AvailableCoins (João Barbosa)

codablock added a commit to codablock/dash that referenced this pull request Dec 19, 2017

Merge #7649: Prevent multiple calls to CWallet::AvailableCoins
bb16c88 Prevent multiple calls to CWallet::AvailableCoins (João Barbosa)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment