Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit a608b2b

Browse files
author
Jan Xie
committed
add transaction count to block
1 parent 1af08bb commit a608b2b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ethereum/block.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ def __getattribute__(self, name):
195195
def chain_difficulty(self):
196196
return self.header.number + 1
197197

198+
@property
199+
def transaction_count(self):
200+
return len(self.transactions)
201+
198202

199203
BLANK_UNCLES_HASH = sha3(rlp.encode([]))
200204

0 commit comments

Comments
 (0)