core, rpc: move getFakeNextBlock to Blockchain
It's needed for VM CLI as far and may be improved later.
This commit is contained in:
parent
0036c89d63
commit
79e13f73d8
13 changed files with 136 additions and 89 deletions
|
@ -374,7 +374,8 @@ func TestInvoke(bc *core.Blockchain, tx *transaction.Transaction) (*vm.VM, error
|
|||
// `GetTestVM` as well as `Run` can use a transaction hash which will set a cached value.
|
||||
// This is unwanted behavior, so we explicitly copy the transaction to perform execution.
|
||||
ttx := *tx
|
||||
ic := bc.GetTestVM(trigger.Application, &ttx, b)
|
||||
ic, _ := bc.GetTestVM(trigger.Application, &ttx, b)
|
||||
|
||||
defer ic.Finalize()
|
||||
|
||||
ic.VM.LoadWithFlags(tx.Script, callflag.All)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue