Skip to content

Commit 8b40e3f

Browse files
committed
Test funding peg-in psbt
1 parent be9a7dc commit 8b40e3f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/functional/feature_fedpeg.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,13 @@ def run_test(self):
317317
fin_psbt = sidechain.finalizepsbt(signed_psbt['psbt'])
318318
assert_equal(fin_psbt, signed_pegin)
319319

320+
# Try funding a psbt with the peg-in
321+
outputs.append({sidechain.getnewaddress(): 49.999})
322+
pegin_psbt = sidechain.walletcreatefundedpsbt([{"txid":txid1, "vout": vout, "pegin_bitcoin_tx": raw, "pegin_txout_proof": proof, "pegin_claim_script": addrs["claim_script"]}], outputs)
323+
signed_psbt = sidechain.walletsignpsbt(pegin_psbt['psbt'])
324+
fin_psbt = sidechain.finalizepsbt(signed_psbt['psbt'])
325+
assert fin_psbt['complete']
326+
320327
sample_pegin_struct = FromHex(CTransaction(), signed_pegin["hex"])
321328
# Round-trip peg-in transaction using python serialization
322329
assert_equal(signed_pegin["hex"], bytes_to_hex_str(sample_pegin_struct.serialize()))

0 commit comments

Comments
 (0)