golosscripts.monitor

Module Contents

log[source]
class Monitor(node: Union[str, List[str]], keys: Union[str, List[str]], witness: str, witness_pubkey: str, miss_window: int = 3600, allowed_misses: int = 1)[source]

Bases: golosscripts.golos_helper.GolosHelper

Performs monitoring of missed blocks and automatically switches signing key.

check_node_sync(self)[source]

Checks if API node is in sync.

set_miss_data(self, witness: Witness)[source]
check_miss_window_end(self)[source]
do_witness_check(self, witness: Witness)[source]

Check whether witness configured on another node is missing blocks.

run_once(self)[source]

Do miss check once.

run_forever(self)[source]

Main loop.