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

Actually test multisig rawreissuance #513

Merged
Merged
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
10 changes: 4 additions & 6 deletions qa/rpc-tests/feature_issuance.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,18 +346,15 @@ def run_test(self):
for i in range(3):
addrs.append(self.nodes[0].validateaddress(self.nodes[0].getnewaddress())["pubkey"])


multisig_addr = self.nodes[0].createmultisig(2,addrs)
multisig_addr = self.nodes[0].addmultisigaddress(2,addrs)
blinded_addr = self.nodes[0].getnewaddress()
blinding_pubkey = self.nodes[0].validateaddress(blinded_addr)["confidential_key"]
blinding_privkey = self.nodes[0].dumpblindingkey(blinded_addr)
blinded_multisig = self.nodes[0].createblindedaddress(multisig_addr["address"], blinding_pubkey)
# Import address so we consider the reissuance tokens ours
self.nodes[0].importaddress(blinded_multisig)
blinded_multisig = self.nodes[0].createblindedaddress(multisig_addr, blinding_pubkey)
# Import blinding key to be able to decrypt values sent to it
self.nodes[0].importblindingkey(blinded_multisig, blinding_privkey)

self.nodes[0].sendtoaddress(blinded_multisig, self.nodes[0].getbalance()[issued_asset["asset"]], "", "", False, issued_asset["asset"])
self.nodes[0].sendtoaddress(blinded_multisig, self.nodes[0].getbalance()[issued_asset["token"]], "", "", False, issued_asset["token"])
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this was the wrong asset which then allowed the reissuance token to just stay in a p2pkh output and get reissued from there...

self.nodes[0].generate(1)

# Get that multisig output
Expand All @@ -366,6 +363,7 @@ def run_test(self):
for utxo in self.nodes[0].listunspent():
if utxo["asset"] == issued_asset["token"]:
utxo_info = utxo
assert_equal(utxo_info["address"], multisig_addr)
break
assert(utxo_info is not None)

Expand Down