mirror of
https://github.com/planetmint/planetmint.git
synced 2025-03-30 15:08:31 +00:00
fixed changed testcases and a bug
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
parent
2fc522dc77
commit
b14a092fb3
@ -684,7 +684,7 @@ class Planetmint(object):
|
||||
current_validators = self.get_validators_dict()
|
||||
|
||||
# NOTE: change more than 1/3 of the current power is not allowed
|
||||
if Transaction.get_asset_array(transaction)[0]["data"]["power"] >= (1 / 3) * sum(current_validators.values()):
|
||||
if transaction.get_assets()[0]["data"]["power"] >= (1 / 3) * sum(current_validators.values()):
|
||||
raise InvalidPowerChange("`power` change must be less than 1/3 of total power")
|
||||
|
||||
def get_election_status(self, transaction):
|
||||
|
@ -168,7 +168,9 @@ def test_create_tx_no_fulfills(b, create_tx, alice):
|
||||
tx = create_tx.to_dict()
|
||||
tx["inputs"][0]["fulfills"] = {"transaction_id": "a" * 64, "output_index": 0}
|
||||
tx = Transaction.from_dict(tx).sign([alice.private_key]).to_dict()
|
||||
validate_raises(tx)
|
||||
# Schema validation does not lookup inputs. this is only done by the node with DB/consensus context
|
||||
#validate_raises(tx)
|
||||
validate(tx)
|
||||
|
||||
|
||||
def test_transfer_has_inputs(user_sk, signed_transfer_tx, alice):
|
||||
|
Loading…
x
Reference in New Issue
Block a user