CEP_Account.getTransaction()

With this method you can search a specific transaction by the blockID and the TxID.

Function Signature

public Map<String, Object> getTransaction(String BlockID, String txId) throws Exception

Parameters

Parameter Name
Datatype

blockNum

String

txID

String

Example

//...
String tx_id = "your_txid" //usually you get that from the submitCertificateMethod
String block_id = "your_block_id" //usually you get that from the getTransactionOutcome method
Map<String, Object> status = account.get_transaction(block_id, tx_id)

if (status.get("Result") == 200){
    System.out.println("Transaction executed");
} else {
    System.out.println("Error on retrieving transaction");
}
//...

Expected Result

Last updated