@@ -390,8 +390,8 @@ func syncUniverses(t *testing.T, universe *tapClient, nodes ...*HarnessNode) {
390
390
func assertUniverseProofExists (t * testing.T , universe * tapClient ,
391
391
assetID , groupKey , scriptKey []byte , outpoint string ) * taprpc.Asset {
392
392
393
- t .Logf ("Asserting proof outpoint=%v, script_key=%x" , outpoint ,
394
- scriptKey )
393
+ t .Logf ("Asserting proof outpoint=%v, script_key=%x, asset_id=%x, " +
394
+ "group_key=%x" , outpoint , scriptKey , assetID , groupKey )
395
395
396
396
req := & universerpc.UniverseKey {
397
397
Id : & universerpc.ID {
@@ -517,15 +517,15 @@ func haveFundingAsset(assetChannel *rfqmsg.JsonAssetChannel,
517
517
}
518
518
519
519
func assertAssetChan (t * testing.T , src , dst * HarnessNode , fundingAmount uint64 ,
520
- mintedAsset * taprpc.Asset ) {
520
+ channelAsset * taprpc.Asset ) {
521
521
522
522
err := wait .NoError (func () error {
523
523
a , err := getChannelCustomData (src , dst )
524
524
if err != nil {
525
525
return err
526
526
}
527
527
528
- assetID := mintedAsset .AssetGenesis .AssetId
528
+ assetID := channelAsset .AssetGenesis .AssetId
529
529
if ! haveFundingAsset (a , assetID ) {
530
530
return fmt .Errorf ("expected asset ID %x, to " +
531
531
"be in channel" , assetID )
@@ -538,10 +538,12 @@ func assertAssetChan(t *testing.T, src, dst *HarnessNode, fundingAmount uint64,
538
538
539
539
// Check the decimal display of the channel funding blob. If no
540
540
// explicit value was set, we assume and expect the value of 0.
541
+ // We only need to check the first funding asset, since we
542
+ // enforce them to be the same.
541
543
var expectedDecimalDisplay uint8
542
- if mintedAsset .DecimalDisplay != nil {
544
+ if channelAsset .DecimalDisplay != nil {
543
545
expectedDecimalDisplay = uint8 (
544
- mintedAsset .DecimalDisplay .DecimalDisplay ,
546
+ channelAsset .DecimalDisplay .DecimalDisplay ,
545
547
)
546
548
}
547
549
@@ -629,8 +631,8 @@ func getChannelCustomData(src, dst *HarnessNode) (*rfqmsg.JsonAssetChannel,
629
631
err )
630
632
}
631
633
632
- if len (assetData .FundingAssets ) != 1 {
633
- return nil , fmt .Errorf ("expected 1 asset, got %d" ,
634
+ if len (assetData .FundingAssets ) == 0 {
635
+ return nil , fmt .Errorf ("expected at least 1 asset, got %d" ,
634
636
len (assetData .FundingAssets ))
635
637
}
636
638
0 commit comments