Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/neo/SmartContract/Native/LedgerContract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,14 @@ private Transaction GetTransactionForContract(ApplicationEngine engine, UInt256
return state.Transaction;
}

[ContractMethod(CpuFee = 1 << 15, RequiredCallFlags = CallFlags.ReadStates)]
private VMState GetTransactionVMState(ApplicationEngine engine, UInt256 hash)
{
TransactionState state = GetTransactionState(engine.Snapshot, hash);
if (state is null || !IsTraceableBlock(engine.Snapshot, state.BlockIndex, engine.ProtocolSettings.MaxTraceableBlocks)) return VMState.NONE;
return state.State;
}

[ContractMethod(CpuFee = 1 << 15, RequiredCallFlags = CallFlags.ReadStates)]
private int GetTransactionHeight(ApplicationEngine engine, UInt256 hash)
{
Expand Down