diff --git a/bigchaindb/core.py b/bigchaindb/core.py index 7bcf587d..653b7ac3 100644 --- a/bigchaindb/core.py +++ b/bigchaindb/core.py @@ -627,7 +627,7 @@ class Bigchain(object): vote_signed = { 'node_pubkey': self.me, - 'signature': signature, + 'signature': signature.decode(), 'vote': vote } diff --git a/tests/pipelines/test_vote.py b/tests/pipelines/test_vote.py index f61bf253..2c9ec230 100644 --- a/tests/pipelines/test_vote.py +++ b/tests/pipelines/test_vote.py @@ -33,6 +33,7 @@ def test_vote_creation_valid(b): assert vote['vote']['is_block_valid'] is True assert vote['vote']['invalid_reason'] is None assert vote['node_pubkey'] == b.me + assert isinstance(vote['signature'], str) assert crypto.PublicKey(b.me).verify(serialize(vote['vote']).encode(), vote['signature']) is True