diff --git a/pkg/proto/actions_validator.go b/pkg/proto/actions_validator.go index 8056a9771..4383f6b1c 100644 --- a/pkg/proto/actions_validator.go +++ b/pkg/proto/actions_validator.go @@ -2,6 +2,7 @@ package proto import ( "github.com/pkg/errors" + "github.com/wavesplatform/gowaves/pkg/ride/ast" ) diff --git a/pkg/state/invoke_applier.go b/pkg/state/invoke_applier.go index c7acf0d2a..d8a2991a4 100644 --- a/pkg/state/invoke_applier.go +++ b/pkg/state/invoke_applier.go @@ -709,6 +709,12 @@ func (ia *invokeApplier) fallibleValidation(tx proto.Transaction, info *addlInvo if err != nil { return proto.DAppError, info.failedChanges, err } + if !li.isActive() { + return proto.DAppError, info.failedChanges, + errors.Errorf( + "failed to cancel leasing %q, leasing is already cancelled", a.LeaseID.String(), + ) + } if senderPK != li.SenderPK { return proto.DAppError, info.failedChanges, errors.Errorf(