File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
main/java/jp/co/soramitsu/iroha/java
test/groovy/jp/co/soramitsu/iroha/java Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -181,4 +181,16 @@ public SignatoriesResponse getSignatories(String accountId) {
181181
182182 return res .getSignatoriesResponse ();
183183 }
184+
185+ public TransactionsResponse getPendingTransactions () {
186+ val q = Query .builder (this .accountId , counter .getAndIncrement ())
187+ .getPendingTransactions ()
188+ .buildSigned (keyPair );
189+
190+ val res = api .query (q );
191+
192+ checkErrorResponse (res );
193+
194+ return res .getTransactionsResponse ();
195+ }
184196}
Original file line number Diff line number Diff line change @@ -243,5 +243,18 @@ class IntegrationTest extends Specification {
243243 def accountKey = queryResponse. keysList. get(0 )
244244
245245 accountKey == Utils . toHex(defaultKeypair. public . encoded). toLowerCase()
246+
247+ def pendingTx = Transaction . builder(defaultAccountId, Instant . now())
248+ .createAccount(anotherAccount, defaultDomain, defaultKeypair. getPublic())
249+ .setQuorum(2 )
250+ .sign(defaultKeypair)
251+ .build()
252+ api. transactionSync(pendingTx)
253+
254+ when : " get pending transaxtions query is executed"
255+ queryResponse = qapi. getPendingTransactions()
256+
257+ then : " response is valid containing single transaction"
258+ queryResponse. transactionsCount == 1
246259 }
247260}
You can’t perform that action at this time.
0 commit comments