-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* first pass at faux block mode for AbstractPbClient * block mode is going to be deprecated and unsupported by the chain soon, so this is an estimation of the current behavior of submitting in block mode * coroutine client faux block implementation * remove commented out code * switch back to blocking calls in AbstractPbClient * Test for SYNC mode * Add txHashHandler to coroutine client for feature parity
- Loading branch information
Showing
9 changed files
with
298 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...mon/src/main/kotlin/io/provenance/client/common/exceptions/TransactionTimeoutException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.provenance.client.common.exceptions | ||
|
||
import io.grpc.Status | ||
import io.grpc.StatusRuntimeException | ||
|
||
class TransactionTimeoutException(message: String): StatusRuntimeException(Status.DEADLINE_EXCEEDED.withDescription(message)) |
8 changes: 8 additions & 0 deletions
8
client-common/src/main/kotlin/io/provenance/client/common/extensions/TxExtensions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package io.provenance.client.common.extensions | ||
|
||
import cosmos.tx.v1beta1.TxOuterClass | ||
import tech.figure.hdwallet.common.hashing.sha256 | ||
import tech.figure.hdwallet.encoding.base16.Base16 | ||
|
||
fun TxOuterClass.TxRaw.txHash(): String = toByteArray().sha256().toHexString() | ||
fun ByteArray.toHexString(): String = Base16.encode(this).uppercase() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.