mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
fixed flake8 issues to pass CI test
Signed-off-by: Juergen Eckel <juergen@riddleandcode.com>
This commit is contained in:
parent
c269f0115c
commit
5fdea5dc3c
@ -2,8 +2,7 @@ import codecs
|
|||||||
import base64
|
import base64
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
from abci.types_pb2 import (Validator,
|
from abci.types_pb2 import (ValidatorUpdate,
|
||||||
ValidatorUpdate,
|
|
||||||
PubKey)
|
PubKey)
|
||||||
from bigchaindb.common.exceptions import InvalidPublicKey
|
from bigchaindb.common.exceptions import InvalidPublicKey
|
||||||
|
|
||||||
|
|||||||
@ -15,10 +15,8 @@ def validator_pub_key():
|
|||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def init_chain_request():
|
def init_chain_request():
|
||||||
addr = codecs.decode(b'9FD479C869C7D7E7605BF99293457AA5D80C3033', 'hex')
|
|
||||||
pk = codecs.decode(b'VAgFZtYw8bNR5TMZHFOBDWk9cAmEu3/c6JgRBmddbbI=',
|
pk = codecs.decode(b'VAgFZtYw8bNR5TMZHFOBDWk9cAmEu3/c6JgRBmddbbI=',
|
||||||
'base64')
|
'base64')
|
||||||
val_a = types.ValidatorUpdate( power=10,
|
val_a = types.ValidatorUpdate(power=10,
|
||||||
pub_key=types.PubKey(type='ed25519', data=pk))
|
pub_key=types.PubKey(type='ed25519', data=pk))
|
||||||
|
|
||||||
return types.RequestInitChain(validators=[val_a])
|
return types.RequestInitChain(validators=[val_a])
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||||
# Code is Apache-2.0 and docs are CC-BY-4.0
|
# Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
|
||||||
import codecs
|
|
||||||
import json
|
import json
|
||||||
import pytest
|
import pytest
|
||||||
import random
|
import random
|
||||||
@ -14,7 +13,6 @@ from abci.types_pb2 import (
|
|||||||
RequestInfo,
|
RequestInfo,
|
||||||
RequestBeginBlock,
|
RequestBeginBlock,
|
||||||
RequestEndBlock,
|
RequestEndBlock,
|
||||||
Validator,
|
|
||||||
ValidatorUpdate,
|
ValidatorUpdate,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -49,10 +47,9 @@ def generate_address():
|
|||||||
|
|
||||||
|
|
||||||
def generate_validator():
|
def generate_validator():
|
||||||
addr = codecs.decode(generate_address(), 'hex')
|
|
||||||
pk, _ = generate_key_pair()
|
pk, _ = generate_key_pair()
|
||||||
pub_key = PubKey(type='ed25519', data=pk.encode())
|
pub_key = PubKey(type='ed25519', data=pk.encode())
|
||||||
val = ValidatorUpdate( power=10, pub_key=pub_key)
|
val = ValidatorUpdate(power=10, pub_key=pub_key)
|
||||||
return val
|
return val
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user