contract: avoid going to the DB for entry scripts
This optimizes out DB access for non-deployed contracts under the assumption that deployed ones are always loaded via `LoadScriptWithHash` (and if they're not --- it's a bug anyway with the new hashing model) which actually is a very popular case (every entry script does that).
This commit is contained in:
parent
49f6b33eae
commit
d93aa745bb
4 changed files with 22 additions and 7 deletions
|
@ -581,7 +581,7 @@ func TestContractCall(t *testing.T) {
|
|||
|
||||
runInvalid := func(args ...interface{}) func(t *testing.T) {
|
||||
return func(t *testing.T) {
|
||||
loadScript(ic, currScript, 42)
|
||||
loadScriptWithHashAndFlags(ic, currScript, h, smartcontract.All, 42)
|
||||
for i := range args {
|
||||
ic.VM.Estack().PushVal(args[i])
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue