Skip to content

Commit

Permalink
vm: test group anchors with script witnesses
Browse files Browse the repository at this point in the history
  • Loading branch information
jharveyb committed Oct 5, 2023
1 parent 2c3f374 commit 8880ecc
Show file tree
Hide file tree
Showing 2 changed files with 273 additions and 34 deletions.
6 changes: 6 additions & 0 deletions vm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,12 @@ func (vm *Engine) Execute() error {
if len(vm.splitAssets) > 0 || len(vm.prevAssets) > 0 {
return newErrKind(ErrInvalidGenesisStateTransition)
}

// A genesis asset with a group key must have a witness before
// being validated.
if vm.newAsset.GroupKey != nil {
return newErrKind(ErrInvalidGenesisStateTransition)
}
return nil
}

Expand Down
Loading

0 comments on commit 8880ecc

Please sign in to comment.