From 3a3904fbc186bd3fb2621946c48721e005b22f78 Mon Sep 17 00:00:00 2001 From: Levente Pap Date: Wed, 26 Feb 2020 15:25:01 +0100 Subject: [PATCH 1/2] Fix error message in PromoteTransactionCommand --- iota/commands/extended/promote_transaction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iota/commands/extended/promote_transaction.py b/iota/commands/extended/promote_transaction.py index 564d1472..51f48e7d 100644 --- a/iota/commands/extended/promote_transaction.py +++ b/iota/commands/extended/promote_transaction.py @@ -39,7 +39,7 @@ async def _execute(self, request): if cc_response['state'] is False: raise BadApiResponse( 'Transaction {transaction} is not promotable. ' - 'You should reattach first.'.format(transaction=transaction) + 'Info: {reason}'.format(transaction=transaction, reason=cc_response['info']) ) spam_transfer = ProposedTransaction( From daacbd6a34a75e5b9d0ad5e34a44c257ec27be9b Mon Sep 17 00:00:00 2001 From: Levente Pap Date: Wed, 26 Feb 2020 16:11:02 +0100 Subject: [PATCH 2/2] Fix PromoteTransactionCommandTestCase - mocked cc call didn't contain 'info' key --- test/commands/extended/promote_transaction_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/commands/extended/promote_transaction_test.py b/test/commands/extended/promote_transaction_test.py index b8e9c4e2..99a46474 100644 --- a/test/commands/extended/promote_transaction_test.py +++ b/test/commands/extended/promote_transaction_test.py @@ -401,6 +401,7 @@ async def test_not_promotable(self): self.adapter.seed_response('checkConsistency', { 'state': False, + 'info': 'Something went terribly wrong.', }) with self.assertRaises(BadApiResponse):