@@ -390,8 +390,8 @@ func syncUniverses(t *testing.T, universe *tapClient, nodes ...*HarnessNode) {
390390func assertUniverseProofExists (t * testing.T , universe * tapClient ,
391391 assetID , groupKey , scriptKey []byte , outpoint string ) * taprpc.Asset {
392392
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 )
395395
396396 req := & universerpc.UniverseKey {
397397 Id : & universerpc.ID {
@@ -517,15 +517,15 @@ func haveFundingAsset(assetChannel *rfqmsg.JsonAssetChannel,
517517}
518518
519519func assertAssetChan (t * testing.T , src , dst * HarnessNode , fundingAmount uint64 ,
520- mintedAsset * taprpc.Asset ) {
520+ channelAsset * taprpc.Asset ) {
521521
522522 err := wait .NoError (func () error {
523523 a , err := getChannelCustomData (src , dst )
524524 if err != nil {
525525 return err
526526 }
527527
528- assetID := mintedAsset .AssetGenesis .AssetId
528+ assetID := channelAsset .AssetGenesis .AssetId
529529 if ! haveFundingAsset (a , assetID ) {
530530 return fmt .Errorf ("expected asset ID %x, to " +
531531 "be in channel" , assetID )
@@ -538,10 +538,12 @@ func assertAssetChan(t *testing.T, src, dst *HarnessNode, fundingAmount uint64,
538538
539539 // Check the decimal display of the channel funding blob. If no
540540 // 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.
541543 var expectedDecimalDisplay uint8
542- if mintedAsset .DecimalDisplay != nil {
544+ if channelAsset .DecimalDisplay != nil {
543545 expectedDecimalDisplay = uint8 (
544- mintedAsset .DecimalDisplay .DecimalDisplay ,
546+ channelAsset .DecimalDisplay .DecimalDisplay ,
545547 )
546548 }
547549
@@ -629,8 +631,8 @@ func getChannelCustomData(src, dst *HarnessNode) (*rfqmsg.JsonAssetChannel,
629631 err )
630632 }
631633
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" ,
634636 len (assetData .FundingAssets ))
635637 }
636638
0 commit comments