Add role struct, storage, better tx validation

This commit is contained in:
Ethan Frey
2017-07-11 13:54:41 +02:00
parent 9eb3c3c7de
commit 3e52e6b959
6 changed files with 123 additions and 2 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
package stack
import (
"bytes"
"math/rand"
"github.com/tendermint/tmlibs/log"
@@ -52,7 +51,7 @@ func (c naiveContext) WithPermissions(perms ...basecoin.Actor) basecoin.Context
func (c naiveContext) HasPermission(perm basecoin.Actor) bool {
for _, p := range c.perms {
if perm.App == p.App && bytes.Equal(perm.Address, p.Address) {
if p.Equals(perm) {
return true
}
}