mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
fix feature_pak test
This commit is contained in:
parent
b1749fb5ff
commit
da9d7c16ce
1 changed files with 6 additions and 3 deletions
|
|
@ -109,7 +109,6 @@ class PAKTest (BitcoinTestFramework):
|
|||
|
||||
# Node 1 will now make a PAK peg-out, accepted in all mempools and blocks
|
||||
pegout_info = self.nodes[1].sendtomainchain("", 1)
|
||||
print(pegout_info)
|
||||
raw_node1_pegout = self.nodes[1].gettransaction(pegout_info["txid"])["hex"]
|
||||
self.sync_all() # mempool sync
|
||||
self.generatetoaddress(self.nodes[1], 1, self.nodes[0].getnewaddress(), sync_fun=self.no_op)
|
||||
|
|
@ -224,7 +223,6 @@ class PAKTest (BitcoinTestFramework):
|
|||
|
||||
peg_out_found = False
|
||||
for output in wpkh_raw["vout"]:
|
||||
print(output)
|
||||
if "pegout_address" in output["scriptPubKey"]:
|
||||
if output["scriptPubKey"]["pegout_address"] == wpkh_info["address_lookahead"][0]:
|
||||
peg_out_found = True
|
||||
|
|
@ -248,6 +246,8 @@ class PAKTest (BitcoinTestFramework):
|
|||
for tx_id in [wpkh_txid, sh_wpkh_txid]:
|
||||
assert_greater_than(self.nodes[1].gettransaction(tx_id)["confirmations"], 0)
|
||||
|
||||
self.sync_blocks()
|
||||
|
||||
self.log.info("Test that pak-less pegouts are rejected")
|
||||
|
||||
# Last test of a pak-less peg-out failing to get into mempool/block
|
||||
|
|
@ -256,7 +256,10 @@ class PAKTest (BitcoinTestFramework):
|
|||
|
||||
# node 0 will now create a pegout, will fail to enter mempool of node 1 or 2
|
||||
# since it's pak-less
|
||||
nopak_pegout_txid = self.nodes[0].sendtomainchain("n3NkSZqoPMCQN5FENxUBw4qVATbytH6FDK", 1)
|
||||
pegout_address = "n3NkSZqoPMCQN5FENxUBw4qVATbytH6FDK"
|
||||
nopak_pegout_txid = self.nodes[0].sendtomainchain(pegout_address, 1)
|
||||
pegout_tx = self.nodes[0].gettransaction(nopak_pegout_txid,True,True)
|
||||
assert_equal(pegout_tx["decoded"]["vout"][[d["value"] for d in pegout_tx["decoded"]["vout"]].index(1)]["scriptPubKey"]["pegout_address"],pegout_address)
|
||||
raw_pakless_pegout = self.nodes[0].gettransaction(nopak_pegout_txid)["hex"]
|
||||
assert nopak_pegout_txid in self.nodes[0].getrawmempool()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue