fix getTransactionCount bug in db_chain.nim

getTransactionCount will always return 0 because the txCount
variable is not returned
This commit is contained in:
jangko 2021-04-24 10:47:37 +07:00
parent 1ca4b63c3a
commit 1728dd8d54
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 1 additions and 0 deletions

View File

@ -176,6 +176,7 @@ proc getTransactionCount*(chain: BaseChainDB, txRoot: Hash256): int =
if txKey notin trie: if txKey notin trie:
break break
inc txCount inc txCount
txCount
proc getUnclesCount*(self: BaseChainDB, ommersHash: Hash256): int = proc getUnclesCount*(self: BaseChainDB, ommersHash: Hash256): int =
if ommersHash != EMPTY_UNCLE_HASH: if ommersHash != EMPTY_UNCLE_HASH: