mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 06:42:16 +00:00
remove unnecessary permission check
This commit is contained in:
parent
bff06ac657
commit
aada207092
@ -449,16 +449,10 @@ func ExecTx(blockCache *BlockCache, tx types.Tx, runCall bool, evc events.Fireab
|
|||||||
|
|
||||||
// get or create callee
|
// get or create callee
|
||||||
if createContract {
|
if createContract {
|
||||||
if HasPermission(blockCache, inAcc, ptypes.CreateContract) {
|
// We already checked for permission
|
||||||
callee = txCache.CreateAccount(caller)
|
callee = txCache.CreateAccount(caller)
|
||||||
log.Info(Fmt("Created new contract %X", callee.Address))
|
log.Info(Fmt("Created new contract %X", callee.Address))
|
||||||
code = tx.Data
|
code = tx.Data
|
||||||
} else {
|
|
||||||
log.Info(Fmt("Error on execution: Caller %X cannot create contract",
|
|
||||||
caller.Address))
|
|
||||||
err = types.ErrTxPermissionDenied
|
|
||||||
goto CALL_COMPLETE
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
callee = toVMAccount(outAcc)
|
callee = toVMAccount(outAcc)
|
||||||
log.Info(Fmt("Calling contract %X with code %X", callee.Address, callee.Code))
|
log.Info(Fmt("Calling contract %X with code %X", callee.Address, callee.Code))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user