OSDN Git Service

fix (#449)
authorwz <mars@bytom.io>
Mon, 25 Nov 2019 03:12:08 +0000 (11:12 +0800)
committerPaladz <yzhu101@uottawa.ca>
Mon, 25 Nov 2019 03:12:08 +0000 (11:12 +0800)
blockchain/txbuilder/actions.go

index ae9fcb0..994e03c 100644 (file)
@@ -156,8 +156,8 @@ type crossOutAction struct {
 
 func (a *crossOutAction) Build(ctx context.Context, b *TemplateBuilder) error {
        var missing []string
-       if a.Address == "" {
-               missing = append(missing, "address")
+       if a.Address == "" && len(a.Program) == 0 {
+               missing = append(missing, "address or program")
        }
        if a.AssetId.IsZero() {
                missing = append(missing, "asset_id")