Skip to content

Commit

Permalink
Add transaction-root-256
Browse files Browse the repository at this point in the history
  • Loading branch information
winder committed Aug 29, 2022
1 parent 0ce3718 commit 29c6e6e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/java/com/algorand/algosdk/v2/client/model/Block.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,21 @@ public String transactionsRoot() {
}
public byte[] transactionsRoot;

/**
* (txn256) TransactionsRootSHA256 is an auxiliary TransactionRoot, built using a
* vector commitment instead of a merkle tree, and SHA256 hash function instead of
* the default SHA512_256. This commitment can be used on environments where only
* the SHA256 function exists.
*/
@JsonProperty("transactions-root-sha256")
public void transactionsRootSha256(String base64Encoded) {
this.transactionsRootSha256 = Encoder.decodeFromBase64(base64Encoded);
}
public String transactionsRootSha256() {
return Encoder.encodeToBase64(this.transactionsRootSha256);
}
public byte[] transactionsRootSha256;

/**
* (tc) TxnCounter counts the number of transactions committed in the ledger, from
* the time at which support for this feature was introduced.
Expand Down Expand Up @@ -143,6 +158,7 @@ public boolean equals(Object o) {
if (!Objects.deepEquals(this.timestamp, other.timestamp)) return false;
if (!Objects.deepEquals(this.transactions, other.transactions)) return false;
if (!Objects.deepEquals(this.transactionsRoot, other.transactionsRoot)) return false;
if (!Objects.deepEquals(this.transactionsRootSha256, other.transactionsRootSha256)) return false;
if (!Objects.deepEquals(this.txnCounter, other.txnCounter)) return false;
if (!Objects.deepEquals(this.upgradeState, other.upgradeState)) return false;
if (!Objects.deepEquals(this.upgradeVote, other.upgradeVote)) return false;
Expand Down

0 comments on commit 29c6e6e

Please sign in to comment.