Skip to content

Commit d942981

Browse files
committed
itest: assert coin select field when funding script sends
1 parent 7a6ee2e commit d942981

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

itest/mint_fund_seal_test.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,27 @@ func testMintFundSealAssets(t *harnessTest) {
385385
Amt: assetTweakedScriptKey.Amount / 2,
386386
})
387387
require.NoError(t.t, err)
388+
389+
// We only have script encumbered assets now, so selecting BIP-086 only
390+
// assets should result in an error.
391+
const bip86Only = wrpc.CoinSelectType_COIN_SELECT_BIP86_ONLY
392+
_, err = aliceTapd.FundVirtualPsbt(
393+
ctxt, &wrpc.FundVirtualPsbtRequest{
394+
Template: &wrpc.FundVirtualPsbtRequest_Raw{
395+
Raw: &wrpc.TxTemplate{
396+
Recipients: map[string]uint64{
397+
bobAddr.Encoded: 1,
398+
},
399+
},
400+
},
401+
CoinSelectType: bip86Only,
402+
},
403+
)
404+
require.ErrorContains(
405+
t.t, err, "failed to find coin(s) that satisfy given "+
406+
"constraints",
407+
)
408+
388409
signedAddrPsbt, signedPassivePsbts := signTransferWithTweakedScriptKey(
389410
t, ctxt, aliceTapd, bobAddr, &tweakedScript, 2,
390411
tweakedScriptSigLock, tweakedScriptTapTree,

0 commit comments

Comments
 (0)