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

[qa] fundrawtransaction: Fix race, assert amounts #8201

Merged
merged 2 commits into from Jun 14, 2016

Conversation

Projects
None yet
3 participants
@MarcoFalke
Member

MarcoFalke commented Jun 13, 2016

Alternative to #8199 and #8200:

  • Make sure to sync the nodes when required
  • Make sure the fee has the correct amount without doing an assert_equal

@MarcoFalke MarcoFalke added the Tests label Jun 13, 2016

@sipa

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa Jun 13, 2016

Member

Tested ACK fae1d06 (solves #8199 for me).

Member

sipa commented Jun 13, 2016

Tested ACK fae1d06 (solves #8199 for me).

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Jun 14, 2016

Member

Works for me - when I run fundrawtransaction.py in a loop without this patch it fails once in a while with InsufficientFunds, I've now been running with this patch for quite some time and haven't got one error.

ACK fae1d06

Member

laanwj commented Jun 14, 2016

Works for me - when I run fundrawtransaction.py in a loop without this patch it fails once in a while with InsufficientFunds, I've now been running with this patch for quite some time and haven't got one error.

ACK fae1d06

@laanwj laanwj merged commit fae1d06 into bitcoin:master Jun 14, 2016

1 check passed

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

laanwj added a commit that referenced this pull request Jun 14, 2016

Merge #8201: [qa] fundrawtransaction: Fix race, assert amounts
fae1d06 [qa] fundrawtransaction: Fix race, assert amounts (MarcoFalke)
fa26c42 [qa] util: Move check_fee_amount out of wallet.py (MarcoFalke)

@MarcoFalke MarcoFalke deleted the MarcoFalke:Mf1606-qaFundraw branch Jun 14, 2016

assert_equal(result['fee']*10, result3['fee'])
result_fee_rate = result['fee'] * 1000 / count_bytes(result['hex'])
assert_fee_amount(result2['fee'], count_bytes(result2['hex']), 2 * result_fee_rate)
assert_fee_amount(result3['fee'], count_bytes(result3['hex']), 10 * result_fee_rate)

This comment has been minimized.

@MarcoFalke

MarcoFalke Jun 14, 2016

Member

fun fact: result_fee_rate != min_relay_tx_fee, even though it should. I should look into this to see if we can do any better.

@MarcoFalke

MarcoFalke Jun 14, 2016

Member

fun fact: result_fee_rate != min_relay_tx_fee, even though it should. I should look into this to see if we can do any better.

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

Merge bitcoin#8201: [qa] fundrawtransaction: Fix race, assert amounts
fae1d06 [qa] fundrawtransaction: Fix race, assert amounts (MarcoFalke)
fa26c42 [qa] util: Move check_fee_amount out of wallet.py (MarcoFalke)

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

Merge bitcoin#8201: [qa] fundrawtransaction: Fix race, assert amounts
fae1d06 [qa] fundrawtransaction: Fix race, assert amounts (MarcoFalke)
fa26c42 [qa] util: Move check_fee_amount out of wallet.py (MarcoFalke)

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

Merge bitcoin#8201: [qa] fundrawtransaction: Fix race, assert amounts
fae1d06 [qa] fundrawtransaction: Fix race, assert amounts (MarcoFalke)
fa26c42 [qa] util: Move check_fee_amount out of wallet.py (MarcoFalke)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment