From 650cd6eca50ae19a27e4183dee9d18d1783f1bb5 Mon Sep 17 00:00:00 2001 From: vsmk98 Date: Wed, 17 Apr 2019 21:35:26 +0800 Subject: [PATCH] permissions: changed isOrgAdmin check to validate for network admin as well --- core/tx_pool.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/tx_pool.go b/core/tx_pool.go index 7dc03162f..4520cff77 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -640,7 +640,7 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error { // Check if the sender account is authorized to perform the transaction if isQuorum { - if err := checkAccount(from, tx.To(), pool.EnodeId); err != nil { + if err := checkAccount(from, tx.To()); err != nil { return ErrUnAuthorizedAccount } } @@ -1312,7 +1312,7 @@ func (t *txLookup) Remove(hash common.Hash) { } // checks if the account is permissioned for transaction -func checkAccount(fromAcct common.Address, toAcct *common.Address, enodeId string) error { +func checkAccount(fromAcct common.Address, toAcct *common.Address) error { access := types.GetAcctAccess(fromAcct) switch access {