diff --git a/accounts/abi/bind/auth.go b/accounts/abi/bind/auth.go index 0379dd936..5fff28224 100644 --- a/accounts/abi/bind/auth.go +++ b/accounts/abi/bind/auth.go @@ -62,7 +62,8 @@ func NewKeyedTransactor(key *ecdsa.PrivateKey) *TransactOpts { } } - +// NewWalletTransactor is a utility method to easily create a transaction signer +// from a wallet account func NewWalletTransactor(w accounts.Wallet, from accounts.Account) *TransactOpts { return &TransactOpts{ From: from.Address, @@ -74,4 +75,4 @@ func NewWalletTransactor(w accounts.Wallet, from accounts.Account) *TransactOpts return tx.WithSignature(signer, signature) }, } -} \ No newline at end of file +} diff --git a/controls/permission/permission.go b/controls/permission/permission.go index 0c9487f14..b295d81dd 100644 --- a/controls/permission/permission.go +++ b/controls/permission/permission.go @@ -426,7 +426,7 @@ func (p *PermissionCtrl) populateInitPermission() error { if tx && !p.permissionedMode { // Network is initialized with permissions and node is joining in a non-permissioned // option. stop the node from coming up - types.SetDefaultAccess() + utils.Fatalf("Joining a permissioned network in non-permissioned mode. Bring up get with --permissioned.") } if !p.permissionedMode{ @@ -442,7 +442,7 @@ func (p *PermissionCtrl) populateInitPermission() error { // populate the initial node list from static-nodes.json err := p.populateStaticNodesToContract(permissionsSession) if err != nil { - return err + return err } // update network status to boot completed diff --git a/core/types/permissions_cache.go b/core/types/permissions_cache.go index 8866ea84c..8c74d2a3f 100644 --- a/core/types/permissions_cache.go +++ b/core/types/permissions_cache.go @@ -48,12 +48,12 @@ func GetAcctAccess(acctId common.Address) AccessType { return vo.AcctAccess } } - return DefaultAccess - // if AcctMap.Len() == 0 { - // return FullAccess - // } else { - // return ReadOnly - // } + // return DefaultAccess + if AcctMap.Len() == 0 { + return FullAccess + } else { + return ReadOnly + } } func AddOrgKey(orgId string, key string) {