Skip to content

Commit

Permalink
Expose getSize to transaction interface (hyperledger#5983)
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel-Trintinalia <[email protected]>
  • Loading branch information
Gabriel-Trintinalia authored Oct 4, 2023
1 parent 7ee5b73 commit 10b956f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,11 @@ default Optional<? extends Quantity> getMaxFeePerBlobGas() {
* @return the encoded transaction as Bytes
*/
Bytes encoded();

/**
* Returns the size in bytes of the encoded transaction.
*
* @return the size in bytes of the encoded transaction.
*/
int getSize();
}
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,7 @@ public Hash getHash() {
*
* @return the size in bytes of the encoded transaction.
*/
@Override
public int getSize() {
if (size == -1) {
memoizeHashAndSize();
Expand Down

0 comments on commit 10b956f

Please sign in to comment.