mirror of
https://github.com/logos-storage/logos-storage-nim-validator.git
synced 2026-01-03 05:53:06 +00:00
13 lines
245 B
Nim
13 lines
245 B
Nim
import ../basics
|
|
import ../hashing
|
|
import ./transaction
|
|
import ./serialization
|
|
|
|
export hashing.toBytes
|
|
|
|
func hash*(tx: Transaction): Hash =
|
|
without var hash =? transaction.hash(tx):
|
|
hash = Hash.hash(tx.toBytes())
|
|
tx.hash = hash
|
|
hash
|