mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-24 14:35:45 +00:00
fixed some more test cases
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
This commit is contained in:
parent
f5e83f7110
commit
7d984007b6
@ -5,8 +5,10 @@
|
||||
|
||||
CHAIN_MIGRATION_ELECTION = "CHAIN_MIGRATION_ELECTION"
|
||||
VALIDATOR_ELECTION = "VALIDATOR_ELECTION"
|
||||
VOTE = "VOTE"
|
||||
|
||||
GOVERNANCE_TRANSACTION_TYPES = [
|
||||
CHAIN_MIGRATION_ELECTION,
|
||||
VALIDATOR_ELECTION
|
||||
VALIDATOR_ELECTION,
|
||||
VOTE
|
||||
]
|
||||
|
||||
@ -17,7 +17,6 @@ class FastQuery:
|
||||
def get_outputs_by_public_key(self, public_key):
|
||||
"""Get outputs for a public key"""
|
||||
txs = query.get_owned_ids(self.connection, public_key)
|
||||
print(txs)
|
||||
return [
|
||||
TransactionLink(tx.id, index)
|
||||
for tx in txs
|
||||
|
||||
@ -145,7 +145,6 @@ class Planetmint(object):
|
||||
|
||||
for t in transactions:
|
||||
transaction = t.tx_dict if t.tx_dict else rapidjson.loads(rapidjson.dumps(t.to_dict()))
|
||||
print(transaction["operation"])
|
||||
if transaction["operation"] in GOVERNANCE_TRANSACTION_TYPES:
|
||||
gov_txns.append(transaction)
|
||||
else:
|
||||
@ -377,9 +376,14 @@ class Planetmint(object):
|
||||
# store the inputs so that we can check if the asset ids match
|
||||
input_txs = []
|
||||
input_conditions = []
|
||||
|
||||
table = TARANT_TABLE_TRANSACTION
|
||||
if tx.operation in GOVERNANCE_TRANSACTION_TYPES:
|
||||
table = TARANT_TABLE_GOVERNANCE
|
||||
|
||||
for input_ in tx.inputs:
|
||||
input_txid = input_.fulfills.txid
|
||||
input_tx = self.get_transaction(input_txid)
|
||||
input_tx = self.get_transaction(input_txid, table)
|
||||
_output = self.get_outputs_by_tx_id(input_txid)
|
||||
if input_tx is None:
|
||||
for ctxn in current_transactions:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user