core: set price getter for native contract persist routine

This commit is contained in:
Evgenii Stratonikov 2020-06-19 11:09:38 +03:00
parent b9e260a704
commit 81adb7ce83

View file

@ -565,6 +565,7 @@ func (bc *Blockchain) storeBlock(block *block.Block) error {
systemInterop := bc.newInteropContext(trigger.System, cache, block, nil)
v := SpawnVM(systemInterop)
v.LoadScriptWithFlags(bc.contracts.GetPersistScript(), smartcontract.AllowModifyStates|smartcontract.AllowCall)
v.SetPriceGetter(getPrice)
if err := v.Run(); err != nil {
return errors.Wrap(err, "can't persist native contracts")
} else if _, err := systemInterop.DAO.Persist(); err != nil {