ResQ.Blockchain.MockNeoClient
MockNeoClient.RecordEventAsync(BlockchainEvent, CancellationToken) Method
Records a mock blockchain event in memory.Parameters
evt BlockchainEvent
The blockchain event to record.
cancellationToken System.Threading.CancellationToken
Cancellation token for the operation.
Implements RecordEventAsync(BlockchainEvent, CancellationToken)
Returns
System.Threading.Tasks.Task<TransactionResult>A TransactionResult with a generated transaction hash and confirmed status.
Example
Remarks
This mock implementation:- Generates a random transaction hash using cryptographic random bytes
- Increments the internal block height
- Stores the event in memory, indexed by incident ID if present in payload
- Logs the operation at Information level