Published 15 February 2019

TransactionGetResult TransactionGet(1:TransactionId transactionId)

Description

Description

Command returns its balance in the form of a structure by the transaction identifier

It splits “transactionId” string into hash and index. We get a transaction from the storage according to the structure of its identifier. If the hash of the pool is not empty, then we assume that the transaction is found. Convert a transaction from csdb::Transaction structure to the api::Transaction structure. Look at the result status - SUCCESS

Parameters

Parameters

struct TransactionId

{

   1: PoolHash poolHash

   // Position inside of block

   2: i32 index

}

typedef binary PoolHash

Return

Return

struct TransactionGetResult

{

   1: general.APIResponse status

   2: bool found

   3: TransactionState state

   4: i32 roundNum

   5: SealedTransaction transaction

}

Description of the returned structures and typedefs

Description of the returned structures and typedefs

struct APIResponse

{

// 0 for success, 1 for failure, 2 for not being implemented (currently unused)

   1: i8 code

// Explanation

   2: string message

}

enum TransactionState {

   INVALID = 0,

   VALID,

   INPROGRESS

}

// Structure for transactions that have been emplaced to the blockchain

struct SealedTransaction {

   1: TransactionId id

   2: Transaction trxn

}

Votes 1, average rating 5

Contents