mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
test mismatched vote, block sigs
This commit is contained in:
parent
fd44ca7bf0
commit
6de1d18efc
@ -359,6 +359,13 @@ class TestBlockElection(object):
|
|||||||
test_block['block']['votes'] = valid_vote[:2]
|
test_block['block']['votes'] = valid_vote[:2]
|
||||||
assert b.block_election_status(test_block) == 'undecided'
|
assert b.block_election_status(test_block) == 'undecided'
|
||||||
|
|
||||||
|
# change signatures in block, should fail
|
||||||
|
test_block['block']['voters'][0] = 'abc'
|
||||||
|
test_block['block']['voters'][1] = 'abc'
|
||||||
|
test_block['block']['votes'] = valid_vote
|
||||||
|
assert b.block_election_status(test_block) == 'invalid'
|
||||||
|
|
||||||
|
def test_quorum_odd(self, b):
|
||||||
# test partial quorum situations for odd numbers of voters
|
# test partial quorum situations for odd numbers of voters
|
||||||
# create a new block
|
# create a new block
|
||||||
test_block = b.create_block([])
|
test_block = b.create_block([])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user