From a608b2b644dd60939ac58eede7484d38584f4c0c Mon Sep 17 00:00:00 2001 From: Jan Xie Date: Sun, 4 Sep 2016 14:51:17 +0800 Subject: [PATCH] add transaction count to block --- ethereum/block.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ethereum/block.py b/ethereum/block.py index 350b3b955..d7e3420ac 100644 --- a/ethereum/block.py +++ b/ethereum/block.py @@ -195,6 +195,10 @@ def __getattribute__(self, name): def chain_difficulty(self): return self.header.number + 1 + @property + def transaction_count(self): + return len(self.transactions) + BLANK_UNCLES_HASH = sha3(rlp.encode([]))