Skip to content

Conversation

jl2012
Copy link
Contributor

@jl2012 jl2012 commented Sep 29, 2016

Sorry that I just find a minor bug in the test. msg is used to indicate that the transaction should be rejected. However, before this fix, even if the tx was accepted with a non-empty msg, the test would still pass.

@laanwj laanwj added the Tests label Sep 29, 2016
@maflcko maflcko added this to the 0.13.1 milestone Sep 29, 2016
@@ -119,6 +119,9 @@ def tx_submit(self, node, tx, msg = ""):
node.sendrawtransaction(bytes_to_hex_str(tx.serialize_with_witness()), True)
except JSONRPCException as exp:
assert_equal(exp.error["message"], msg)
else:
if (msg):
assert(False)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To print the message on failure, what about something like

assert_equal('', msg)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revise as suggested. Thanks

@maflcko
Copy link
Member

maflcko commented Sep 29, 2016

utACK 46a4774

@laanwj laanwj merged commit 46a4774 into bitcoin:master Sep 30, 2016
laanwj added a commit that referenced this pull request Sep 30, 2016
46a4774 Fix nulldummy.py test (Johnson Lau)
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Oct 3, 2016
Github-Pull: bitcoin#8841
Rebased-From: 46a4774
codablock pushed a commit to codablock/dash that referenced this pull request Jan 30, 2018
46a4774 Fix nulldummy.py test (Johnson Lau)
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
46a4774 Fix nulldummy.py test (Johnson Lau)
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Feb 28, 2019
46a4774 Fix nulldummy.py test (Johnson Lau)
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Mar 2, 2019
46a4774 Fix nulldummy.py test (Johnson Lau)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants