polyswarmclient.transaction

Module Contents

polyswarmclient.transaction.logger[source]
polyswarmclient.transaction.LOG_MSG_ENGINE_TOO_SLOW = PLEASE REVIEW YOUR SCANNING LOGIC. Bounty inactive errors indicate that the microengine received the bounty, but was unable to respond to the bounty within the time window. Such errors are considered fatal during testing so you can easily identify them. If your engine is unable to respond within the time window on the live PolySwarm network, you risk losing the bid amount of the bounty at hand. We strongly encourage you to review your artifact scan process to identify areas where engine speed can be improved.[source]
class polyswarmclient.transaction.NonceManager(client, chain)[source]

Manages the nonce for some Ethereum chain

all_finished(self)[source]

Check that all tasks have finished

mark_update_nonce(self)[source]

Call this when the nonce is out of sync. This sets the update flag to true. The next acquire after being set will trigger an update

class polyswarmclient.transaction.AbstractTransaction(client, verifiers)[source]

Used to verify and post groups of transactions that make up a specific action.

For instance, when approving some funds to move, and calling a contract function that will consumer them.

has_required_event(self, transaction_events)[source]

Checks for existence of events in transaction logs, ensuring successful completion

Returns

True if the required event was in the list, false otherwise

get_path(self)[source]

Get the path of the route to build this transaction

Returns

Polyswarmd path to get the transaction data

Return type

str

get_body(self)[source]

Build the payload to send to polyswarmd :returns: Dict payload

verify(self, transactions)[source]

Check the given transactions against known expectations

Parameters

transactions (list) –

Returns

True if transactions match expectations. False otherwise

Return type

(bool)