Created
January 31, 2019 22:06
-
-
Save gauthamzz/30651effc5293b76929200a162e5b160 to your computer and use it in GitHub Desktop.
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
def commit(self): | |
byte_length = max(ceil(self.state.size.bit_length() / 8), 1) | |
app_hash = self.state.size.to_bytes(byte_length, byteorder='big') | |
self.state.app_hash = app_hash | |
self.state.height += 1 | |
self.state.save() | |
return ResponseCommit(data=app_hash) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment