From 4e61a365ef2c0816b461681b74ebd647a39695dc Mon Sep 17 00:00:00 2001 From: 4tochka Date: Sun, 1 Apr 2018 10:24:12 +0400 Subject: [PATCH] block template class --- pybtc/blockchain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pybtc/blockchain.py b/pybtc/blockchain.py index a35ccab..bce38e2 100644 --- a/pybtc/blockchain.py +++ b/pybtc/blockchain.py @@ -902,7 +902,7 @@ class BlockTemplate(): merkle_root = merkleroot_from_branches(self.merkle_branches, cbh) header = version + prev_hash + merkle_root + time + bits + nonce block = hexlify(header).decode() - block += to_var_int(len (self.transactions)+1) + block += hexlify(to_var_int(len (self.transactions)+1)).decode() block += cb for t in self.transactions: block += t["data"]