Skip to content
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

Add a failing test case for reissuance from an unblinded output (#259) #1119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions test/functional/feature_issuance.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,5 +500,14 @@ def run_test(self):
txid = self.nodes[1].issueasset(0, 1, False)["txid"]
tx = self.nodes[1].getrawtransaction(txid, True)

# Test reissuing with a reissuance token spent from an unblinded output
# https://github.com/ElementsProject/elements/issues/259
issued = self.nodes[0].issueasset(0, Decimal('0.00000001'), False)
# Get a non-confidential address and send the (only) reissuance token to it
uc_addr = self.nodes[0].validateaddress(self.nodes[0].getnewaddress())["unconfidential"]
self.nodes[0].sendtoaddress(uc_addr, Decimal('0.00000001'), "", "", False, False, 1, "UNSET", False, issued["token"])
# This currently fails with 'JSONRPCException: Unable to blind the transaction properly. This should not happen. (-4)'
self.nodes[0].reissueasset(issued["asset"], 1)

if __name__ == '__main__':
IssuanceTest ().main ()