core: add System.Blockchain.GetTransactionFromBlock interop
This commit is contained in:
parent
1e63ae4b3f
commit
d692de5ea4
6 changed files with 103 additions and 9 deletions
|
@ -306,11 +306,16 @@ func TestContractIsPayable(t *testing.T) {
|
|||
// Helper functions to create VM, InteropContext, TX, Account, Contract.
|
||||
|
||||
func createVMAndPushBlock(t *testing.T) (*vm.VM, *block.Block, *interop.Context, *Blockchain) {
|
||||
v, block, context, chain := createVMAndBlock(t)
|
||||
v.Estack().PushVal(stackitem.NewInterop(block))
|
||||
return v, block, context, chain
|
||||
}
|
||||
|
||||
func createVMAndBlock(t *testing.T) (*vm.VM, *block.Block, *interop.Context, *Blockchain) {
|
||||
v := vm.New()
|
||||
block := newDumbBlock()
|
||||
chain := newTestChain(t)
|
||||
context := chain.newInteropContext(trigger.Application, dao.NewSimple(storage.NewMemoryStore()), block, nil)
|
||||
v.Estack().PushVal(stackitem.NewInterop(block))
|
||||
return v, block, context, chain
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue