diff --git a/.coveragerc_full b/.coveragerc_full index 9a1fcf69e..5267f1e2c 100644 --- a/.coveragerc_full +++ b/.coveragerc_full @@ -2,7 +2,7 @@ branch = True omit = # No way to test top command. - hathor/cli/top.py + hathor_cli/top.py [report] exclude_lines = diff --git a/Dockerfile b/Dockerfile index fdb14d744..763a28703 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,7 @@ WORKDIR /app/ COPY pyproject.toml poetry.lock ./ RUN poetry install -n -E sentry --no-root --only=main COPY hathor ./hathor +COPY hathor_cli ./hathor_cli COPY README.md ./ RUN poetry build -f wheel RUN poetry run pip install dist/hathor-*.whl diff --git a/Makefile b/Makefile index bfe793566..c8870e1e6 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,13 @@ -py_sources = hathor/ tests/ extras/custom_tests/ +py_sources = hathor/ hathor_tests/ extras/custom_tests/ .PHONY: all all: check tests # testing: -tests_cli = tests/cli/ -tests_nano = tests/nanocontracts/ tests/tx/test_indexes_nc_history.py tests/resources/nanocontracts/ -tests_lib = $(filter-out ${tests_cli} tests/__pycache__/, $(dir $(wildcard tests/*/.))) +tests_cli = hathor_tests/cli/ +tests_nano = hathor_tests/nanocontracts/ hathor_tests/tx/test_indexes_nc_history.py hathor_tests/resources/nanocontracts/ +tests_lib = $(filter-out ${tests_cli} hathor_tests/__pycache__/, $(dir $(wildcard hathor_tests/*/.))) tests_ci = extras/github/ pytest_flags = -p no:warnings --cov-report=term --cov-report=html --cov-report=xml --cov=hathor @@ -31,7 +31,7 @@ tests-nano: .PHONY: tests-cli tests-cli: - pytest --durations=10 --cov=hathor/cli/ --cov-config=.coveragerc_full --cov-fail-under=27 -p no:warnings $(tests_cli) + pytest --durations=10 --cov=hathor_cli/ --cov-config=.coveragerc_full --cov-fail-under=27 -p no:warnings $(tests_cli) .PHONY: tests-doctests tests-doctests: @@ -47,9 +47,9 @@ tests-quick: .PHONY: tests-genesis tests-genesis: - HATHOR_TEST_CONFIG_YAML='./hathor/conf/mainnet.yml' pytest -n0 tests/tx/test_genesis.py - HATHOR_TEST_CONFIG_YAML='./hathor/conf/testnet.yml' pytest -n0 tests/tx/test_genesis.py - HATHOR_TEST_CONFIG_YAML='./hathor/conf/nano_testnet.yml' pytest -n0 tests/tx/test_genesis.py + HATHOR_TEST_CONFIG_YAML='./hathor/conf/mainnet.yml' pytest -n0 hathor_tests/tx/test_genesis.py + HATHOR_TEST_CONFIG_YAML='./hathor/conf/testnet.yml' pytest -n0 hathor_tests/tx/test_genesis.py + HATHOR_TEST_CONFIG_YAML='./hathor/conf/nano_testnet.yml' pytest -n0 hathor_tests/tx/test_genesis.py .PHONY: tests-ci tests-ci: @@ -64,17 +64,17 @@ tests: tests-cli tests-lib tests-genesis tests-custom tests-ci .PHONY: tests-full tests-full: - pytest $(pytest_flags) --durations=10 --cov-config=.coveragerc_full ./tests + pytest $(pytest_flags) --durations=10 --cov-config=.coveragerc_full ./hathor_tests # checking: .PHONY: mypy mypy: - mypy -p hathor -p tests -p extras.custom_tests + mypy -p hathor -p hathor_tests -p extras.custom_tests .PHONY: dmypy dmypy: - dmypy run --timeout 86400 -- -p hathor -p tests -p extras.custom_tests + dmypy run --timeout 86400 -- -p hathor -p hathor_tests -p extras.custom_tests .PHONY: flake8 flake8: @@ -111,8 +111,8 @@ isort: .PHONY: clean-pyc clean-pyc: - find hathor tests -name \*.pyc -delete - find hathor tests -name __pycache__ -delete + find hathor hathor_tests -name \*.pyc -delete + find hathor hathor_tests -name __pycache__ -delete .PHONY: clean-caches clean-caches: diff --git a/docs/README.md b/docs/README.md index 916c1f2a4..3f48c87a6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -7,7 +7,7 @@ This directory contains a miscellany of documents of Hathor core. Hathor core documentation is distributed over the following locations: - For users: [Hathor full node at Hathor docs](https://docs.hathor.network/pathways/components/full-node). - At the root of the `hathor-core` repository for default documents (license, readme, etc.). -- [API documentation following Open API standard](../hathor/cli). +- [API documentation following Open API standard](../hathor_cli). - [RFCs](https://github.com/HathorNetwork/rfcs). - And finally, this directory for all other documents. diff --git a/docs/developing.md b/docs/developing.md index fecd59a9c..0d06418a5 100644 --- a/docs/developing.md +++ b/docs/developing.md @@ -35,7 +35,7 @@ Generate API docs: ``` hathor-cli generate_openapi_json -redoc-cli bundle hathor/cli/openapi_files/openapi.json --output index.html +redoc-cli bundle hathor/_openapi/openapi.json --output index.html ``` [open-issue]: https://github.com/HathorNetwork/hathor-core/issues/new diff --git a/extras/custom_checks.sh b/extras/custom_checks.sh index 4bf8cf5db..f143f23a9 100644 --- a/extras/custom_checks.sh +++ b/extras/custom_checks.sh @@ -6,7 +6,7 @@ GREEN='\033[0;32m' NC='\033[0m' # No Color # Source dirs -SOURCE_DIRS=(hathor tests) +SOURCE_DIRS=(hathor hathor_tests) # Define your custom linter check functions here # Each function should return 0 if everything is OK, and 1 if something is wrong. @@ -15,7 +15,7 @@ function check_version_match() { # This function will check all source files containing the project version and return 1 in case # they don't match. When a version is provided as an environment variable, it is checked against the package version. - OPENAPI_FILE="hathor/cli/openapi_files/openapi_base.json" + OPENAPI_FILE="hathor/_openapi/openapi_base.json" SRC_FILE="hathor/version.py" PACKAGE_FILE="pyproject.toml" @@ -57,8 +57,8 @@ function check_do_not_use_builtin_random_in_tests() { exclude=( hathor/merged_mining/debug_api.py hathor/client.py - hathor/cli/tx_generator.py - tests/test_utils/test_leb128.py + hathor_cli/tx_generator.py + hathor_tests/test_utils/test_leb128.py ) exclude_params=() for item in "${exclude[@]}"; do @@ -82,9 +82,9 @@ function check_deprecated_typing() { } function check_do_not_import_tests_in_hathor() { - if grep -Rn '\<.*import .*tests.*\>\|\<.*from .*tests.* import\>' "hathor" | grep -v '# skip-import-tests-custom-check'; then + if grep -Rn '\<.*import .*hathor_tests.*\>\|\<.*from .*hathor_tests.* import\>' "hathor" | grep -v '# skip-import-tests-custom-check'; then echo 'do not import test definitions in the hathor module' - echo 'move them from tests to hathor instead' + echo 'move them from hathor_tests to hathor instead' echo 'alternatively, comment `# skip-import-tests-custom-check` to exclude a line.' return 1 fi @@ -92,9 +92,10 @@ function check_do_not_import_tests_in_hathor() { } function check_do_not_import_from_hathor_in_entrypoints() { + EXCLUDES=(--exclude=builder.py) PATTERN='^import .*hathor.*\|^from .*hathor.* import' - if grep -Rn "$PATTERN" "hathor/cli" | grep -v 'from hathor.cli.run_node import RunNode' | grep -v '# skip-cli-import-custom-check'; then + if grep -Rn $EXCLUDES "$PATTERN" "hathor_cli" | grep -v 'from hathor_cli.run_node import RunNode' | grep -v '# skip-cli-import-custom-check'; then echo 'do not import from `hathor` in the module-level of a CLI entrypoint.' echo 'instead, import locally inside the function that uses the import.' echo 'alternatively, comment `# skip-cli-import-custom-check` to exclude a line.' diff --git a/extras/nginx_docker/Makefile b/extras/nginx_docker/Makefile index 4fa71531b..1d822ec0c 100644 --- a/extras/nginx_docker/Makefile +++ b/extras/nginx_docker/Makefile @@ -7,6 +7,39 @@ DEFAULT_NO_RATE_LIMIT_TAG = no-rate-limit-latest # Build and Push Commands # ======================= +# GCP / Hathor Testnet +HATHOR_TESTNET_REGISTRY = us-central1-docker.pkg.dev/hathor-testnet/fullnodes/webtank + +HATHOR_TESTNET_INDIA_TAG_LATEST = india-latest +HATHOR_TESTNET_INDIA_TAG_NO_RATE_LIMIT = india-no-rate-limit-latest + +.PHONY: hathor-testnet +hathor-testnet: hathor-testnet-default hathor-testnet-no-rate-limit hathor-testnet-india-default hathor-testnet-india-no-rate-limit + @echo "All Hathor Testnet images built and pushed successfully!" + +.PHONY: hathor-testnet-default +hathor-testnet-default: clean nginx.conf set_real_ip_from_cloudfront + @echo "Building and pushing latest image for Hathor Testnet..." + docker buildx build --pull --push --platform linux/arm64/v8,linux/amd64 --tag $(HATHOR_TESTNET_REGISTRY):$(DEFAULT_LATEST_TAG) . + +.PHONY: hathor-testnet-no-rate-limit +hathor-testnet-no-rate-limit: clean nginx_no_rate_limit.conf set_real_ip_from_cloudfront + @echo "Building and pushing no-rate-limit image for Hathor Testnet..." + mv nginx_no_rate_limit.conf nginx.conf + docker buildx build --pull --push --platform linux/arm64/v8,linux/amd64 --tag $(HATHOR_TESTNET_REGISTRY):$(DEFAULT_NO_RATE_LIMIT_TAG) . + +.PHONY: hathor-testnet-india-default +hathor-testnet-india-default: clean nginx_india.conf set_real_ip_from_cloudfront + @echo "Building and pushing india image for Hathor Testnet..." + mv nginx_india.conf nginx.conf + docker buildx build --pull --push --platform linux/arm64/v8,linux/amd64 --tag $(HATHOR_TESTNET_REGISTRY):$(HATHOR_TESTNET_INDIA_TAG_LATEST) . + +.PHONY: hathor-testnet-india-no-rate-limit +hathor-testnet-india-no-rate-limit: clean nginx_india_no_rate_limit.conf set_real_ip_from_cloudfront + @echo "Building and pushing no-rate-limit india image for Hathor Testnet..." + mv nginx_india_no_rate_limit.conf nginx.conf + docker buildx build --pull --push --platform linux/arm64/v8,linux/amd64 --tag $(HATHOR_TESTNET_REGISTRY):$(HATHOR_TESTNET_INDIA_TAG_NO_RATE_LIMIT) . + # GCP / Nano Testnet NANO_TESTNET_REGISTRY = us-central1-docker.pkg.dev/nano-testnet/fullnodes/webtank @@ -35,9 +68,9 @@ nano-testnet-bravo-default: clean nginx_bravo.conf set_real_ip_from_cloudfront docker buildx build --pull --push --platform linux/arm64/v8,linux/amd64 --tag $(NANO_TESTNET_REGISTRY):$(NANO_TESTNET_BRAVO_TAG_LATEST) . .PHONY: nano-testnet-bravo-no-rate-limit -nano-testnet-bravo-no-rate-limit: clean nginx_bravo.conf set_real_ip_from_cloudfront +nano-testnet-bravo-no-rate-limit: clean nginx_bravo_no_rate_limit.conf set_real_ip_from_cloudfront @echo "Building and pushing no-rate-limit bravo image for Nano Testnet..." - mv nginx_bravo.conf nginx.conf + mv nginx_bravo_no_rate_limit.conf nginx.conf docker buildx build --pull --push --platform linux/arm64/v8,linux/amd64 --tag $(NANO_TESTNET_REGISTRY):$(NANO_TESTNET_BRAVO_TAG_NO_RATE_LIMIT) . # GCP / Standalone Fullnodes @@ -76,6 +109,25 @@ ekvilibro-no-rate-limit: clean nginx_no_rate_limit.conf set_real_ip_from_cloudfr mv nginx_no_rate_limit.conf nginx.conf docker buildx build --pull --push --platform linux/arm64/v8,linux/amd64 --tag $(EKVILIBRO_REGISTRY):$(DEFAULT_NO_RATE_LIMIT_TAG) . +# GCP / Hathor Testnet Playground +HATHOR_TESTNET_PLAYGROUND_REGISTRY = us-central1-docker.pkg.dev/hathor-testnet-playground/fullnodes/webtank + +.PHONY: hathor-testnet-playground +hathor-testnet-playground: hathor-testnet-playground-default hathor-testnet-playground-no-rate-limit + @echo "All Hathor Testnet Playground images built and pushed successfully!" + +.PHONY: hathor-testnet-playground-default +hathor-testnet-playground-default: clean nginx_playground.conf set_real_ip_from_cloudfront + @echo "Building and pushing latest image for Hathor Testnet Playground..." + mv nginx_playground.conf nginx.conf + docker buildx build --pull --push --platform linux/arm64/v8,linux/amd64 --tag $(HATHOR_TESTNET_PLAYGROUND_REGISTRY):$(DEFAULT_LATEST_TAG) . + +.PHONY: hathor-testnet-playground-no-rate-limit +hathor-testnet-playground-no-rate-limit: clean nginx_playground_no_rate_limit.conf set_real_ip_from_cloudfront + @echo "Building and pushing no-rate-limit image for Hathor Testnet Playground..." + mv nginx_playground_no_rate_limit.conf nginx.conf + docker buildx build --pull --push --platform linux/arm64/v8,linux/amd64 --tag $(HATHOR_TESTNET_PLAYGROUND_REGISTRY):$(DEFAULT_NO_RATE_LIMIT_TAG) . + # AWS / Main Account AWS_MAIN_REGISTRY = 769498303037.dkr.ecr.us-east-1.amazonaws.com/webtank @@ -96,7 +148,7 @@ aws-main-no-rate-limit: clean nginx_no_rate_limit.conf set_real_ip_from_cloudfro # Build All (convenience command) .PHONY: build-all -build-all: nano-testnet standalone-fullnodes ekvilibro aws-main +build-all: hathor-testnet nano-testnet standalone-fullnodes ekvilibro hathor-testnet-playground aws-main @echo "All images built and pushed successfully!" # Legacy commands for backward compatibility @@ -127,6 +179,31 @@ nginx_bravo.conf: @python -c "import os; import hathor; print('Using hathor-core from:', os.path.dirname(hathor.__file__))" python -m hathor generate_nginx_config --override nano-testnet-bravo - > $@ +nginx_bravo_no_rate_limit.conf: export PYTHONPATH := ../.. +nginx_bravo_no_rate_limit.conf: + @python -c "import os; import hathor; print('Using hathor-core from:', os.path.dirname(hathor.__file__))" + python -m hathor generate_nginx_config --override nano-testnet-bravo --disable-rate-limits - > $@ + +nginx_india.conf: export PYTHONPATH := ../.. +nginx_india.conf: + @python -c "import os; import hathor; print('Using hathor-core from:', os.path.dirname(hathor.__file__))" + python -m hathor generate_nginx_config --override hathor-testnet-india - > $@ + +nginx_india_no_rate_limit.conf: export PYTHONPATH := ../.. +nginx_india_no_rate_limit.conf: + @python -c "import os; import hathor; print('Using hathor-core from:', os.path.dirname(hathor.__file__))" + python -m hathor generate_nginx_config --override hathor-testnet-india --disable-rate-limits - > $@ + +nginx_playground.conf: export PYTHONPATH := ../.. +nginx_playground.conf: + @python -c "import os; import hathor; print('Using hathor-core from:', os.path.dirname(hathor.__file__))" + python -m hathor generate_nginx_config --override hathor-testnet-playground - > $@ + +nginx_playground_no_rate_limit.conf: export PYTHONPATH := ../.. +nginx_playground_no_rate_limit.conf: + @python -c "import os; import hathor; print('Using hathor-core from:', os.path.dirname(hathor.__file__))" + python -m hathor generate_nginx_config --override hathor-testnet-playground --disable-rate-limits - > $@ + set_real_ip_from_cloudfront: curl https://ip-ranges.amazonaws.com/ip-ranges.json -s \ | jq '.prefixes|map(select(.service=="CLOUDFRONT"))[]|.ip_prefix' -r \ @@ -139,13 +216,18 @@ set_real_ip_from_cloudfront: .PHONY: clean clean: - rm -f nginx.conf nginx_no_rate_limit.conf nginx_bravo.conf set_real_ip_from_cloudfront + rm -f nginx.conf nginx_no_rate_limit.conf nginx_bravo.conf nginx_bravo_no_rate_limit.conf nginx_india.conf nginx_india_no_rate_limit.conf set_real_ip_from_cloudfront .PHONY: help help: @echo "Available commands:" @echo "" @echo "Project/Account Commands:" + @echo " hathor-testnet - Build and push all images for GCP Project Hathor Testnet" + @echo " hathor-testnet-default - Build and push default image for GCP Project Hathor Testnet" + @echo " hathor-testnet-no-rate-limit - Build and push no-rate-limit image for GCP Project Hathor Testnet" + @echo " hathor-testnet-india-default - Build and push india image for GCP Project Hathor Testnet" + @echo " hathor-testnet-india-no-rate-limit - Build and push no-rate-limit india image for GCP Project Hathor Testnet" @echo " nano-testnet - Build and push all images for GCP Project Nano Testnet" @echo " nano-testnet-default - Build and push default image for GCP Project Nano Testnet" @echo " nano-testnet-no-rate-limit - Build and push no-rate-limit image for GCP Project Nano Testnet" @@ -157,6 +239,9 @@ help: @echo " ekvilibro - Build and push all images for GCP Project Ekvilibro" @echo " ekvilibro-default - Build and push default image for GCP Project Ekvilibro" @echo " ekvilibro-no-rate-limit - Build and push no-rate-limit image for GCP Project Ekvilibro" + @echo " hathor-testnet-playground - Build and push all images for GCP Project Hathor Testnet Playground" + @echo " hathor-testnet-playground-default - Build and push default image for GCP Project Hathor Testnet Playground" + @echo " hathor-testnet-playground-no-rate-limit - Build and push no-rate-limit image for GCP Project Hathor Testnet Playground" @echo " aws-main - Build and push all images for AWS Main Account" @echo " aws-main-default - Build and push default image for AWS Main Account" @echo " aws-main-no-rate-limit - Build and push no-rate-limit image for AWS Main Account" @@ -172,8 +257,10 @@ help: @echo " docker-no-rate-limit - Alias for aws-main-no-rate-limit" @echo "" @echo "Supported Projects/Accounts:" + @echo " - Hathor Testnet: $(HATHOR_TESTNET_REGISTRY)" @echo " - Nano Testnet: $(NANO_TESTNET_REGISTRY)" @echo " - Standalone Fullnodes: $(STANDALONE_FULLNODES_REGISTRY)" @echo " - Ekvilibro: $(EKVILIBRO_REGISTRY)" + @echo " - Hathor Testnet Playground: $(HATHOR_TESTNET_PLAYGROUND_REGISTRY)" @echo " - AWS Main Account: $(AWS_MAIN_REGISTRY)" @echo "" diff --git a/hathor/__main__.py b/hathor/__main__.py index 37bec4827..8a317e633 100644 --- a/hathor/__main__.py +++ b/hathor/__main__.py @@ -13,5 +13,5 @@ # limitations under the License. if __name__ == '__main__': - from .cli import main + from hathor_cli import main main.main() diff --git a/hathor/cli/openapi_files/.gitignore b/hathor/_openapi/.gitignore similarity index 100% rename from hathor/cli/openapi_files/.gitignore rename to hathor/_openapi/.gitignore diff --git a/hathor/cli/__init__.py b/hathor/_openapi/__init__.py similarity index 100% rename from hathor/cli/__init__.py rename to hathor/_openapi/__init__.py diff --git a/hathor/cli/openapi_files/openapi_base.json b/hathor/_openapi/openapi_base.json similarity index 90% rename from hathor/cli/openapi_files/openapi_base.json rename to hathor/_openapi/openapi_base.json index c537d03a9..c24ab9786 100644 --- a/hathor/cli/openapi_files/openapi_base.json +++ b/hathor/_openapi/openapi_base.json @@ -7,7 +7,7 @@ ], "info": { "title": "Hathor API", - "version": "0.67.1" + "version": "0.68.0" }, "consumes": [ "application/json" diff --git a/hathor/cli/openapi_files/openapi_components.json b/hathor/_openapi/openapi_components.json similarity index 100% rename from hathor/cli/openapi_files/openapi_components.json rename to hathor/_openapi/openapi_components.json diff --git a/hathor/cli/openapi_files/register.py b/hathor/_openapi/register.py similarity index 100% rename from hathor/cli/openapi_files/register.py rename to hathor/_openapi/register.py diff --git a/hathor/builder/__init__.py b/hathor/builder/__init__.py index 4e492162e..c5074064b 100644 --- a/hathor/builder/__init__.py +++ b/hathor/builder/__init__.py @@ -13,13 +13,11 @@ # limitations under the License. from hathor.builder.builder import BuildArtifacts, Builder, SyncSupportLevel -from hathor.builder.cli_builder import CliBuilder from hathor.builder.resources_builder import ResourcesBuilder __all__ = [ 'BuildArtifacts', 'Builder', - 'CliBuilder', 'ResourcesBuilder', 'SyncSupportLevel', ] diff --git a/hathor/builder/builder.py b/hathor/builder/builder.py index f52ccda59..860feafee 100644 --- a/hathor/builder/builder.py +++ b/hathor/builder/builder.py @@ -45,7 +45,9 @@ from hathor.reactor import ReactorProtocol as Reactor from hathor.storage import RocksDBStorage from hathor.stratum import StratumFactory +from hathor.transaction.json_serializer import VertexJsonSerializer from hathor.transaction.storage import TransactionCacheStorage, TransactionRocksDBStorage, TransactionStorage +from hathor.transaction.vertex_children import RocksDBVertexChildrenService from hathor.transaction.vertex_parser import VertexParser from hathor.util import Random, get_environment_info from hathor.verification.verification_service import VerificationService @@ -195,6 +197,8 @@ def __init__(self) -> None: self._runner_factory: RunnerFactory | None = None self._nc_log_config: NCLogConfig = NCLogConfig.NONE + self._vertex_json_serializer: VertexJsonSerializer | None = None + def build(self) -> BuildArtifacts: if self.artifacts is not None: raise ValueError('cannot call build twice') @@ -227,6 +231,7 @@ def build(self) -> BuildArtifacts: vertex_parser = self._get_or_create_vertex_parser() poa_block_producer = self._get_or_create_poa_block_producer() runner_factory = self._get_or_create_runner_factory() + vertex_json_serializer = self._get_or_create_vertex_json_serializer() if settings.ENABLE_NANO_CONTRACTS: tx_storage.nc_catalog = self._get_nc_catalog() @@ -272,6 +277,7 @@ def build(self) -> BuildArtifacts: poa_block_producer=poa_block_producer, runner_factory=runner_factory, feature_service=feature_service, + vertex_json_serializer=vertex_json_serializer, **kwargs ) @@ -507,12 +513,14 @@ def _get_or_create_tx_storage(self) -> TransactionStorage: rocksdb_storage = self._get_or_create_rocksdb_storage() nc_storage_factory = self._get_or_create_nc_storage_factory() vertex_parser = self._get_or_create_vertex_parser() + vertex_children_service = RocksDBVertexChildrenService(rocksdb_storage) self._tx_storage = TransactionRocksDBStorage( rocksdb_storage, indexes=store_indexes, settings=settings, vertex_parser=vertex_parser, nc_storage_factory=nc_storage_factory, + vertex_children_service=vertex_children_service, ) if self._tx_storage_cache: @@ -526,6 +534,7 @@ def _get_or_create_tx_storage(self) -> TransactionStorage: indexes=indexes, settings=settings, nc_storage_factory=nc_storage_factory, + vertex_children_service=vertex_children_service, **kwargs ) @@ -683,6 +692,17 @@ def _get_or_create_poa_block_producer(self) -> PoaBlockProducer | None: return self._poa_block_producer + def _get_or_create_vertex_json_serializer(self) -> VertexJsonSerializer: + if self._vertex_json_serializer is None: + tx_storage = self._get_or_create_tx_storage() + nc_log_storage = self._get_or_create_nc_log_storage() + self._vertex_json_serializer = VertexJsonSerializer( + storage=tx_storage, + nc_log_storage=nc_log_storage, + ) + + return self._vertex_json_serializer + def set_rocksdb_path(self, path: str | tempfile.TemporaryDirectory) -> 'Builder': if self._tx_storage: raise ValueError('cannot set rocksdb path after tx storage is set') diff --git a/hathor/builder/resources_builder.py b/hathor/builder/resources_builder.py index 635de9892..23ee34fc2 100644 --- a/hathor/builder/resources_builder.py +++ b/hathor/builder/resources_builder.py @@ -31,9 +31,9 @@ from hathor.prometheus import PrometheusMetricsExporter if TYPE_CHECKING: - from hathor.cli.run_node_args import RunNodeArgs from hathor.event.websocket.factory import EventWebsocketFactory from hathor.manager import HathorManager + from hathor_cli.run_node_args import RunNodeArgs logger = get_logger() diff --git a/hathor/conf/localnet.yml b/hathor/conf/localnet.yml index d175faeaf..60f35ba53 100644 --- a/hathor/conf/localnet.yml +++ b/hathor/conf/localnet.yml @@ -1,6 +1,6 @@ P2PKH_VERSION_BYTE: x49 MULTISIG_VERSION_BYTE: x87 -NETWORK_NAME: local-privatenet +NETWORK_NAME: privatenet BOOTSTRAP_DNS: [] # Ledger genesis @@ -24,4 +24,7 @@ REWARD_SPEND_MIN_BLOCKS: 1 CHECKPOINTS: [] +ENABLE_NANO_CONTRACTS: 'enabled' +NC_ON_CHAIN_BLUEPRINT_RESTRICTED: false + extends: testnet.yml diff --git a/hathor/conf/settings.py b/hathor/conf/settings.py index a2cc56af9..fadcb3f52 100644 --- a/hathor/conf/settings.py +++ b/hathor/conf/settings.py @@ -409,7 +409,10 @@ def GENESIS_TX2_TIMESTAMP(self) -> int: WS_SEND_METRICS_INTERVAL: int = 1 # Interval (in seconds) to write data to prometheus - PROMETHEUS_WRITE_INTERVAL: int = 5 + PROMETHEUS_WRITE_INTERVAL: int = 15 + + # Interval (in seconds) to update GC data for prometheus + PROMETHEUS_UPDATE_GC_INTERVAL: int = 60 # Interval (in seconds) to collect metrics data METRICS_COLLECT_DATA_INTERVAL: int = 5 diff --git a/hathor/conf/testnet.yml b/hathor/conf/testnet.yml index 5ea81465d..ac18ce7ea 100644 --- a/hathor/conf/testnet.yml +++ b/hathor/conf/testnet.yml @@ -45,3 +45,9 @@ ENABLE_NANO_CONTRACTS: feature_activation NC_ON_CHAIN_BLUEPRINT_ALLOWED_ADDRESSES: - WWFiNeWAFSmgtjm4ht2MydwS5GY3kMJsEK - WQFDxic8xWWnMLL4aE5abY2XRKPNvGhtjY + +SOFT_VOIDED_TX_IDS: + - 00000000e03c4aa950f87cb2c0317f0e5fbd58561ad9a30916126426dcd5f283 + +SKIP_VERIFICATION: + - 00000000e03c4aa950f87cb2c0317f0e5fbd58561ad9a30916126426dcd5f283 diff --git a/hathor/consensus/block_consensus.py b/hathor/consensus/block_consensus.py index 954ca3b4a..5f7a68917 100644 --- a/hathor/consensus/block_consensus.py +++ b/hathor/consensus/block_consensus.py @@ -283,10 +283,19 @@ def _nc_execute_calls(self, block: Block, *, is_reorg: bool) -> None: assert tx.storage.indexes is not None tx.storage.indexes.handle_contract_execution(tx) + # Pubsub event to indicate execution success + self.context.nc_exec_success.append(tx) + # We only emit events when the nc is successfully executed. assert self.context.nc_events is not None last_call_info = runner.get_last_call_info() - self.context.nc_events.append((tx, last_call_info.nc_logger.__events__)) + events_list = last_call_info.nc_logger.__events__ + self.context.nc_events.append((tx, events_list)) + + # Store events in transaction metadata + if events_list: + tx_meta.nc_events = [(event.nc_id, event.data) for event in events_list] + self.context.save(tx) finally: # We save logs regardless of whether the nc successfully executed. self._nc_log_storage.save_logs(tx, runner.get_last_call_info(), exception_and_tb) @@ -441,11 +450,11 @@ def update_voided_info(self, block: Block) -> None: parent = block.get_block_parent() parent_meta = parent.get_metadata() - assert block.hash in parent_meta.children + assert block.hash in parent.get_children() # This method is called after the metadata of the parent is updated. # So, if the parent has only one child, it must be the current block. - is_connected_to_the_head = bool(len(parent_meta.children) == 1) + is_connected_to_the_head = parent.get_children().is_single() is_connected_to_the_best_chain = bool(not parent_meta.voided_by) if is_connected_to_the_head and is_connected_to_the_best_chain: diff --git a/hathor/consensus/consensus.py b/hathor/consensus/consensus.py index 15fe538d7..14569a885 100644 --- a/hathor/consensus/consensus.py +++ b/hathor/consensus/consensus.py @@ -195,6 +195,10 @@ def unsafe_update(self, base: BaseTransaction) -> None: tx_affected.storage.indexes.update(tx_affected) context.pubsub.publish(HathorEvents.CONSENSUS_TX_UPDATE, tx=tx_affected) + # signal all transactions of which the execution succeeded + for tx_nc_success in context.nc_exec_success: + context.pubsub.publish(HathorEvents.NC_EXEC_SUCCESS, tx=tx_nc_success) + # handle custom NC events if isinstance(base, Block): assert context.nc_events is not None @@ -290,7 +294,6 @@ def _remove_transactions( - all indexes will be updated """ parents_to_update: dict[bytes, list[bytes]] = defaultdict(list) - dangling_children: set[bytes] = set() txset = {tx.hash for tx in txs} for tx in txs: tx_meta = tx.get_metadata() @@ -298,21 +301,26 @@ def _remove_transactions( assert bool(tx_meta.voided_by), 'removed txs must be voided' for parent in set(tx.parents) - txset: parents_to_update[parent].append(tx.hash) - dangling_children.update(set(tx_meta.children) - txset) + for child in tx.get_children(): + if child not in txset: + raise AssertionError( + 'It is an error to try to remove transactions that would leave a gap in the DAG' + ) for spending_txs in tx_meta.spent_outputs.values(): - dangling_children.update(set(spending_txs) - txset) + if set(spending_txs) - txset: + raise AssertionError( + 'It is an error to try to remove transactions that would leave a gap in the DAG' + ) for tx_input in tx.inputs: spent_tx = tx.get_spent_tx(tx_input) spent_tx_meta = spent_tx.get_metadata() if tx.hash in spent_tx_meta.spent_outputs[tx_input.index]: spent_tx_meta.spent_outputs[tx_input.index].remove(tx.hash) context.save(spent_tx) - assert not dangling_children, 'It is an error to try to remove transactions that would leave a gap in the DAG' for parent_hash, children_to_remove in parents_to_update.items(): parent_tx = storage.get_transaction(parent_hash) - parent_meta = parent_tx.get_metadata() for child in children_to_remove: - parent_meta.children.remove(child) + storage.vertex_children.remove_child(parent_tx, child) context.save(parent_tx) for tx in txs: self.log.debug('remove transaction', tx=tx.hash_hex) diff --git a/hathor/consensus/context.py b/hathor/consensus/context.py index f08164edd..ae9bb2f5d 100644 --- a/hathor/consensus/context.py +++ b/hathor/consensus/context.py @@ -51,6 +51,7 @@ class ConsensusAlgorithmContext: 'txs_affected', 'reorg_info', 'nc_events', + 'nc_exec_success', ) consensus: 'ConsensusAlgorithm' @@ -60,6 +61,7 @@ class ConsensusAlgorithmContext: txs_affected: set[BaseTransaction] reorg_info: ReorgInfo | None nc_events: list[tuple[Transaction, list[NCEvent]]] | None + nc_exec_success: list[Transaction] def __init__(self, consensus: 'ConsensusAlgorithm', pubsub: PubSubManager) -> None: self.consensus = consensus @@ -69,6 +71,7 @@ def __init__(self, consensus: 'ConsensusAlgorithm', pubsub: PubSubManager) -> No self.txs_affected = set() self.reorg_info = None self.nc_events = None + self.nc_exec_success = [] def save(self, tx: BaseTransaction) -> None: """Only metadata is ever saved in a consensus update.""" diff --git a/hathor/dag_builder/vertex_exporter.py b/hathor/dag_builder/vertex_exporter.py index 4c8223c3a..b19b5a986 100644 --- a/hathor/dag_builder/vertex_exporter.py +++ b/hathor/dag_builder/vertex_exporter.py @@ -364,7 +364,7 @@ def _replace_escaped_vertex_id(match: re.Match) -> str: from hathor.nanocontracts.api_arguments_parser import parse_nc_method_call from hathor.nanocontracts.method import Method nc_method_raw = _TEMPLATE_PATTERN.sub(_replace_escaped_vertex_id, nc_method_raw) - nc_method, nc_args = parse_nc_method_call(blueprint_class, nc_method_raw) + nc_method, nc_args, _ = parse_nc_method_call(blueprint_class, nc_method_raw) method = Method.from_callable(getattr(blueprint_class, nc_method)) nc_args_bytes = method.serialize_args_bytes(nc_args) diff --git a/hathor/debug_resources.py b/hathor/debug_resources.py index 5d0707b2f..804a77b1f 100644 --- a/hathor/debug_resources.py +++ b/hathor/debug_resources.py @@ -20,8 +20,8 @@ from twisted.internet.interfaces import IReactorFromThreads from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_arg_default, get_args -from hathor.cli.openapi_files.register import register_resource from hathor.exception import HathorError from hathor.manager import HathorManager from hathor.reactor import ReactorProtocol @@ -155,7 +155,7 @@ def render_GET(self, request: Request) -> bytes: assert level in self.valid_log_levels log_func = getattr(log, level) msg = get_arg_default(raw_args, 'msg', self.default_log_msg) - # TODO: maybe add an `extras` param (probably as a json body via POST) to add arbitray structed attributes + # TODO: maybe add an `extras` param (probably as a json body via POST) to add arbitrarily structed attributes log_func(msg) return b'OK: no side-effects\n' diff --git a/hathor/difficulty.py b/hathor/difficulty.py index 4a8467ef8..2f8c58369 100644 --- a/hathor/difficulty.py +++ b/hathor/difficulty.py @@ -37,7 +37,7 @@ - pdiff -> u256 - weight -> u256 -From the above conversions it is possible to make all converions between (hash, target, bdiff, pdiff, weight) using +From the above conversions it is possible to make all conversions between (hash, target, bdiff, pdiff, weight) using u256 as intermediary. # References diff --git a/hathor/event/event_manager.py b/hathor/event/event_manager.py index 8eb828b28..97e3713d9 100644 --- a/hathor/event/event_manager.py +++ b/hathor/event/event_manager.py @@ -23,9 +23,13 @@ from hathor.event.storage import EventStorage from hathor.event.websocket import EventWebsocketFactory from hathor.execution_manager import ExecutionManager +from hathor.nanocontracts.runner.index_records import CreateTokenRecord from hathor.pubsub import EventArguments, HathorEvents, PubSubManager from hathor.reactor import ReactorProtocol as Reactor -from hathor.transaction import BaseTransaction +from hathor.transaction import BaseTransaction, Transaction +from hathor.transaction.nc_execution_state import NCExecutionState +from hathor.transaction.token_creation_tx import TokenCreationTransaction +from hathor.transaction.transaction_metadata import TransactionMetadata from hathor.util import not_none, progress from hathor.utils.iter import batch_iterator @@ -48,6 +52,7 @@ HathorEvents.CONSENSUS_TX_UPDATE, HathorEvents.CONSENSUS_TX_REMOVED, HathorEvents.NC_EVENT, + HathorEvents.NC_EXEC_SUCCESS, ] @@ -170,9 +175,15 @@ def on_full_node_crash(self) -> None: def _handle_hathor_event(self, hathor_event: HathorEvents, event_args: EventArguments) -> None: """Handles a PubSub 'HathorEvents' event.""" + event_type = EventType.from_hathor_event(hathor_event) + if event_type is not None: + self._handle_event(event_type, event_args) - self._handle_event(event_type, event_args) + if hathor_event == HathorEvents.NETWORK_NEW_TX_ACCEPTED: + self._handle_token_creation_events(event_args) + elif hathor_event == HathorEvents.NC_EXEC_SUCCESS: + self._handle_nc_token_creation_events(event_args) def _handle_event(self, event_type: EventType, event_args: EventArguments) -> None: """Handles an Event Queue feature 'EventType' event.""" @@ -240,6 +251,59 @@ def _create_non_group_edge_event(self, event_type: EventType, event_args: EventA group_id=group_id, ) + def _handle_token_creation_events(self, event_args: EventArguments) -> None: + """Emit token-related events for accepted transactions.""" + tx = getattr(event_args, 'tx', None) + if isinstance(tx, TokenCreationTransaction): + assert tx.hash is not None + token_event_args = EventArguments( + tx=tx, + token_uid=tx.hash_hex, + token_name=tx.token_name, + token_symbol=tx.token_symbol, + token_version=tx.token_version, + nc_exec_info=None, + ) + + self._handle_event(EventType.TOKEN_CREATED, token_event_args) + + def _handle_nc_token_creation_events(self, event_args: EventArguments) -> None: + """Emit NC token-created events when a contract execution succeeds.""" + tx = getattr(event_args, 'tx', None) + assert isinstance(tx, Transaction) + assert tx.is_nano_contract() + meta = tx.get_metadata() + assert meta.nc_execution == NCExecutionState.SUCCESS + self._emit_nc_token_created_events(tx, meta) + + def _emit_nc_token_created_events( + self, + tx: Transaction, + meta: TransactionMetadata, + ) -> None: + if not meta.nc_calls: + return + assert tx.hash is not None + tx_hash_hex = tx.hash_hex + assert meta.first_block is not None + first_block_hex = meta.first_block.hex() + for call in meta.nc_calls: + for record in call.index_updates: + if not isinstance(record, CreateTokenRecord): + continue + token_event_args = EventArguments( + tx=tx, + token_uid=record.token_uid.hex(), + token_name=record.token_name, + token_symbol=record.token_symbol, + token_version=record.token_version, + nc_exec_info={ + 'nc_tx': tx_hash_hex, + 'nc_block': first_block_hex, + }, + ) + self._handle_event(EventType.TOKEN_CREATED, token_event_args) + def _create_event( self, event_type: EventType, diff --git a/hathor/event/model/event_data.py b/hathor/event/model/event_data.py index ad2921309..0d22ca402 100644 --- a/hathor/event/model/event_data.py +++ b/hathor/event/model/event_data.py @@ -23,6 +23,7 @@ from hathor.pubsub import EventArguments from hathor.transaction import Transaction from hathor.transaction.headers import VertexHeaderId +from hathor.transaction.token_info import TokenVersion from hathor.utils.pydantic import BaseModel @@ -46,6 +47,13 @@ class TxInput(BaseModel): spent_output: TxOutput +class NcExecInfo(BaseModel): + # Which transaction is responsible for causing the event + nc_tx: str + # Which block executed the transaction above, it's redundant but should be useful + nc_block: str + + class NanoHeader(BaseModel): id: str nc_seqnum: int @@ -69,7 +77,6 @@ class TxMetadata(BaseModel, extra=Extra.ignore): conflict_with: list[str] voided_by: list[str] received_by: list[int] - children: list[str] twins: list[str] accumulated_weight: float score: float @@ -228,5 +235,31 @@ def from_event_arguments(cls, args: EventArguments) -> NCEventData: ) +class TokenCreatedData(BaseEventData): + """Class that represents the creation of a new token.""" + + token_uid: str + # this is None when the creation originated from a TokenCreationTransaction + nc_exec_info: NcExecInfo | None + token_name: str + token_symbol: str + token_version: TokenVersion + + @classmethod + def from_event_arguments(cls, args: EventArguments) -> 'TokenCreatedData': + nc_exec_info = getattr(args, 'nc_exec_info', None) + if nc_exec_info is not None and not isinstance(nc_exec_info, NcExecInfo): + nc_exec_info = NcExecInfo(**nc_exec_info) + return cls( + token_uid=args.token_uid, + nc_exec_info=nc_exec_info, + token_name=args.token_name, + token_symbol=args.token_symbol, + token_version=args.token_version, + ) + + # Union type to encompass BaseEventData polymorphism -EventData: TypeAlias = EmptyData | TxData | TxDataWithoutMeta | ReorgData | NCEventData +EventData: TypeAlias = ( + EmptyData | TxData | TxDataWithoutMeta | ReorgData | NCEventData | TokenCreatedData +) diff --git a/hathor/event/model/event_type.py b/hathor/event/model/event_type.py index bba786664..d2ef969ca 100644 --- a/hathor/event/model/event_type.py +++ b/hathor/event/model/event_type.py @@ -12,9 +12,19 @@ # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations + from enum import Enum -from hathor.event.model.event_data import BaseEventData, EmptyData, NCEventData, ReorgData, TxData, TxDataWithoutMeta +from hathor.event.model.event_data import ( + BaseEventData, + EmptyData, + NCEventData, + ReorgData, + TokenCreatedData, + TxData, + TxDataWithoutMeta, +) from hathor.pubsub import HathorEvents @@ -28,15 +38,12 @@ class EventType(Enum): VERTEX_REMOVED = 'VERTEX_REMOVED' FULL_NODE_CRASHED = 'FULL_NODE_CRASHED' NC_EVENT = 'NC_EVENT' + TOKEN_CREATED = 'TOKEN_CREATED' @classmethod - def from_hathor_event(cls, hathor_event: HathorEvents) -> 'EventType': + def from_hathor_event(cls, hathor_event: HathorEvents) -> EventType | None: """Create an Event Queue feature EventType from a PubSub HathorEvents.""" - event = _HATHOR_EVENT_TO_EVENT_TYPE.get(hathor_event) - - assert event is not None, f'Cannot create EventType from {hathor_event}' - - return event + return _HATHOR_EVENT_TO_EVENT_TYPE.get(hathor_event) def data_type(self) -> type[BaseEventData]: return _EVENT_TYPE_TO_EVENT_DATA[self] @@ -61,4 +68,5 @@ def data_type(self) -> type[BaseEventData]: EventType.VERTEX_REMOVED: TxDataWithoutMeta, EventType.FULL_NODE_CRASHED: EmptyData, EventType.NC_EVENT: NCEventData, + EventType.TOKEN_CREATED: TokenCreatedData, } diff --git a/hathor/event/resources/event.py b/hathor/event/resources/event.py index 87e7ada9b..e328a8852 100644 --- a/hathor/event/resources/event.py +++ b/hathor/event/resources/event.py @@ -18,8 +18,8 @@ from pydantic import Field, NonNegativeInt from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.event import EventManager from hathor.event.model.base_event import BaseEvent from hathor.utils.api import ErrorResponse, QueryParams, Response diff --git a/hathor/feature_activation/resources/feature.py b/hathor/feature_activation/resources/feature.py index bb65e7d67..8aeea6f48 100644 --- a/hathor/feature_activation/resources/feature.py +++ b/hathor/feature_activation/resources/feature.py @@ -16,8 +16,8 @@ from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.conf.settings import HathorSettings from hathor.feature_activation.feature import Feature from hathor.feature_activation.feature_service import FeatureService diff --git a/hathor/graphviz.py b/hathor/graphviz.py index b358784f2..a2803033e 100644 --- a/hathor/graphviz.py +++ b/hathor/graphviz.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. - from itertools import chain from typing import Iterator @@ -21,11 +20,20 @@ from hathor.conf.get_settings import get_global_settings from hathor.transaction import BaseTransaction from hathor.transaction.storage import TransactionStorage +from hathor.util import collect_n + +_DEFAULT_MAX_CHILDREN = 20 class GraphvizVisualizer: - def __init__(self, storage: TransactionStorage, include_funds: bool = False, - include_verifications: bool = False, only_blocks: bool = False): + def __init__( + self, + storage: TransactionStorage, + include_funds: bool = False, + include_verifications: bool = False, + only_blocks: bool = False, + max_children: int = _DEFAULT_MAX_CHILDREN, + ): self._settings = get_global_settings() self.storage = storage @@ -60,6 +68,8 @@ def __init__(self, storage: TransactionStorage, include_funds: bool = False, self._blocks_set: set[bytes] = set() self._txs_set: set[bytes] = set() + self.MAX_CHILDREN = max_children + def get_node_label(self, tx: BaseTransaction) -> str: """ Return the node's label for tx. """ @@ -211,6 +221,7 @@ def tx_neighborhood(self, tx: BaseTransaction, format: str = 'pdf', node_attrs.update(dict(style='filled', penwidth='5.0')) meta = tx.get_metadata() + limited_children, has_more_children = collect_n(iter(tx.get_children()), self.MAX_CHILDREN) if graph_type == 'verification': if tx.is_block: @@ -219,12 +230,17 @@ def tx_neighborhood(self, tx: BaseTransaction, format: str = 'pdf', dot.node(name, **node_attrs) if level <= max_level: - for h in chain(tx.parents, meta.children): + for h in chain(tx.parents, limited_children): if h not in seen: seen.add(h) tx2 = tx.storage.get_transaction(h) to_visit.append((level + 1, tx2)) + if has_more_children: + extra_children_id = f'{tx.hash_hex}_extra_children' + dot.node(extra_children_id, label='more children') + dot.edge(extra_children_id, name) + for h in tx.parents: if h in seen: dot.edge(name, h.hex()) diff --git a/hathor/healthcheck/resources/healthcheck.py b/hathor/healthcheck/resources/healthcheck.py index bcc872e4f..887c6f0e5 100644 --- a/hathor/healthcheck/resources/healthcheck.py +++ b/hathor/healthcheck/resources/healthcheck.py @@ -12,8 +12,8 @@ from twisted.web.http import Request from twisted.web.server import NOT_DONE_YET +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_arg_default, get_args -from hathor.cli.openapi_files.register import register_resource from hathor.manager import HathorManager from hathor.util import json_dumpb diff --git a/hathor/indexes/memory_tips_index.py b/hathor/indexes/memory_tips_index.py index b1b419bfa..08eec1028 100644 --- a/hathor/indexes/memory_tips_index.py +++ b/hathor/indexes/memory_tips_index.py @@ -96,8 +96,7 @@ def add_tx(self, tx: BaseTransaction) -> bool: # Check whether any children has already been added. # It so, the end of the interval is equal to the smallest timestamp of the children. min_timestamp = inf - meta = tx.get_metadata() - for child_hash in meta.children: + for child_hash in tx.get_children(): if child_hash in self.tx_last_interval: child = tx.storage.get_transaction(child_hash) min_timestamp = min(min_timestamp, child.timestamp) @@ -143,7 +142,7 @@ def update_tx(self, tx: BaseTransaction, *, relax_assert: bool = False) -> None: pi = self.tx_last_interval[tx.hash] min_timestamp = inf - for child_hash in meta.children: + for child_hash in tx.get_children(): if child_hash in self.tx_last_interval: child = tx.storage.get_transaction(child_hash) min_timestamp = min(min_timestamp, child.timestamp) diff --git a/hathor/indexes/mempool_tips_index.py b/hathor/indexes/mempool_tips_index.py index 1071f0bc0..16fd4c005 100644 --- a/hathor/indexes/mempool_tips_index.py +++ b/hathor/indexes/mempool_tips_index.py @@ -103,7 +103,7 @@ def init_loop_step(self, tx: BaseTransaction) -> None: return tx_storage = tx.storage # do not include transactions that have a non-voided child - if any_non_voided(tx_storage, tx_meta.children): + if any_non_voided(tx_storage, tx.get_children()): return # do not include transactions that have a non-voided spent output if any_non_voided(tx_storage, chain(*tx_meta.spent_outputs.values())): @@ -147,7 +147,7 @@ def update(self, tx: BaseTransaction, *, force_remove: bool = False) -> None: continue # might also happen that a tip has a child or a spender that became valid, so it's not a tip anymore - has_non_voided_child = lambda: any_non_voided(tx_storage, meta.children) + has_non_voided_child = lambda: any_non_voided(tx_storage, tip_tx.get_children()) has_non_voided_spender = lambda: any_non_voided(tx_storage, chain(*meta.spent_outputs.values())) if has_non_voided_child() or has_non_voided_spender(): to_remove.add(tip_tx.hash) @@ -163,8 +163,9 @@ def update(self, tx: BaseTransaction, *, force_remove: bool = False) -> None: meta = not_none(tx_storage.get_metadata(tx_hash)) if meta.voided_by: continue + to_remove_parent = tx_storage.get_transaction(tx_hash) # check if it has any valid children or spenders - has_non_voided_child = lambda: any_non_voided(tx_storage, meta.children) + has_non_voided_child = lambda: any_non_voided(tx_storage, to_remove_parent.get_children()) has_non_voided_spender = lambda: any_non_voided(tx_storage, chain(*meta.spent_outputs.values())) if not has_non_voided_child() and not has_non_voided_spender(): to_add.add(tx_hash) diff --git a/hathor/indexes/rocksdb_utils.py b/hathor/indexes/rocksdb_utils.py index c6f372136..d30d1d691 100644 --- a/hathor/indexes/rocksdb_utils.py +++ b/hathor/indexes/rocksdb_utils.py @@ -130,6 +130,22 @@ def get_all_internal(self) -> Iterable[bytes]: for _cf, rocksdb_key in it: yield rocksdb_key + def get_value(self, key: bytes) -> bytes | None: + """Get the value with the provided key, or None if it doesn't exist.""" + return self._db.get((self._cf, key)) + + def put(self, key: bytes, value: bytes) -> None: + """Put the value with the provided key.""" + self._db.put((self._cf, key), value) + + def delete(self, key: bytes) -> None: + """Delete the value with the provided key.""" + self._db.delete((self._cf, key)) + + def iterkeys(self) -> 'rocksdb.KeysIterator': + """Iter over the keys in the column family.""" + return self._db.iterkeys(self._cf) + class RocksDBSimpleSet(Collection[bytes], RocksDBIndexUtils): def __init__(self, db: 'rocksdb.DB', log: 'structlog.stdlib.BoundLogger', *, cf_name: bytes) -> None: diff --git a/hathor/ipykernel.py b/hathor/ipykernel.py index 31e942346..2bd0d2c58 100644 --- a/hathor/ipykernel.py +++ b/hathor/ipykernel.py @@ -32,7 +32,7 @@ def __init__(self, runtime_dir: Optional[str] = None): # https://ipykernel.readthedocs.io/en/stable/api/ipykernel.html#ipykernel.kernelapp.IPKernelApp.connection_dir # https://github.com/ipython/ipykernel/blob/main/ipykernel/kernelapp.py#L301-L320 # if not defined now, when init_connection_file is called it will be set to 'kernel-.json', it is - # defined now because it's more convinient to have a fixed path that doesn't depend on the PID of the + # defined now because it's more convenient to have a fixed path that doesn't depend on the PID of the # running process, which doesn't benefit us anyway since the data dir self.connection_dir = runtime_dir self.connection_file = 'kernel.json' @@ -56,7 +56,7 @@ def log_connection_info(self) -> None: # https://ipykernel.readthedocs.io/en/stable/api/ipykernel.html#ipykernel.kernelapp.IPKernelApp.configure_tornado_logger def configure_tornado_logger(self) -> None: - # XXX: we already setup tornago logging on hathor.cli.util.setup_logging prevent this class from overriding it + # XXX: we already setup tornago logging on hathor_cli.util.setup_logging prevent this class from overriding it pass # https://ipykernel.readthedocs.io/en/stable/api/ipykernel.html#ipykernel.kernelapp.IPKernelApp.start diff --git a/hathor/manager.py b/hathor/manager.py index d48deb611..30682f918 100644 --- a/hathor/manager.py +++ b/hathor/manager.py @@ -57,6 +57,7 @@ from hathor.reward_lock import is_spent_reward_locked from hathor.stratum import StratumFactory from hathor.transaction import BaseTransaction, Block, MergeMinedBlock, Transaction, TxVersion +from hathor.transaction.json_serializer import VertexJsonSerializer from hathor.transaction.storage.exceptions import TransactionDoesNotExist from hathor.transaction.storage.transaction_storage import TransactionStorage from hathor.transaction.storage.tx_allow_scope import TxAllowScope @@ -114,6 +115,7 @@ def __init__( vertex_parser: VertexParser, runner_factory: RunnerFactory, feature_service: FeatureService, + vertex_json_serializer: VertexJsonSerializer, hostname: Optional[str] = None, wallet: Optional[BaseWallet] = None, capabilities: Optional[list[str]] = None, @@ -203,6 +205,7 @@ def __init__( self.vertex_parser = vertex_parser self.runner_factory = runner_factory self.feature_service = feature_service + self.vertex_json_serializer = vertex_json_serializer self.websocket_factory = websocket_factory diff --git a/hathor/merged_mining/coordinator.py b/hathor/merged_mining/coordinator.py index 1873fa95a..c38a3287b 100644 --- a/hathor/merged_mining/coordinator.py +++ b/hathor/merged_mining/coordinator.py @@ -198,7 +198,7 @@ def to_stratum_params(self) -> list: [i[::-1].hex() for i in self.merkle_path], encode_uint32(self.version)[::-1].hex(), self.bits.hex(), - encode_uint32(self.timestamp)[::-1].hex(), # FIXME/TODO: verify actual endianess + encode_uint32(self.timestamp)[::-1].hex(), # FIXME/TODO: verify actual endianness self.clean ] diff --git a/hathor/metrics.py b/hathor/metrics.py index b53752342..d018438a1 100644 --- a/hathor/metrics.py +++ b/hathor/metrics.py @@ -121,10 +121,10 @@ class Metrics: def __post_init__(self) -> None: self.log = logger.new() - # Stores caculated tx weights saved in tx storage + # Stores calculated tx weights saved in tx storage self.weight_tx_deque: deque[WeightValue] = deque(maxlen=self.weight_tx_deque_len) - # Stores caculated block weights saved in tx storage + # Stores calculated block weights saved in tx storage self.weight_block_deque: deque[WeightValue] = deque(maxlen=self.weight_block_deque_len) # A timer to periodically collect data diff --git a/hathor/nanocontracts/api_arguments_parser.py b/hathor/nanocontracts/api_arguments_parser.py index 41b595a83..61276d143 100644 --- a/hathor/nanocontracts/api_arguments_parser.py +++ b/hathor/nanocontracts/api_arguments_parser.py @@ -20,7 +20,7 @@ from hathor.nanocontracts.method import Method -def parse_nc_method_call(blueprint_class: type[Blueprint], call_info: str) -> tuple[str, Any]: +def parse_nc_method_call(blueprint_class: type[Blueprint], call_info: str) -> tuple[str, Any, Method]: """Parse a string that represents an invocation to a Nano Contract method. The string must be in the following format: `method(arg1, arg2, arg3)`. @@ -43,4 +43,4 @@ def parse_nc_method_call(blueprint_class: type[Blueprint], call_info: str) -> tu method = Method.from_callable(method_callable) parsed_args = method.args.json_to_value(args_json) - return method_name, parsed_args + return method_name, parsed_args, method diff --git a/hathor/nanocontracts/nc_types/__init__.py b/hathor/nanocontracts/nc_types/__init__.py index 442891305..cd8489cc2 100644 --- a/hathor/nanocontracts/nc_types/__init__.py +++ b/hathor/nanocontracts/nc_types/__init__.py @@ -106,7 +106,6 @@ # builtin types: bool: BoolNCType, bytes: BytesNCType, - dict: DictNCType, frozenset: FrozenSetNCType, int: VarInt32NCType, str: StrNCType, @@ -133,6 +132,7 @@ ARG_TYPE_TO_NC_TYPE_MAP: TypeToNCTypeMap = { **FIELD_TYPE_TO_NC_TYPE_MAP, # bultin types: + dict: DictNCType, list: ListNCType, set: SetNCType, # other Python types: diff --git a/hathor/nanocontracts/resources/blueprint.py b/hathor/nanocontracts/resources/blueprint.py index c557d666d..bf6f9d5ed 100644 --- a/hathor/nanocontracts/resources/blueprint.py +++ b/hathor/nanocontracts/resources/blueprint.py @@ -18,8 +18,8 @@ import typing from typing import TYPE_CHECKING, Any, Optional +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.nanocontracts import types as nc_types from hathor.nanocontracts.blueprint import NC_FIELDS_ATTR from hathor.nanocontracts.context import Context diff --git a/hathor/nanocontracts/resources/blueprint_source_code.py b/hathor/nanocontracts/resources/blueprint_source_code.py index 193790a0c..7f82de155 100644 --- a/hathor/nanocontracts/resources/blueprint_source_code.py +++ b/hathor/nanocontracts/resources/blueprint_source_code.py @@ -14,8 +14,8 @@ from typing import TYPE_CHECKING +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.nanocontracts.exception import BlueprintDoesNotExist, OCBBlueprintNotConfirmed from hathor.nanocontracts.types import blueprint_id_from_bytes from hathor.utils.api import ErrorResponse, QueryParams, Response diff --git a/hathor/nanocontracts/resources/builtin.py b/hathor/nanocontracts/resources/builtin.py index a75abe90b..6ec5e5cba 100644 --- a/hathor/nanocontracts/resources/builtin.py +++ b/hathor/nanocontracts/resources/builtin.py @@ -18,8 +18,8 @@ from sortedcontainers import SortedKeyList from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.manager import HathorManager from hathor.nanocontracts import Blueprint from hathor.util import collect_n diff --git a/hathor/nanocontracts/resources/history.py b/hathor/nanocontracts/resources/history.py index 9e10bfd35..19be828c4 100644 --- a/hathor/nanocontracts/resources/history.py +++ b/hathor/nanocontracts/resources/history.py @@ -16,8 +16,8 @@ from pydantic import Field +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.nanocontracts.exception import NanoContractDoesNotExist from hathor.transaction.storage.exceptions import TransactionDoesNotExist from hathor.utils.api import ErrorResponse, QueryParams, Response @@ -101,9 +101,15 @@ def render_GET(self, request: 'Request') -> bytes: count = params.count has_more = False - history_list = [] + history_list: list[dict[str, Any]] = [] for idx, tx_id in enumerate(iter_history): - history_list.append(tx_storage.get_transaction(tx_id).to_json_extended()) + tx = tx_storage.get_transaction(tx_id) + tx_json = self.manager.vertex_json_serializer.to_json_extended( + tx, + include_nc_logs=params.include_nc_logs, + include_nc_events=params.include_nc_events, + ) + history_list.append(tx_json) if idx >= count - 1: # Check if iterator still has more elements try: @@ -129,6 +135,8 @@ class NCHistoryParams(QueryParams): after: Optional[str] before: Optional[str] count: int = Field(default=100, lt=500) + include_nc_logs: bool = Field(default=False) + include_nc_events: bool = Field(default=False) class NCHistoryResponse(Response): @@ -231,6 +239,23 @@ class NCHistoryResponse(Response): 'schema': { 'type': 'string', } + }, { + 'name': 'include_nc_logs', + 'in': 'query', + 'description': 'Include nano contract execution logs in the response. Default is false.', + 'required': False, + 'schema': { + 'type': 'boolean', + } + }, { + 'name': 'include_nc_events', + 'in': 'query', + 'description': 'Include nano contract events emitted during execution in the response. ' + 'Default is false.', + 'required': False, + 'schema': { + 'type': 'boolean', + } } ], 'responses': { diff --git a/hathor/nanocontracts/resources/nc_creation.py b/hathor/nanocontracts/resources/nc_creation.py index dbaee6e6b..9eadea29a 100644 --- a/hathor/nanocontracts/resources/nc_creation.py +++ b/hathor/nanocontracts/resources/nc_creation.py @@ -17,15 +17,15 @@ from pydantic import Field from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.manager import HathorManager from hathor.nanocontracts.exception import NanoContractDoesNotExist from hathor.nanocontracts.resources.on_chain import SortOrder from hathor.nanocontracts.types import BlueprintId, VertexId from hathor.transaction import Transaction from hathor.transaction.storage.exceptions import TransactionDoesNotExist -from hathor.util import bytes_from_hex, collect_n, not_none +from hathor.util import bytes_from_hex, not_none from hathor.utils.api import ErrorResponse, QueryParams, Response @@ -138,11 +138,13 @@ def render_GET(self, request: Request) -> bytes: ) iter_nc_ids = iter_getter2(tx_start=ref_tx) - nc_id_txs, has_more = collect_n(iter_nc_ids, params.count) - nc_txs = [] - for nc_id in nc_id_txs: - item = self._get_nc_creation_item(nc_id) - if item is not None: + nc_txs: list[NCCreationItem] = [] + has_more = False + for nc_id in iter_nc_ids: + if len(nc_txs) >= params.count: + has_more = True + break + if item := self._get_nc_creation_item(nc_id): nc_txs.append(item) response = NCCreationResponse( @@ -202,11 +204,6 @@ def _get_nc_creation_item(self, nc_id: bytes) -> NCCreationItem | None: created_at=created_at, ) - def _get_nc_creation_item_strict(self, nc_id: bytes) -> NCCreationItem: - tx = self._get_nc_creation_item(nc_id) - assert tx is not None - return tx - class NCCreationParams(QueryParams): before: str | None diff --git a/hathor/nanocontracts/resources/nc_exec_logs.py b/hathor/nanocontracts/resources/nc_exec_logs.py index e18e76f3e..388eff124 100644 --- a/hathor/nanocontracts/resources/nc_exec_logs.py +++ b/hathor/nanocontracts/resources/nc_exec_logs.py @@ -17,8 +17,8 @@ from pydantic import Field from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.manager import HathorManager from hathor.nanocontracts.nc_exec_logs import NCLogLevel from hathor.transaction import Transaction @@ -117,7 +117,11 @@ class NCExecLogsResponse(QueryParams): NCExecLogsResource.openapi = { '/nano_contract/logs': { 'x-visibility': 'private', - 'x-visibility-override': {'nano-testnet-bravo': 'public'}, + 'x-visibility-override': { + 'nano-testnet-bravo': 'public', + 'hathor-testnet-india': 'public', + 'hathor-testnet-playground': 'public', + }, 'x-rate-limit': { 'global': [ { diff --git a/hathor/nanocontracts/resources/on_chain.py b/hathor/nanocontracts/resources/on_chain.py index 9f9a1c321..5de787a04 100644 --- a/hathor/nanocontracts/resources/on_chain.py +++ b/hathor/nanocontracts/resources/on_chain.py @@ -17,8 +17,8 @@ from pydantic import Field from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.manager import HathorManager from hathor.nanocontracts.exception import ( BlueprintDoesNotExist, diff --git a/hathor/nanocontracts/resources/state.py b/hathor/nanocontracts/resources/state.py index d782c62f7..be2f401b5 100644 --- a/hathor/nanocontracts/resources/state.py +++ b/hathor/nanocontracts/resources/state.py @@ -18,8 +18,8 @@ from pydantic import Field +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.crypto.util import decode_address from hathor.nanocontracts.api_arguments_parser import parse_nc_method_call from hathor.nanocontracts.exception import NanoContractDoesNotExist @@ -212,10 +212,9 @@ def render_GET(self, request: 'Request') -> bytes: calls: dict[str, NCValueSuccessResponse | NCValueErrorResponse] = {} for call_info in params.calls: try: - method_name, method_args = parse_nc_method_call(blueprint_class, call_info) + method_name, method_args, method = parse_nc_method_call(blueprint_class, call_info) value = runner.call_view_method(nc_id_bytes, method_name, *method_args) - if type(value) is bytes: - value = value.hex() + value = method.return_.value_to_json(value) except Exception as e: calls[call_info] = NCValueErrorResponse(errmsg=repr(e)) else: diff --git a/hathor/nanocontracts/runner/index_records.py b/hathor/nanocontracts/runner/index_records.py index 2e0123358..472a4b6f8 100644 --- a/hathor/nanocontracts/runner/index_records.py +++ b/hathor/nanocontracts/runner/index_records.py @@ -151,7 +151,10 @@ def from_json(cls, json_dict: dict[str, Any]) -> Self: NCIndexUpdateRecord: TypeAlias = ( - CreateContractRecord | CreateTokenRecord | UpdateTokenBalanceRecord | UpdateAuthoritiesRecord + CreateContractRecord + | CreateTokenRecord + | UpdateTokenBalanceRecord + | UpdateAuthoritiesRecord ) diff --git a/hathor/p2p/resources/add_peers.py b/hathor/p2p/resources/add_peers.py index fcfe9732d..f755b6c77 100644 --- a/hathor/p2p/resources/add_peers.py +++ b/hathor/p2p/resources/add_peers.py @@ -17,8 +17,8 @@ from twisted.internet.defer import Deferred from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import Resource, render_options, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.manager import HathorManager from hathor.p2p.peer_discovery import BootstrapPeerDiscovery from hathor.p2p.peer_endpoint import PeerEndpoint diff --git a/hathor/p2p/resources/healthcheck.py b/hathor/p2p/resources/healthcheck.py index a87182b8c..9eae2bf5f 100644 --- a/hathor/p2p/resources/healthcheck.py +++ b/hathor/p2p/resources/healthcheck.py @@ -1,5 +1,5 @@ +from hathor._openapi.register import register_resource from hathor.api_util import Resource -from hathor.cli.openapi_files.register import register_resource from hathor.manager import HathorManager from hathor.util import json_dumpb diff --git a/hathor/p2p/resources/mining.py b/hathor/p2p/resources/mining.py index dd6271a9f..a786bbdf2 100644 --- a/hathor/p2p/resources/mining.py +++ b/hathor/p2p/resources/mining.py @@ -19,8 +19,8 @@ from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_args -from hathor.cli.openapi_files.register import register_resource from hathor.crypto.util import decode_address from hathor.transaction import Block from hathor.util import json_dumpb, json_loadb diff --git a/hathor/p2p/resources/mining_info.py b/hathor/p2p/resources/mining_info.py index f08549ba9..8af2f5957 100644 --- a/hathor/p2p/resources/mining_info.py +++ b/hathor/p2p/resources/mining_info.py @@ -14,8 +14,8 @@ from math import log +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.conf.get_settings import get_global_settings from hathor.difficulty import Weight from hathor.util import json_dumpb diff --git a/hathor/p2p/resources/netfilter.py b/hathor/p2p/resources/netfilter.py index 5958976ea..84f28a0aa 100644 --- a/hathor/p2p/resources/netfilter.py +++ b/hathor/p2p/resources/netfilter.py @@ -15,8 +15,8 @@ from json import JSONDecodeError from typing import TYPE_CHECKING, Any +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_args, get_missing_params_msg, parse_args, render_options, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.p2p.netfilter import get_table from hathor.p2p.netfilter.matches import ( NetfilterMatchAll, diff --git a/hathor/p2p/resources/status.py b/hathor/p2p/resources/status.py index 68edb9f0e..c9de9faea 100644 --- a/hathor/p2p/resources/status.py +++ b/hathor/p2p/resources/status.py @@ -13,8 +13,8 @@ # limitations under the License. import hathor +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.conf.get_settings import get_global_settings from hathor.p2p.utils import to_serializable_best_blockchain from hathor.util import json_dumpb diff --git a/hathor/profiler/resources/cpu_profiler.py b/hathor/profiler/resources/cpu_profiler.py index f07b2bd8a..50f43382c 100644 --- a/hathor/profiler/resources/cpu_profiler.py +++ b/hathor/profiler/resources/cpu_profiler.py @@ -18,8 +18,8 @@ from twisted.web.http import Request import hathor +from hathor._openapi.register import register_resource from hathor.api_util import Resource, render_options, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.util import json_dumpb if TYPE_CHECKING: diff --git a/hathor/profiler/resources/profiler.py b/hathor/profiler/resources/profiler.py index 738d96d34..30d07f43b 100644 --- a/hathor/profiler/resources/profiler.py +++ b/hathor/profiler/resources/profiler.py @@ -16,8 +16,8 @@ from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import Resource, render_options, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.manager import HathorManager from hathor.util import json_dumpb, json_loadb diff --git a/hathor/prometheus.py b/hathor/prometheus.py index 5418c44d4..699869976 100644 --- a/hathor/prometheus.py +++ b/hathor/prometheus.py @@ -63,7 +63,8 @@ } GC_METRICS = { - 'objects': 'Number of objects tracked by the garbage collector', + 'tracked_objects': 'Number of objects tracked by the garbage collector', + 'collection_counts': 'Counts used by GC to control the moment each generation should be collected', 'collections': 'Number of collections done by the garbage collector', 'collected': 'Number of objects collected by the garbage collector', 'uncollectable': 'Number of objects that could not be collected by the garbage collector', @@ -109,10 +110,17 @@ def __init__(self, metrics: 'Metrics', path: str, filename: str = 'hathor.prom', # Interval in which the write data method will be called (in seconds) self.call_interval: int = self._settings.PROMETHEUS_WRITE_INTERVAL + # Interval in which the update GC data method will be called (in seconds) + self.gc_update_interval: int = self._settings.PROMETHEUS_UPDATE_GC_INTERVAL + # A timer to periodically write data to prometheus self._lc_write_data = LoopingCall(self._write_data) self._lc_write_data.clock = get_global_reactor() + # A timer to periodically update GC data + self._lc_update_gc_data = LoopingCall(self._set_garbage_collection_metrics) + self._lc_update_gc_data.clock = get_global_reactor() + def _initial_setup(self) -> None: """ Start a collector registry to send data to node exporter and create one object to hold each metric data @@ -178,6 +186,7 @@ def start(self) -> None: """ self.running = True self._lc_write_data.start(self.call_interval, now=False) + self._lc_update_gc_data.start(self.gc_update_interval, now=False) def set_new_metrics(self) -> None: """ Update metric_gauges dict with new data from metrics @@ -187,7 +196,6 @@ def set_new_metrics(self) -> None: self._set_rocksdb_tx_storage_metrics() self._set_new_peer_connection_metrics() - self._set_garbage_collection_metrics() write_to_textfile(self.filepath, self.registry) @@ -212,7 +220,8 @@ def _set_garbage_collection_metrics(self) -> None: threshold = gc.get_threshold() for i in range(3): - self.gc_metrics['objects'].labels(generation=i).set(counts[i]) + self.gc_metrics['tracked_objects'].labels(generation=i).set(len(gc.get_objects(i))) + self.gc_metrics['collection_counts'].labels(generation=i).set(counts[i]) self.gc_metrics['collections'].labels(generation=i).set(stats[i]['collections']) self.gc_metrics['collected'].labels(generation=i).set(stats[i]['collected']) self.gc_metrics['uncollectable'].labels(generation=i).set(stats[i]['uncollectable']) diff --git a/hathor/pubsub.py b/hathor/pubsub.py index 395123a12..95f0f2bb7 100644 --- a/hathor/pubsub.py +++ b/hathor/pubsub.py @@ -16,7 +16,7 @@ from collections import defaultdict, deque from enum import Enum -from typing import TYPE_CHECKING, Any, Callable, Optional +from typing import TYPE_CHECKING, Any, Callable from structlog import get_logger from twisted.internet.interfaces import IDelayedCall, IReactorFromThreads @@ -26,8 +26,10 @@ from hathor.utils.zope import verified_cast if TYPE_CHECKING: + from hathor.event.model.event_data import NcExecInfo from hathor.nanocontracts.nc_exec_logs import NCEvent from hathor.transaction import BaseTransaction, Block + from hathor.transaction.token_info import TokenVersion logger = get_logger() @@ -99,6 +101,9 @@ class HathorEvents(Enum): REORG_FINISHED Triggered when consensus algorithm ends all changes involved in a reorg + + NC_EXEC_SUCCESS + Triggered when the execution state of a nano transaction becomes SUCCESS """ MANAGER_ON_START = 'manager:on_start' MANAGER_ON_STOP = 'manager:on_stop' @@ -143,18 +148,25 @@ class HathorEvents(Enum): NC_EVENT = 'nc:event' + NC_EXEC_SUCCESS = 'nc:exec_success' + class EventArguments: """Simple object for storing event arguments. """ # XXX: add these as needed, these attributes don't always exist, but when they do these are their types - tx: 'BaseTransaction' + tx: BaseTransaction reorg_size: int - old_best_block: 'Block' - new_best_block: 'Block' - common_block: 'Block' + old_best_block: Block + new_best_block: Block + common_block: Block nc_event: NCEvent + token_uid: str + token_name: str + token_symbol: str + token_version: TokenVersion + nc_exec_info: NcExecInfo | None def __init__(self, **kwargs: Any) -> None: for key, value in kwargs.items(): @@ -181,7 +193,7 @@ def __init__(self, reactor: Reactor) -> None: self.reactor = reactor self.log = logger.new() - self._call_later_id: Optional[IDelayedCall] = None + self._call_later_id: IDelayedCall | None = None def subscribe(self, key: HathorEvents, fn: PubSubCallable) -> None: """Subscribe to a specific event. diff --git a/hathor/stratum/resources.py b/hathor/stratum/resources.py index 65abc7629..891c43199 100644 --- a/hathor/stratum/resources.py +++ b/hathor/stratum/resources.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.manager import HathorManager from hathor.util import json_dumpb diff --git a/hathor/transaction/base_transaction.py b/hathor/transaction/base_transaction.py index d359c9e62..165ffc200 100644 --- a/hathor/transaction/base_transaction.py +++ b/hathor/transaction/base_transaction.py @@ -54,6 +54,7 @@ from hathor.conf.settings import HathorSettings from hathor.transaction import Transaction from hathor.transaction.storage import TransactionStorage # noqa: F401 + from hathor.transaction.vertex_children import VertexChildren logger = get_logger() @@ -767,10 +768,7 @@ def _update_parents_children_metadata(self) -> None: assert self.storage is not None for parent in self.get_parents(existing_only=True): - metadata = parent.get_metadata() - if self.hash not in metadata.children: - metadata.children.append(self.hash) - self.storage.save_transaction(parent, only_metadata=True) + self.storage.vertex_children.add_child(parent, self.hash) def _update_initial_accumulated_weight(self) -> None: """Update the vertex initial accumulated_weight.""" @@ -919,6 +917,11 @@ def set_static_metadata(self, static_metadata: StaticMetadataT | None) -> None: self._static_metadata = static_metadata + def get_children(self) -> VertexChildren: + """Return an iterator of this vertex's children.""" + assert self.storage is not None + return self.storage.vertex_children.get_children(self) + """ Type aliases for easily working with `GenericVertex`. A `Vertex` is a superclass that includes all specific diff --git a/hathor/transaction/block.py b/hathor/transaction/block.py index 4fd77e4c1..64a3aabab 100644 --- a/hathor/transaction/block.py +++ b/hathor/transaction/block.py @@ -128,7 +128,7 @@ def get_next_block_best_chain_hash(self) -> Optional[bytes]: assert not meta.voided_by candidates = [] - for h in meta.children: + for h in self.get_children(): blk = self.storage.get_transaction(h) assert blk.is_block blk_meta = blk.get_metadata() diff --git a/hathor/transaction/json_serializer.py b/hathor/transaction/json_serializer.py new file mode 100644 index 000000000..f6046c53d --- /dev/null +++ b/hathor/transaction/json_serializer.py @@ -0,0 +1,152 @@ +# Copyright 2021 Hathor Labs +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import TYPE_CHECKING, Any, Optional + +from hathor.transaction import BaseTransaction, Transaction + +if TYPE_CHECKING: + from hathor.nanocontracts.nc_exec_logs import NCLogStorage + from hathor.transaction.storage import TransactionStorage + + +class VertexJsonSerializer: + """Helper class for vertex/transaction serialization.""" + + def __init__( + self, + storage: 'TransactionStorage', + nc_log_storage: Optional['NCLogStorage'] = None, + ) -> None: + self.tx_storage = storage + self.nc_log_storage = nc_log_storage + + def to_json( + self, + tx: BaseTransaction, + decode_script: bool = False, + include_metadata: bool = False, + include_nc_logs: bool = False, + include_nc_events: bool = False, + ) -> dict[str, Any]: + """Serialize transaction to JSON.""" + # Get base JSON from transaction + data = tx.to_json(decode_script=decode_script, include_metadata=include_metadata) + + # Add nano contract logs if requested + if include_nc_logs: + self._add_nc_logs_to_dict(tx, data) + + # Add nano contract events if requested + if include_nc_events: + self._add_nc_events_to_dict(tx, data) + + return data + + def to_json_extended( + self, + tx: BaseTransaction, + include_nc_logs: bool = False, + include_nc_events: bool = False, + ) -> dict[str, Any]: + """Serialize transaction to extended JSON format.""" + data = tx.to_json_extended() + + # Add nano contract logs if requested + if include_nc_logs: + self._add_nc_logs_to_dict(tx, data) + + # Add nano contract events if requested + if include_nc_events: + self._add_nc_events_to_dict(tx, data) + + # Add decoded arguments if applicable + self._add_nc_args_decoded(tx, data) + + return data + + def _add_nc_logs_to_dict(self, tx: BaseTransaction, data: dict[str, Any]) -> None: + """Add nano contract execution logs to the data dictionary.""" + if not tx.is_nano_contract(): + return + + nc_logs: dict[str, Any] | None + if self.nc_log_storage is None: + nc_logs = {} + else: + nc_logs = self.nc_log_storage.get_json_logs(tx.hash) + + data['nc_logs'] = nc_logs + + def _add_nc_events_to_dict(self, tx: BaseTransaction, data: dict[str, Any]) -> None: + """Add nano contract events to the data dictionary.""" + if not tx.is_nano_contract(): + return + + meta = tx.get_metadata() + if meta.nc_events is None: + nc_events = [] + else: + nc_events = [ + {'nc_id': nc_id.hex(), 'data': event_data.hex()} + for nc_id, event_data in meta.nc_events + ] + + data['nc_events'] = nc_events + + def _add_nc_args_decoded(self, tx: BaseTransaction, data: dict[str, Any]) -> None: + if not tx.is_nano_contract(): + return + + assert isinstance(tx, Transaction) + nc_args_decoded = self.decode_nc_args(tx) + if nc_args_decoded is not None: + data['nc_args_decoded'] = nc_args_decoded + + def decode_nc_args(self, tx: 'Transaction') -> Any: + """Decode nano contract arguments. + + Returns a list of JSON-serialized argument strings, or None if decoding is not applicable. + """ + from hathor.nanocontracts.exception import NCFail + from hathor.nanocontracts.method import Method + from hathor.nanocontracts.types import BlueprintId + + meta = tx.get_metadata() + nano_header = tx.get_nano_header() + + if meta.nc_calls and len(meta.nc_calls) > 0: + # Get blueprint_id from the first nc_calls record + blueprint_id = BlueprintId(meta.nc_calls[0].blueprint_id) + else: + # Get blueprint_id from NanoHeader + blueprint_id = nano_header.get_blueprint_id(accept_failed_execution=True) + + try: + blueprint_class = self.tx_storage.get_blueprint_class(blueprint_id) + except NCFail: + return None + + method_callable = getattr(blueprint_class, nano_header.nc_method, None) + if method_callable is None: + return None + + method = Method.from_callable(method_callable) + + try: + args_tuple = method.deserialize_args_bytes(nano_header.nc_args_bytes) + except NCFail: + return None + + return method.args._value_to_json(args_tuple) diff --git a/hathor/transaction/resources/block_at_height.py b/hathor/transaction/resources/block_at_height.py index 9d4be036f..9d6577ded 100644 --- a/hathor/transaction/resources/block_at_height.py +++ b/hathor/transaction/resources/block_at_height.py @@ -14,8 +14,8 @@ from typing import TYPE_CHECKING, Any +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.util import json_dumpb from hathor.utils.api import ErrorResponse, QueryParams diff --git a/hathor/transaction/resources/create_tx.py b/hathor/transaction/resources/create_tx.py index 2d62cf3d3..2cae26f91 100644 --- a/hathor/transaction/resources/create_tx.py +++ b/hathor/transaction/resources/create_tx.py @@ -14,8 +14,8 @@ import base64 +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.crypto.util import decode_address from hathor.exception import InvalidNewTransaction from hathor.manager import HathorManager diff --git a/hathor/transaction/resources/dashboard.py b/hathor/transaction/resources/dashboard.py index 07add5d21..e3f7e5e54 100644 --- a/hathor/transaction/resources/dashboard.py +++ b/hathor/transaction/resources/dashboard.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_args, get_missing_params_msg, parse_args, parse_int, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.conf.get_settings import get_global_settings from hathor.util import json_dumpb diff --git a/hathor/transaction/resources/decode_tx.py b/hathor/transaction/resources/decode_tx.py index c97847d50..b0a4456a9 100644 --- a/hathor/transaction/resources/decode_tx.py +++ b/hathor/transaction/resources/decode_tx.py @@ -14,8 +14,8 @@ import struct +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_args, get_missing_params_msg, parse_args, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.conf.get_settings import get_global_settings from hathor.transaction.resources.transaction import get_tx_extra_data from hathor.util import json_dumpb diff --git a/hathor/transaction/resources/graphviz.py b/hathor/transaction/resources/graphviz.py index 0493d1111..47918055c 100644 --- a/hathor/transaction/resources/graphviz.py +++ b/hathor/transaction/resources/graphviz.py @@ -18,8 +18,8 @@ from twisted.internet import threads from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_args, parse_int, set_cors, validate_tx_hash -from hathor.cli.openapi_files.register import register_resource from hathor.conf.get_settings import get_global_settings from hathor.graphviz import GraphvizVisualizer from hathor.util import json_dumpb diff --git a/hathor/transaction/resources/mempool.py b/hathor/transaction/resources/mempool.py index 090406094..67bb316b6 100644 --- a/hathor/transaction/resources/mempool.py +++ b/hathor/transaction/resources/mempool.py @@ -16,8 +16,8 @@ from itertools import islice from typing import TYPE_CHECKING, Iterator +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_args, parse_args, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.conf.get_settings import get_global_settings from hathor.transaction import Transaction from hathor.util import json_dumpb diff --git a/hathor/transaction/resources/mining.py b/hathor/transaction/resources/mining.py index abe086cbb..deedce86b 100644 --- a/hathor/transaction/resources/mining.py +++ b/hathor/transaction/resources/mining.py @@ -16,8 +16,8 @@ from structlog import get_logger +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_args, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.conf.settings import HathorSettings from hathor.crypto.util import decode_address from hathor.exception import HathorError @@ -80,10 +80,13 @@ def render_GET(self, request): # XXX: miner can edit block data and output_script, so it's fine if address is None block = self.manager.generate_mining_block(address=address, merge_mined=merged_mining) block.init_static_metadata_from_storage(self._settings, self.manager.tx_storage) + block.hash = b'\x00' # serialize data = block.to_json(include_metadata=True) data.pop('hash') + assert data['metadata']['hash'] == '00' + data['metadata']['hash'] = None data.pop('inputs') data.pop('nonce', None) data.pop('aux_pow', None) diff --git a/hathor/transaction/resources/push_tx.py b/hathor/transaction/resources/push_tx.py index b2b376b82..0888348e0 100644 --- a/hathor/transaction/resources/push_tx.py +++ b/hathor/transaction/resources/push_tx.py @@ -19,8 +19,8 @@ from structlog import get_logger from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_args, parse_args, render_options, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.conf.get_settings import get_global_settings from hathor.exception import InvalidNewTransaction from hathor.transaction import Transaction diff --git a/hathor/transaction/resources/transaction.py b/hathor/transaction/resources/transaction.py index c2c11ee65..6f22a4437 100644 --- a/hathor/transaction/resources/transaction.py +++ b/hathor/transaction/resources/transaction.py @@ -17,6 +17,7 @@ from structlog import get_logger from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import ( Resource, get_args, @@ -26,7 +27,6 @@ set_cors, validate_tx_hash, ) -from hathor.cli.openapi_files.register import register_resource from hathor.conf.get_settings import get_global_settings from hathor.transaction import Block from hathor.transaction.base_transaction import BaseTransaction, TxVersion @@ -139,13 +139,15 @@ def get_tx_extra_data( serialized['tokens'] = detailed_tokens - return { + result = { 'success': True, 'tx': serialized, 'meta': meta.to_json_extended(tx.storage), 'spent_outputs': spent_outputs, } + return result + @register_resource class TransactionResource(Resource): @@ -202,8 +204,22 @@ def get_one_tx(self, request: Request) -> bytes: hash_bytes = bytes.fromhex(requested_hash) tx = self.manager.tx_storage.get_transaction(hash_bytes) tx.storage = self.manager.tx_storage + data = get_tx_extra_data(tx) + # Check for optional log/event parameters and add them if requested + include_nc_logs = raw_args.get(b'include_nc_logs', [b'false'])[0].decode('utf-8').lower() == 'true' + include_nc_events = raw_args.get(b'include_nc_events', [b'false'])[0].decode('utf-8').lower() == 'true' + + if include_nc_logs or include_nc_events: + if include_nc_logs: + self.manager.vertex_json_serializer._add_nc_logs_to_dict(tx, data) + if include_nc_events: + self.manager.vertex_json_serializer._add_nc_events_to_dict(tx, data) + + # Add decoded nano contract arguments if applicable + self.manager.vertex_json_serializer._add_nc_args_decoded(tx, data) + return json_dumpb(data) def _validate_index(self, request: Request) -> bytes | None: @@ -374,6 +390,26 @@ def get_list_tx(self, request): 'schema': { 'type': 'string' } + }, + { + 'name': 'include_nc_logs', + 'in': 'query', + 'description': 'Include nano contract execution logs for nano contract transactions. ' + 'Default is false.', + 'required': False, + 'schema': { + 'type': 'boolean' + } + }, + { + 'name': 'include_nc_events', + 'in': 'query', + 'description': 'Include nano contract events emitted during execution for nano contract ' + 'transactions. Default is false.', + 'required': False, + 'schema': { + 'type': 'boolean' + } } ], 'responses': { diff --git a/hathor/transaction/resources/transaction_confirmation.py b/hathor/transaction/resources/transaction_confirmation.py index 62ab52208..b583ae92d 100644 --- a/hathor/transaction/resources/transaction_confirmation.py +++ b/hathor/transaction/resources/transaction_confirmation.py @@ -15,8 +15,8 @@ from math import log2 from typing import Any +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_args, get_missing_params_msg, set_cors, validate_tx_hash -from hathor.cli.openapi_files.register import register_resource from hathor.manager import HathorManager from hathor.util import json_dumpb from hathor.utils.weight import weight_to_work, work_to_weight diff --git a/hathor/transaction/resources/tx_parents.py b/hathor/transaction/resources/tx_parents.py index 9cc312f2e..ba639b63d 100644 --- a/hathor/transaction/resources/tx_parents.py +++ b/hathor/transaction/resources/tx_parents.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.util import json_dumpb diff --git a/hathor/transaction/resources/utxo_search.py b/hathor/transaction/resources/utxo_search.py index a7c46382a..51d04e312 100644 --- a/hathor/transaction/resources/utxo_search.py +++ b/hathor/transaction/resources/utxo_search.py @@ -14,6 +14,7 @@ from typing import TYPE_CHECKING +from hathor._openapi.register import register_resource from hathor.api_util import ( Resource, get_arg_default, @@ -23,7 +24,6 @@ parse_int, set_cors, ) -from hathor.cli.openapi_files.register import register_resource from hathor.conf.get_settings import get_global_settings from hathor.crypto.util import decode_address from hathor.util import json_dumpb diff --git a/hathor/transaction/resources/validate_address.py b/hathor/transaction/resources/validate_address.py index 4fa05a2d8..3a96f20cb 100644 --- a/hathor/transaction/resources/validate_address.py +++ b/hathor/transaction/resources/validate_address.py @@ -15,8 +15,8 @@ import base64 from typing import Union +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.manager import HathorManager from hathor.transaction.scripts import create_base_script from hathor.util import api_catch_exceptions, json_dumpb diff --git a/hathor/transaction/storage/cache_storage.py b/hathor/transaction/storage/cache_storage.py index 5a82a42df..92ed984fd 100644 --- a/hathor/transaction/storage/cache_storage.py +++ b/hathor/transaction/storage/cache_storage.py @@ -26,6 +26,7 @@ from hathor.transaction.storage.migrations import MigrationState from hathor.transaction.storage.transaction_storage import BaseTransactionStorage from hathor.transaction.storage.tx_allow_scope import TxAllowScope +from hathor.transaction.vertex_children import VertexChildrenService if TYPE_CHECKING: from hathor.conf.settings import HathorSettings @@ -48,6 +49,7 @@ def __init__( *, settings: 'HathorSettings', nc_storage_factory: NCStorageFactory, + vertex_children_service: VertexChildrenService, indexes: Optional[IndexesManager], _clone_if_needed: bool = False, ) -> None: @@ -85,7 +87,13 @@ def __init__( # we need to use only one weakref dict, so we must first initialize super, and then # attribute the same weakref for both. - super().__init__(indexes=indexes, settings=settings, nc_storage_factory=nc_storage_factory) + super().__init__( + indexes=indexes, + settings=settings, + nc_storage_factory=nc_storage_factory, + vertex_children_service=vertex_children_service, + ) + self._tx_weakref = store._tx_weakref # XXX: just to make sure this isn't being used anywhere, setters/getters should be used instead del self._allow_scope @@ -256,3 +264,7 @@ def get_value(self, key: str) -> Optional[str]: def flush(self): self._flush_to_storage(self.dirty_txs.copy()) + + @override + def migrate_vertex_children(self) -> None: + self.store.migrate_vertex_children() diff --git a/hathor/transaction/storage/migrations/migrate_vertex_children.py b/hathor/transaction/storage/migrations/migrate_vertex_children.py new file mode 100644 index 000000000..9a0ac0f13 --- /dev/null +++ b/hathor/transaction/storage/migrations/migrate_vertex_children.py @@ -0,0 +1,35 @@ +# Copyright 2023 Hathor Labs +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import TYPE_CHECKING + +from structlog import get_logger + +from hathor.transaction.storage.migrations import BaseMigration + +if TYPE_CHECKING: + from hathor.transaction.storage import TransactionStorage + +logger = get_logger() + + +class Migration(BaseMigration): + def skip_empty_db(self) -> bool: + return True + + def get_db_name(self) -> str: + return 'migrate_vertex_children' + + def run(self, storage: 'TransactionStorage') -> None: + storage.migrate_vertex_children() diff --git a/hathor/transaction/storage/rocksdb_storage.py b/hathor/transaction/storage/rocksdb_storage.py index 63c3d4fda..8f9408ace 100644 --- a/hathor/transaction/storage/rocksdb_storage.py +++ b/hathor/transaction/storage/rocksdb_storage.py @@ -25,7 +25,10 @@ from hathor.transaction.storage.exceptions import TransactionDoesNotExist from hathor.transaction.storage.migrations import MigrationState from hathor.transaction.storage.transaction_storage import BaseTransactionStorage +from hathor.transaction.vertex_children import RocksDBVertexChildrenService from hathor.transaction.vertex_parser import VertexParser +from hathor.types import VertexId +from hathor.util import json_loadb, progress if TYPE_CHECKING: import rocksdb @@ -58,6 +61,7 @@ def __init__( settings: 'HathorSettings', vertex_parser: VertexParser, nc_storage_factory: NCStorageFactory, + vertex_children_service: RocksDBVertexChildrenService, ) -> None: self._cf_tx = rocksdb_storage.get_or_create_column_family(_CF_NAME_TX) self._cf_meta = rocksdb_storage.get_or_create_column_family(_CF_NAME_META) @@ -68,7 +72,12 @@ def __init__( self._rocksdb_storage = rocksdb_storage self._db = rocksdb_storage.get_db() self.vertex_parser = vertex_parser - super().__init__(indexes=indexes, settings=settings, nc_storage_factory=nc_storage_factory) + super().__init__( + indexes=indexes, + settings=settings, + nc_storage_factory=nc_storage_factory, + vertex_children_service=vertex_children_service, + ) def _load_from_bytes(self, tx_data: bytes, meta_data: bytes) -> 'BaseTransaction': from hathor.transaction.transaction_metadata import TransactionMetadata @@ -235,3 +244,42 @@ def get_value(self, key: str) -> Optional[str]: return None else: return data.decode() + + @override + def migrate_vertex_children(self) -> None: + """Migrate vertex children from metadata to their own column family.""" + import rocksdb + assert isinstance(self.vertex_children, RocksDBVertexChildrenService) + + def get_old_children_set(vertex_id: VertexId) -> set[VertexId]: + meta_bytes = self._db.get((self._cf_meta, vertex_id)) + assert isinstance(meta_bytes, bytes) + meta_dict = json_loadb(meta_bytes) + children = meta_dict['children'] + assert isinstance(children, list) + children_set = set(children) + assert len(children) == len(children_set) # sanity check whether we have duplicate children + return {bytes.fromhex(child_id) for child_id in children_set} + + batch = rocksdb.WriteBatch() + max_writes_per_batch = 10_000 + + self.log.info('copying vertex children to new structure...') + for vertex in progress(self._get_all_transactions(), log=self.log, total=None): + for child_id in get_old_children_set(vertex.hash): + # Manually write children to the cf instead of using the VertexChildrenService so we can use WriteBatch + key = RocksDBVertexChildrenService._to_key(vertex, child_id) + batch.put((self.vertex_children._cf, key), b'') + + if batch.count() >= max_writes_per_batch: + self._db.write(batch) + batch.clear() + + self._db.write(batch) # one last write to clear the last batch + + self.log.info('removing old vertex children metadata...') + for vertex in progress(self._get_all_transactions(), log=self.log, total=None): + # sanity check to confirm the migration was correct. + assert get_old_children_set(vertex.hash) == set(self.vertex_children.get_children(vertex)) + # saving metadata will remove the children list from the stored json. + self.save_transaction(vertex, only_metadata=True) diff --git a/hathor/transaction/storage/transaction_storage.py b/hathor/transaction/storage/transaction_storage.py index 30eec7ae9..d330ff24d 100644 --- a/hathor/transaction/storage/transaction_storage.py +++ b/hathor/transaction/storage/transaction_storage.py @@ -44,11 +44,13 @@ add_closest_ancestor_block, change_score_acc_weight_metadata, include_funds_for_first_block, + migrate_vertex_children, nc_storage_compat2, ) from hathor.transaction.storage.tx_allow_scope import TxAllowScope, tx_allow_context from hathor.transaction.transaction import Transaction from hathor.transaction.transaction_metadata import TransactionMetadata +from hathor.transaction.vertex_children import VertexChildrenService from hathor.types import VertexId if TYPE_CHECKING: @@ -105,13 +107,21 @@ class TransactionStorage(ABC): add_closest_ancestor_block.Migration, include_funds_for_first_block.Migration, nc_storage_compat2.Migration, + migrate_vertex_children.Migration, ] _migrations: list[BaseMigration] - def __init__(self, *, settings: HathorSettings, nc_storage_factory: NCStorageFactory) -> None: + def __init__( + self, + *, + settings: HathorSettings, + nc_storage_factory: NCStorageFactory, + vertex_children_service: VertexChildrenService, + ) -> None: self._settings = settings self._nc_storage_factory = nc_storage_factory + self.vertex_children = vertex_children_service # Weakref is used to guarantee that there is only one instance of each transaction in memory. self._tx_weakref: WeakValueDictionary[bytes, BaseTransaction] = WeakValueDictionary() self._tx_weakref_disabled: bool = False @@ -1222,6 +1232,10 @@ def get_on_chain_blueprint(self, blueprint_id: BlueprintId) -> OnChainBlueprint: # XXX: maybe use N blocks confirmation, like reward-locks return blueprint_tx + @abstractmethod + def migrate_vertex_children(self) -> None: + raise NotImplementedError + class BaseTransactionStorage(TransactionStorage): indexes: Optional[IndexesManager] @@ -1233,8 +1247,13 @@ def __init__( *, settings: HathorSettings, nc_storage_factory: NCStorageFactory, + vertex_children_service: VertexChildrenService, ) -> None: - super().__init__(settings=settings, nc_storage_factory=nc_storage_factory) + super().__init__( + settings=settings, + nc_storage_factory=nc_storage_factory, + vertex_children_service=vertex_children_service, + ) # Pubsub is used to publish tx voided and winner but it's optional self.pubsub = pubsub @@ -1436,7 +1455,7 @@ def __init__(self, tx: BaseTransaction): # XXX: We can safely discard because no other tx will try to visit this one, since timestamps are strictly # higher in children, meaning we cannot possibly have item.tx as a descendant of any tx in to_visit. seen.discard(item.tx.hash) - for child_tx_hash in item.tx.get_metadata().children: + for child_tx_hash in item.tx.get_children(): if child_tx_hash in seen: continue child_tx = self.get_transaction(child_tx_hash) diff --git a/hathor/transaction/storage/traversal.py b/hathor/transaction/storage/traversal.py index 7900cb8d6..b12c81de5 100644 --- a/hathor/transaction/storage/traversal.py +++ b/hathor/transaction/storage/traversal.py @@ -98,8 +98,7 @@ def _get_iterator(self, tx: 'BaseTransaction', *, is_left_to_right: bool) -> Ite if self.is_dag_verifications: if is_left_to_right: - meta = meta or tx.get_metadata() - it = chain(it, meta.children) + it = chain(it, tx.get_children()) else: it = chain(it, tx.parents) diff --git a/hathor/transaction/transaction.py b/hathor/transaction/transaction.py index 64e14c6f2..6bfdb6a30 100644 --- a/hathor/transaction/transaction.py +++ b/hathor/transaction/transaction.py @@ -323,9 +323,8 @@ def verify_checkpoint(self, checkpoints: list[Checkpoint]) -> None: assert self.storage is not None if self.is_genesis: return - meta = self.get_metadata() # at least one child must be checkpoint validated - for child_tx in map(self.storage.get_transaction, meta.children): + for child_tx in map(self.storage.get_transaction, self.get_children()): if child_tx.get_metadata().validation.is_checkpoint(): return raise InvalidNewTransaction(f'Invalid new transaction {self.hash_hex}: expected to reach a checkpoint but ' diff --git a/hathor/transaction/transaction_metadata.py b/hathor/transaction/transaction_metadata.py index bdbec9c84..f6b69934a 100644 --- a/hathor/transaction/transaction_metadata.py +++ b/hathor/transaction/transaction_metadata.py @@ -23,7 +23,7 @@ from hathor.transaction.nc_execution_state import NCExecutionState from hathor.transaction.types import MetaNCCallRecord from hathor.transaction.validation_state import ValidationState -from hathor.util import json_dumpb, json_loadb, practically_equal +from hathor.util import collect_n, json_dumpb, json_loadb, practically_equal from hathor.utils.weight import work_to_weight if TYPE_CHECKING: @@ -34,6 +34,9 @@ from hathor.transaction.storage import TransactionStorage +_MAX_JSON_CHILDREN = 100 + + class TransactionMetadata: hash: Optional[bytes] spent_outputs: dict[int, list[bytes]] @@ -41,7 +44,6 @@ class TransactionMetadata: conflict_with: Optional[list[bytes]] voided_by: Optional[set[bytes]] received_by: list[int] - children: list[bytes] twins: list[bytes] accumulated_weight: int score: int @@ -52,6 +54,8 @@ class TransactionMetadata: nc_block_root_id: Optional[bytes] nc_execution: Optional[NCExecutionState] nc_calls: Optional[list[MetaNCCallRecord]] + # Stores events emitted during nano contract execution + nc_events: Optional[list[tuple[bytes, bytes]]] # [(nc_id, event_data)] # A dict of features in the feature activation process and their respective state. Must only be used by Blocks, # is None otherwise. This is only used for caching, so it can be safely cleared up, as it would be recalculated @@ -83,6 +87,7 @@ def __init__( self.nc_block_root_id = nc_block_root_id self.nc_execution = None self.nc_calls = None + self.nc_events = None # Tx outputs that have been spent. # The key is the output index, while the value is a set of the transactions which spend the output. @@ -105,10 +110,6 @@ def __init__( # Store only the peers' id. self.received_by = [] - # List of transactions which have this transaction as parent. - # Store only the transactions' hash. - self.children = [] - # Hash of the transactions that are twin to this transaction. # Twin transactions have the same inputs and outputs self.twins = [] @@ -187,9 +188,9 @@ def __eq__(self, other: Any) -> bool: """Override the default Equals behavior""" if not isinstance(other, TransactionMetadata): return False - for field in ['hash', 'conflict_with', 'voided_by', 'received_by', 'children', + for field in ['hash', 'conflict_with', 'voided_by', 'received_by', 'accumulated_weight', 'twins', 'score', 'first_block', 'validation', - 'feature_states', 'nc_block_root_id', 'nc_calls', 'nc_execution']: + 'feature_states', 'nc_block_root_id', 'nc_calls', 'nc_execution', 'nc_events']: if (getattr(self, field) or None) != (getattr(other, field) or None): return False @@ -216,7 +217,6 @@ def to_storage_json(self) -> dict[str, Any]: for idx, hashes in self.spent_outputs.items(): data['spent_outputs'].append([idx, [h_bytes.hex() for h_bytes in hashes]]) data['received_by'] = list(self.received_by) - data['children'] = [x.hex() for x in self.children] data['conflict_with'] = [x.hex() for x in set(self.conflict_with)] if self.conflict_with else [] data['voided_by'] = [x.hex() for x in self.voided_by] if self.voided_by else [] data['twins'] = [x.hex() for x in self.twins] @@ -247,12 +247,22 @@ def to_storage_json(self) -> dict[str, Any]: data['nc_block_root_id'] = self.nc_block_root_id.hex() if self.nc_block_root_id else None data['nc_calls'] = [x.to_json() for x in self.nc_calls] if self.nc_calls else None data['nc_execution'] = self.nc_execution.value if self.nc_execution else None + # Serialize nc_events: [(nc_id, event_data)] + if self.nc_events: + data['nc_events'] = [(nc_id.hex(), event_data.hex()) for nc_id, event_data in self.nc_events] + else: + data['nc_events'] = None return data def to_json(self) -> dict[str, Any]: data = self.to_storage_json() data['accumulated_weight'] = work_to_weight(self.accumulated_weight) data['score'] = work_to_weight(self.score) + + limited_children, has_more_children = collect_n(iter(self.get_tx().get_children()), _MAX_JSON_CHILDREN) + data['children'] = [child_id.hex() for child_id in limited_children] + data['has_more_children'] = has_more_children + return data def to_json_extended(self, tx_storage: 'TransactionStorage') -> dict[str, Any]: @@ -274,7 +284,6 @@ def create_from_json(cls, data: dict[str, Any]) -> 'TransactionMetadata': for h_hex in hashes: meta.spent_outputs[idx].append(bytes.fromhex(h_hex)) meta.received_by = list(data['received_by']) - meta.children = [bytes.fromhex(h) for h in data['children']] if 'conflict_with' in data and data['conflict_with']: meta.conflict_with = [bytes.fromhex(h) for h in set(data['conflict_with'])] @@ -314,7 +323,7 @@ def create_from_json(cls, data: dict[str, Any]) -> 'TransactionMetadata': else: meta.nc_block_root_id = None - nc_execution_raw = data.get('nc_execution_raw') + nc_execution_raw = data.get('nc_execution') if nc_execution_raw is not None: meta.nc_execution = NCExecutionState(nc_execution_raw) else: @@ -326,6 +335,13 @@ def create_from_json(cls, data: dict[str, Any]) -> 'TransactionMetadata': else: meta.nc_calls = None + nc_events_raw = data.get('nc_events') + if nc_events_raw is not None: + meta.nc_events = [(bytes.fromhex(nc_id), bytes.fromhex(event_data)) + for nc_id, event_data in nc_events_raw] + else: + meta.nc_events = None + return meta @classmethod diff --git a/hathor/transaction/vertex_children.py b/hathor/transaction/vertex_children.py new file mode 100644 index 000000000..68f8b7710 --- /dev/null +++ b/hathor/transaction/vertex_children.py @@ -0,0 +1,133 @@ +# Copyright 2025 Hathor Labs +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from __future__ import annotations + +import itertools +from abc import ABC, abstractmethod +from typing import TYPE_CHECKING, Iterator, final + +from structlog import get_logger +from typing_extensions import override + +from hathor.indexes.rocksdb_utils import RocksDBIndexUtils +from hathor.storage import RocksDBStorage +from hathor.types import VertexId + +if TYPE_CHECKING: + from hathor.transaction import Vertex + +_VERTEX_CHILDREN_CF_NAME = b'vertex-children' + +logger = get_logger() + + +class VertexChildrenService(ABC): + """Abstract base class for managing children of vertices in the DAG.""" + __slots__ = () + + def get_children(self, parent: Vertex) -> VertexChildren: + """Return a VertexChildren object (an iterator) for the given parent vertex.""" + return VertexChildren(self, parent) + + @abstractmethod + def add_child(self, parent: Vertex, child_id: VertexId) -> None: + """Add a child to the given parent vertex.""" + raise NotImplementedError + + @abstractmethod + def remove_child(self, parent: Vertex, child_id: VertexId) -> None: + """Remove a child from the given parent vertex.""" + raise NotImplementedError + + @abstractmethod + def iter_children(self, parent: Vertex) -> Iterator[VertexId]: + """Iterate over the children of the given parent vertex.""" + raise NotImplementedError + + @abstractmethod + def contains_child(self, parent: Vertex, child_id: VertexId) -> bool: + """Check whether the given child is a child of the given parent vertex.""" + raise NotImplementedError + + +@final +class RocksDBVertexChildrenService(VertexChildrenService, RocksDBIndexUtils): + """ + RocksDB implementation of VertexChildrenService. + It stores children in its own column family, using `[parent_hash][child_hash]` as the key. It doesn't use values. + """ + __slots__ = () + + def __init__(self, rocksdb_storage: RocksDBStorage) -> None: + self.log = logger.new() + super().__init__(rocksdb_storage.get_db(), _VERTEX_CHILDREN_CF_NAME) + + @override + def add_child(self, parent: Vertex, child_id: VertexId) -> None: + key = self._to_key(parent, child_id) + self.put(key, b'') + + @override + def remove_child(self, parent: Vertex, child_id: VertexId) -> None: + key = self._to_key(parent, child_id) + self.delete(key) + + @override + def iter_children(self, parent: Vertex) -> Iterator[VertexId]: + it = self.iterkeys() + it.seek(parent.hash) + + for _cf, key in it: + parent_hash, child_hash = self._from_key(key) + if parent_hash != parent.hash: + break + yield child_hash + + @override + def contains_child(self, parent: Vertex, child_id: VertexId) -> bool: + key = self._to_key(parent, child_id) + return self.get_value(key) is not None + + @staticmethod + def _to_key(parent: Vertex, child_id: VertexId) -> bytes: + """Get the internal key from a parent and its child.""" + assert len(parent.hash) == 32 + assert len(child_id) == 32 + return parent.hash + child_id + + @staticmethod + def _from_key(key: bytes) -> tuple[VertexId, VertexId]: + """Get a parent and child id from the internal key.""" + assert len(key) == 64 + return key[:32], key[32:] + + +class VertexChildren: + """Utility iterator class for children of a vertex.""" + __slots__ = ('_service', '_parent') + + def __init__(self, service: VertexChildrenService, parent: Vertex) -> None: + self._service = service + self._parent = parent + + def __iter__(self) -> Iterator[VertexId]: + return self._service.iter_children(self._parent) + + def __contains__(self, vertex_id: VertexId) -> bool: + return self._service.contains_child(self._parent, vertex_id) + + def is_single(self) -> bool: + """Return whether this vertex has exactly one child.""" + return len(list(itertools.islice(self, 2))) == 1 diff --git a/hathor/util.py b/hathor/util.py index 785b6712a..4163eed5c 100644 --- a/hathor/util.py +++ b/hathor/util.py @@ -632,7 +632,7 @@ class sorted_merger(Iterator[T]): """ Adaptor class to merge multiple sorted iterators into a single iterator that is also sorted. Note: for this adaptor to work as expected the input iterators have to already be sorted, but if they aren't, the - resulting iterator won't crash, or unexpecetdly stop working, however it will not be sorted. + resulting iterator won't crash, or unexpectedly stop working, however it will not be sorted. A custom key function can be supplied to customize the sort order, and the reverse flag can be set to request the result in descending order. @@ -697,7 +697,7 @@ def __next__(self) -> T: if not self._iterators: raise StopIteration cmp = max if self._reverse else min - # XXX: this line bellow is correct, but it's just really hard to convince mypy of that, ignoring for now + # XXX: this line below is correct, but it's just really hard to convince mypy of that, ignoring for now best_it = cmp(self._iterators, key=lambda it: self._key(it.peek())) # type: ignore return next(best_it) diff --git a/hathor/version.py b/hathor/version.py index 7f6456d78..1243b5377 100644 --- a/hathor/version.py +++ b/hathor/version.py @@ -19,7 +19,7 @@ from structlog import get_logger -BASE_VERSION = '0.67.1' +BASE_VERSION = '0.68.0' DEFAULT_VERSION_SUFFIX = "local" BUILD_VERSION_FILE_PATH = "./BUILD_VERSION" diff --git a/hathor/version_resource.py b/hathor/version_resource.py index 2914082f7..8e28da181 100644 --- a/hathor/version_resource.py +++ b/hathor/version_resource.py @@ -13,8 +13,8 @@ # limitations under the License. import hathor +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.conf.get_settings import get_global_settings from hathor.feature_activation.feature_service import FeatureService from hathor.manager import HathorManager diff --git a/hathor/wallet/resources/address.py b/hathor/wallet/resources/address.py index 7bbc9b20b..73929cb77 100644 --- a/hathor/wallet/resources/address.py +++ b/hathor/wallet/resources/address.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_args, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.util import json_dumpb diff --git a/hathor/wallet/resources/balance.py b/hathor/wallet/resources/balance.py index b91adafd1..a3a1687fa 100644 --- a/hathor/wallet/resources/balance.py +++ b/hathor/wallet/resources/balance.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.conf.get_settings import get_global_settings from hathor.util import json_dumpb diff --git a/hathor/wallet/resources/history.py b/hathor/wallet/resources/history.py index eb2e85640..b3ecb8be9 100644 --- a/hathor/wallet/resources/history.py +++ b/hathor/wallet/resources/history.py @@ -14,8 +14,8 @@ import math +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_args, parse_int, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.util import json_dumpb diff --git a/hathor/wallet/resources/lock.py b/hathor/wallet/resources/lock.py index 7417934e4..5b19006b4 100644 --- a/hathor/wallet/resources/lock.py +++ b/hathor/wallet/resources/lock.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from hathor._openapi.register import register_resource from hathor.api_util import Resource, render_options, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.util import json_dumpb diff --git a/hathor/wallet/resources/nano_contracts/decode.py b/hathor/wallet/resources/nano_contracts/decode.py index f921f4377..adf335a4e 100644 --- a/hathor/wallet/resources/nano_contracts/decode.py +++ b/hathor/wallet/resources/nano_contracts/decode.py @@ -15,8 +15,8 @@ import re import struct +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_args, get_missing_params_msg, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.transaction import Transaction from hathor.transaction.scripts import NanoContractMatchValues from hathor.util import json_dumpb diff --git a/hathor/wallet/resources/nano_contracts/execute.py b/hathor/wallet/resources/nano_contracts/execute.py index ebf2c143c..694246d41 100644 --- a/hathor/wallet/resources/nano_contracts/execute.py +++ b/hathor/wallet/resources/nano_contracts/execute.py @@ -17,8 +17,8 @@ from json import JSONDecodeError from typing import Any, NamedTuple +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_missing_params_msg, render_options, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.crypto.util import decode_address from hathor.transaction import Transaction, TxInput, TxOutput from hathor.transaction.scripts import P2PKH, NanoContractMatchValues diff --git a/hathor/wallet/resources/nano_contracts/match_value.py b/hathor/wallet/resources/nano_contracts/match_value.py index d930f3935..d24412dc8 100644 --- a/hathor/wallet/resources/nano_contracts/match_value.py +++ b/hathor/wallet/resources/nano_contracts/match_value.py @@ -18,8 +18,8 @@ from json import JSONDecodeError from typing import Any, NamedTuple +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_missing_params_msg, render_options, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.crypto.util import decode_address from hathor.transaction import Transaction, TxInput, TxOutput from hathor.transaction.scripts import P2PKH, NanoContractMatchValues diff --git a/hathor/wallet/resources/send_tokens.py b/hathor/wallet/resources/send_tokens.py index 4ba1afa06..9cfbbfc5c 100644 --- a/hathor/wallet/resources/send_tokens.py +++ b/hathor/wallet/resources/send_tokens.py @@ -17,8 +17,8 @@ from twisted.internet import threads from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import Resource, render_options, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.conf.settings import HathorSettings from hathor.crypto.util import decode_address from hathor.exception import InvalidNewTransaction diff --git a/hathor/wallet/resources/sign_tx.py b/hathor/wallet/resources/sign_tx.py index 8b86c6af4..c4e64fc10 100644 --- a/hathor/wallet/resources/sign_tx.py +++ b/hathor/wallet/resources/sign_tx.py @@ -15,8 +15,8 @@ import re import struct +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_args, get_missing_params_msg, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.transaction import Transaction from hathor.util import json_dumpb diff --git a/hathor/wallet/resources/state.py b/hathor/wallet/resources/state.py index 90edb4788..9ebd8a299 100644 --- a/hathor/wallet/resources/state.py +++ b/hathor/wallet/resources/state.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.util import json_dumpb diff --git a/hathor/wallet/resources/thin_wallet/address_balance.py b/hathor/wallet/resources/thin_wallet/address_balance.py index 6e12568be..82b48a6ef 100644 --- a/hathor/wallet/resources/thin_wallet/address_balance.py +++ b/hathor/wallet/resources/thin_wallet/address_balance.py @@ -17,8 +17,8 @@ from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_args, get_missing_params_msg, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.conf.get_settings import get_global_settings from hathor.crypto.util import decode_address from hathor.transaction.scripts import parse_address_script diff --git a/hathor/wallet/resources/thin_wallet/address_history.py b/hathor/wallet/resources/thin_wallet/address_history.py index 4fc8fabf8..c5b09fd97 100644 --- a/hathor/wallet/resources/thin_wallet/address_history.py +++ b/hathor/wallet/resources/thin_wallet/address_history.py @@ -18,8 +18,8 @@ from structlog import get_logger from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_args, get_missing_params_msg, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.conf.get_settings import get_global_settings from hathor.crypto.util import decode_address from hathor.transaction.storage.exceptions import TransactionDoesNotExist diff --git a/hathor/wallet/resources/thin_wallet/address_search.py b/hathor/wallet/resources/thin_wallet/address_search.py index 124fb4732..097e20424 100644 --- a/hathor/wallet/resources/thin_wallet/address_search.py +++ b/hathor/wallet/resources/thin_wallet/address_search.py @@ -16,8 +16,8 @@ from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_args, get_missing_params_msg, parse_int, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.conf.get_settings import get_global_settings from hathor.crypto.util import decode_address from hathor.transaction.scripts import parse_address_script diff --git a/hathor/wallet/resources/thin_wallet/send_tokens.py b/hathor/wallet/resources/thin_wallet/send_tokens.py index 88ca7a425..d9860e776 100644 --- a/hathor/wallet/resources/thin_wallet/send_tokens.py +++ b/hathor/wallet/resources/thin_wallet/send_tokens.py @@ -23,8 +23,8 @@ from twisted.python.failure import Failure from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import Resource, render_options, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.conf.get_settings import get_global_settings from hathor.exception import InvalidNewTransaction from hathor.reactor import get_global_reactor diff --git a/hathor/wallet/resources/thin_wallet/token_history.py b/hathor/wallet/resources/thin_wallet/token_history.py index f0526aafe..ea2818700 100644 --- a/hathor/wallet/resources/thin_wallet/token_history.py +++ b/hathor/wallet/resources/thin_wallet/token_history.py @@ -14,8 +14,8 @@ from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_args, get_missing_params_msg, parse_args, parse_int, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.conf.get_settings import get_global_settings from hathor.transaction.base_transaction import TX_HASH_SIZE from hathor.util import json_dumpb diff --git a/hathor/wallet/resources/thin_wallet/tokens.py b/hathor/wallet/resources/thin_wallet/tokens.py index 47508273d..d0c91eba4 100644 --- a/hathor/wallet/resources/thin_wallet/tokens.py +++ b/hathor/wallet/resources/thin_wallet/tokens.py @@ -16,8 +16,8 @@ from twisted.web.http import Request +from hathor._openapi.register import register_resource from hathor.api_util import Resource, get_args, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.conf.get_settings import get_global_settings from hathor.util import is_token_uid_valid, json_dumpb diff --git a/hathor/wallet/resources/unlock.py b/hathor/wallet/resources/unlock.py index 829e68a58..8e0fc35e6 100644 --- a/hathor/wallet/resources/unlock.py +++ b/hathor/wallet/resources/unlock.py @@ -14,8 +14,8 @@ from typing import Any +from hathor._openapi.register import register_resource from hathor.api_util import Resource, render_options, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.util import json_dumpb, json_loadb from hathor.wallet.exceptions import IncorrectPassword, InvalidWords diff --git a/hathor/websocket/resource.py b/hathor/websocket/resource.py index 6e265379d..6a4b3d892 100644 --- a/hathor/websocket/resource.py +++ b/hathor/websocket/resource.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from hathor._openapi.register import register_resource from hathor.api_util import Resource, set_cors -from hathor.cli.openapi_files.register import register_resource from hathor.util import json_dumpb diff --git a/hathor/cli/events_simulator/__init__.py b/hathor_cli/__init__.py similarity index 100% rename from hathor/cli/events_simulator/__init__.py rename to hathor_cli/__init__.py diff --git a/hathor_cli/__main__.py b/hathor_cli/__main__.py new file mode 100644 index 000000000..0cdff53da --- /dev/null +++ b/hathor_cli/__main__.py @@ -0,0 +1,17 @@ +# Copyright 2021 Hathor Labs +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if __name__ == '__main__': + from . import main + main.main() diff --git a/hathor/builder/cli_builder.py b/hathor_cli/builder.py similarity index 96% rename from hathor/builder/cli_builder.py rename to hathor_cli/builder.py index b89fd398e..529447b16 100644 --- a/hathor/builder/cli_builder.py +++ b/hathor_cli/builder.py @@ -20,8 +20,8 @@ from structlog import get_logger -from hathor.cli.run_node_args import RunNodeArgs -from hathor.cli.side_dag import SideDagArgs +from hathor_cli.run_node_args import RunNodeArgs +from hathor_cli.side_dag import SideDagArgs from hathor.consensus import ConsensusAlgorithm from hathor.daa import DifficultyAdjustmentAlgorithm from hathor.event import EventManager @@ -42,11 +42,13 @@ from hathor.pubsub import PubSubManager from hathor.reactor import ReactorProtocol as Reactor from hathor.stratum import StratumFactory +from hathor.transaction.vertex_children import RocksDBVertexChildrenService from hathor.transaction.vertex_parser import VertexParser from hathor.util import Random from hathor.verification.verification_service import VerificationService from hathor.verification.vertex_verifiers import VertexVerifiers from hathor.vertex_handler import VertexHandler +from hathor.transaction.json_serializer import VertexJsonSerializer from hathor.wallet import BaseWallet, HDWallet, Wallet logger = get_logger() @@ -135,6 +137,7 @@ def create_manager(self, reactor: Reactor) -> HathorManager: # Initialize indexes manager. indexes = RocksDBIndexesManager(self.rocksdb_storage, settings=settings) + vertex_children_service = RocksDBVertexChildrenService(self.rocksdb_storage) kwargs: dict[str, Any] = {} if self._args.disable_cache: @@ -146,6 +149,7 @@ def create_manager(self, reactor: Reactor) -> HathorManager: settings=settings, vertex_parser=vertex_parser, nc_storage_factory=self.nc_storage_factory, + vertex_children_service=vertex_children_service, **kwargs ) event_storage = EventRocksDBStorage(self.rocksdb_storage) @@ -167,6 +171,7 @@ def create_manager(self, reactor: Reactor) -> HathorManager: indexes=indexes, settings=settings, nc_storage_factory=self.nc_storage_factory, + vertex_children_service=vertex_children_service, ) tx_storage.capacity = self._args.cache_size if self._args.cache_size is not None else DEFAULT_CACHE_SIZE if self._args.cache_interval: @@ -325,6 +330,8 @@ def create_manager(self, reactor: Reactor) -> HathorManager: SyncSupportLevel.add_factories(settings, p2p_manager, SyncSupportLevel.ENABLED, vertex_parser, vertex_handler) + vertex_json_serializer = VertexJsonSerializer(storage=tx_storage, nc_log_storage=nc_log_storage) + from hathor.consensus.poa import PoaBlockProducer, PoaSignerFile poa_block_producer: PoaBlockProducer | None = None if settings.CONSENSUS_ALGORITHM.is_poa(): @@ -361,6 +368,7 @@ def create_manager(self, reactor: Reactor) -> HathorManager: poa_block_producer=poa_block_producer, runner_factory=runner_factory, feature_service=self.feature_service, + vertex_json_serializer=vertex_json_serializer, ) if self._args.x_ipython_kernel: diff --git a/hathor/cli/check_blueprint.py b/hathor_cli/check_blueprint.py similarity index 97% rename from hathor/cli/check_blueprint.py rename to hathor_cli/check_blueprint.py index 819d2b6a0..4a7963b3d 100644 --- a/hathor/cli/check_blueprint.py +++ b/hathor_cli/check_blueprint.py @@ -19,7 +19,7 @@ def main() -> None: - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser from hathor.conf import NANO_TESTNET_SETTINGS_FILEPATH from hathor.conf.get_settings import get_global_settings from hathor.nanocontracts import OnChainBlueprint diff --git a/hathor/cli/db_export.py b/hathor_cli/db_export.py similarity index 99% rename from hathor/cli/db_export.py rename to hathor_cli/db_export.py index b00d9596d..c57e21107 100644 --- a/hathor/cli/db_export.py +++ b/hathor_cli/db_export.py @@ -17,7 +17,7 @@ from argparse import ArgumentParser, FileType from typing import TYPE_CHECKING, Iterator, Optional -from hathor.cli.run_node import RunNode +from hathor_cli.run_node import RunNode if TYPE_CHECKING: from hathor.transaction import BaseTransaction diff --git a/hathor/cli/db_import.py b/hathor_cli/db_import.py similarity index 97% rename from hathor/cli/db_import.py rename to hathor_cli/db_import.py index 2edde2f39..b2694f9ad 100644 --- a/hathor/cli/db_import.py +++ b/hathor_cli/db_import.py @@ -18,7 +18,7 @@ from argparse import ArgumentParser, FileType from typing import TYPE_CHECKING, Iterator -from hathor.cli.run_node import RunNode +from hathor_cli.run_node import RunNode if TYPE_CHECKING: from hathor.transaction import BaseTransaction @@ -45,7 +45,7 @@ def prepare(self, *, register_resources: bool = True) -> None: self.in_file = io.BufferedReader(self._args.import_file) def run(self) -> None: - from hathor.cli.db_export import MAGIC_HEADER + from hathor_cli.db_export import MAGIC_HEADER from hathor.util import tx_progress header = self.in_file.read(len(MAGIC_HEADER)) diff --git a/hathor/cli/openapi_files/__init__.py b/hathor_cli/events_simulator/__init__.py similarity index 100% rename from hathor/cli/openapi_files/__init__.py rename to hathor_cli/events_simulator/__init__.py diff --git a/hathor/cli/events_simulator/event_forwarding_websocket_factory.py b/hathor_cli/events_simulator/event_forwarding_websocket_factory.py similarity index 91% rename from hathor/cli/events_simulator/event_forwarding_websocket_factory.py rename to hathor_cli/events_simulator/event_forwarding_websocket_factory.py index f07a5b8e2..498935b99 100644 --- a/hathor/cli/events_simulator/event_forwarding_websocket_factory.py +++ b/hathor_cli/events_simulator/event_forwarding_websocket_factory.py @@ -19,7 +19,7 @@ from hathor.event.websocket import EventWebsocketFactory # skip-cli-import-custom-check if TYPE_CHECKING: - from hathor.cli.events_simulator.event_forwarding_websocket_protocol import EventForwardingWebsocketProtocol + from hathor_cli.events_simulator.event_forwarding_websocket_protocol import EventForwardingWebsocketProtocol from hathor.simulator import Simulator @@ -29,7 +29,7 @@ def __init__(self, simulator: 'Simulator', *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) def buildProtocol(self, _: IAddress) -> 'EventForwardingWebsocketProtocol': - from hathor.cli.events_simulator.event_forwarding_websocket_protocol import EventForwardingWebsocketProtocol + from hathor_cli.events_simulator.event_forwarding_websocket_protocol import EventForwardingWebsocketProtocol protocol = EventForwardingWebsocketProtocol(self._simulator) protocol.factory = self return protocol diff --git a/hathor/cli/events_simulator/event_forwarding_websocket_protocol.py b/hathor_cli/events_simulator/event_forwarding_websocket_protocol.py similarity index 96% rename from hathor/cli/events_simulator/event_forwarding_websocket_protocol.py rename to hathor_cli/events_simulator/event_forwarding_websocket_protocol.py index cd6318a0b..7a7d9d9aa 100644 --- a/hathor/cli/events_simulator/event_forwarding_websocket_protocol.py +++ b/hathor_cli/events_simulator/event_forwarding_websocket_protocol.py @@ -19,7 +19,7 @@ from hathor.event.websocket import EventWebsocketProtocol # skip-cli-import-custom-check if TYPE_CHECKING: - from hathor.cli.events_simulator.event_forwarding_websocket_factory import EventForwardingWebsocketFactory + from hathor_cli.events_simulator.event_forwarding_websocket_factory import EventForwardingWebsocketFactory from hathor.simulator import Simulator diff --git a/hathor/cli/events_simulator/events_simulator.py b/hathor_cli/events_simulator/events_simulator.py similarity index 93% rename from hathor/cli/events_simulator/events_simulator.py rename to hathor_cli/events_simulator/events_simulator.py index f7fccff98..3ba629d91 100644 --- a/hathor/cli/events_simulator/events_simulator.py +++ b/hathor_cli/events_simulator/events_simulator.py @@ -30,8 +30,8 @@ def create_parser() -> ArgumentParser: - from hathor.cli.events_simulator.scenario import Scenario - from hathor.cli.util import create_parser + from hathor_cli.events_simulator.scenario import Scenario + from hathor_cli.util import create_parser parser = create_parser() possible_scenarios = [scenario.name for scenario in Scenario] @@ -46,8 +46,8 @@ def create_parser() -> ArgumentParser: def execute(args: Namespace, reactor: 'ReactorProtocol') -> None: from hathor.conf import UNITTESTS_SETTINGS_FILEPATH os.environ['HATHOR_CONFIG_YAML'] = UNITTESTS_SETTINGS_FILEPATH - from hathor.cli.events_simulator.event_forwarding_websocket_factory import EventForwardingWebsocketFactory - from hathor.cli.events_simulator.scenario import Scenario + from hathor_cli.events_simulator.event_forwarding_websocket_factory import EventForwardingWebsocketFactory + from hathor_cli.events_simulator.scenario import Scenario from hathor.conf.get_settings import get_global_settings from hathor.simulator import Simulator diff --git a/hathor/cli/events_simulator/scenario.py b/hathor_cli/events_simulator/scenario.py similarity index 100% rename from hathor/cli/events_simulator/scenario.py rename to hathor_cli/events_simulator/scenario.py diff --git a/hathor/cli/generate_genesis.py b/hathor_cli/generate_genesis.py similarity index 98% rename from hathor/cli/generate_genesis.py rename to hathor_cli/generate_genesis.py index 014c49891..86cbd5a24 100644 --- a/hathor/cli/generate_genesis.py +++ b/hathor_cli/generate_genesis.py @@ -26,7 +26,7 @@ class GenerateGenesisArgs(BaseModel): def main() -> None: - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser from hathor.transaction.genesis import generate_new_genesis parser = create_parser() diff --git a/hathor/cli/generate_poa_keys.py b/hathor_cli/generate_poa_keys.py similarity index 97% rename from hathor/cli/generate_poa_keys.py rename to hathor_cli/generate_poa_keys.py index cbefe0db2..2cb01dd0c 100644 --- a/hathor/cli/generate_poa_keys.py +++ b/hathor_cli/generate_poa_keys.py @@ -21,7 +21,7 @@ def main(): - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser from hathor.crypto.util import ( get_address_b58_from_public_key, get_private_key_bytes, diff --git a/hathor/cli/generate_valid_words.py b/hathor_cli/generate_valid_words.py similarity index 96% rename from hathor/cli/generate_valid_words.py rename to hathor_cli/generate_valid_words.py index 20d5cb072..0ec76b3d3 100644 --- a/hathor/cli/generate_valid_words.py +++ b/hathor_cli/generate_valid_words.py @@ -22,7 +22,7 @@ def generate_words(language: str = 'english', count: int = 24) -> str: def create_parser() -> ArgumentParser: - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser parser = create_parser() parser.add_argument('--language', help='Words language') parser.add_argument('--count', type=int, help='Word count') diff --git a/hathor/cli/load_from_logs.py b/hathor_cli/load_from_logs.py similarity index 98% rename from hathor/cli/load_from_logs.py rename to hathor_cli/load_from_logs.py index f0842dec4..60e095747 100644 --- a/hathor/cli/load_from_logs.py +++ b/hathor_cli/load_from_logs.py @@ -18,7 +18,7 @@ from twisted.internet.defer import Deferred from twisted.internet.task import deferLater -from hathor.cli.run_node import RunNode +from hathor_cli.run_node import RunNode class LoadFromLogs(RunNode): diff --git a/hathor/cli/main.py b/hathor_cli/main.py similarity index 99% rename from hathor/cli/main.py rename to hathor_cli/main.py index a73511a03..4236a56ef 100644 --- a/hathor/cli/main.py +++ b/hathor_cli/main.py @@ -132,7 +132,7 @@ def help(self) -> None: print() def execute_from_command_line(self): - from hathor.cli.util import process_logging_options, process_logging_output, setup_logging + from hathor_cli.util import process_logging_options, process_logging_output, setup_logging if len(sys.argv) < 2: self.help() diff --git a/hathor/cli/merged_mining.py b/hathor_cli/merged_mining.py similarity index 99% rename from hathor/cli/merged_mining.py rename to hathor_cli/merged_mining.py index 3fa11db06..445c065ab 100644 --- a/hathor/cli/merged_mining.py +++ b/hathor_cli/merged_mining.py @@ -23,7 +23,7 @@ def create_parser() -> ArgumentParser: - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser parser = create_parser() parser.add_argument('--port', help='Port of Stratum server', type=int, required=True) parser.add_argument('--status', help='Port of Status server', type=int, required=False) diff --git a/hathor/cli/mining.py b/hathor_cli/mining.py similarity index 99% rename from hathor/cli/mining.py rename to hathor_cli/mining.py index c4fa4ed90..2ee1f5ce8 100644 --- a/hathor/cli/mining.py +++ b/hathor_cli/mining.py @@ -41,7 +41,7 @@ def worker(q_in, q_out): def create_parser() -> ArgumentParser: - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser parser = create_parser() parser.add_argument('url', help='URL to get mining bytes') parser.add_argument('--init-delay', type=float, help='Wait N seconds before starting (in seconds)', default=None) diff --git a/hathor/cli/multisig_address.py b/hathor_cli/multisig_address.py similarity index 98% rename from hathor/cli/multisig_address.py rename to hathor_cli/multisig_address.py index 8ee404566..6f8ce8b29 100644 --- a/hathor/cli/multisig_address.py +++ b/hathor_cli/multisig_address.py @@ -19,7 +19,7 @@ def create_parser() -> ArgumentParser: - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser parser = create_parser() parser.add_argument('signatures_required', type=int, help='Mimimum quantity of signatures required') parser.add_argument('--pubkey_count', type=int, help='Quantity of public keys in the multisig') diff --git a/hathor/cli/multisig_signature.py b/hathor_cli/multisig_signature.py similarity index 97% rename from hathor/cli/multisig_signature.py rename to hathor_cli/multisig_signature.py index e8bc7cc15..48f0f4e85 100644 --- a/hathor/cli/multisig_signature.py +++ b/hathor_cli/multisig_signature.py @@ -17,7 +17,7 @@ def create_parser() -> ArgumentParser: - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser parser = create_parser() parser.add_argument('partial_tx', type=str, help='Tx to be signed in hex') parser.add_argument('private_key', type=str, help='Encrypted private key in hex') diff --git a/hathor/cli/multisig_spend.py b/hathor_cli/multisig_spend.py similarity index 97% rename from hathor/cli/multisig_spend.py rename to hathor_cli/multisig_spend.py index 6b7fcdc57..1cf07530c 100644 --- a/hathor/cli/multisig_spend.py +++ b/hathor_cli/multisig_spend.py @@ -16,7 +16,7 @@ def create_parser() -> ArgumentParser: - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser parser = create_parser() parser.add_argument('partial_tx', type=str, help='Tx to spend multisig fund') parser.add_argument( diff --git a/hathor/cli/nc_dump.py b/hathor_cli/nc_dump.py similarity index 99% rename from hathor/cli/nc_dump.py rename to hathor_cli/nc_dump.py index 0a307d97c..837b508e2 100644 --- a/hathor/cli/nc_dump.py +++ b/hathor_cli/nc_dump.py @@ -18,7 +18,7 @@ from collections import OrderedDict from typing import TYPE_CHECKING, Any, Callable, Iterator -from hathor.cli.run_node import RunNode +from hathor_cli.run_node import RunNode if TYPE_CHECKING: from hathor.nanocontracts.storage.patricia_trie import PatriciaTrie diff --git a/hathor/cli/nginx_config.py b/hathor_cli/nginx_config.py similarity index 99% rename from hathor/cli/nginx_config.py rename to hathor_cli/nginx_config.py index a94cdc399..2efff25b8 100644 --- a/hathor/cli/nginx_config.py +++ b/hathor_cli/nginx_config.py @@ -24,7 +24,7 @@ def get_openapi(src_file: Optional[TextIO] = None) -> dict[str, Any]: """ Open and parse the json file or generate OpenAPI dict on-the-fly """ if src_file is None: - from hathor.cli.openapi_json import get_openapi_dict + from hathor_cli.openapi_json import get_openapi_dict return get_openapi_dict() else: return json.load(src_file) @@ -348,7 +348,7 @@ def main(): import argparse import sys - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser parser = create_parser() parser.add_argument('-k', '--rate-multiplier', type=float, default=1.0, diff --git a/hathor/cli/openapi_json.py b/hathor_cli/openapi_json.py similarity index 70% rename from hathor/cli/openapi_json.py rename to hathor_cli/openapi_json.py index d5b0feec1..08f1a39cf 100644 --- a/hathor/cli/openapi_json.py +++ b/hathor_cli/openapi_json.py @@ -13,31 +13,37 @@ # limitations under the License. import json -import os from typing import Any +from pathlib import Path -BASE_PATH = os.path.join(os.path.dirname(__file__), 'openapi_files') -DEFAULT_OUTPUT_PATH = os.path.join(BASE_PATH, 'openapi.json') + +def get_base_path() -> Path: + from hathor import _openapi as openapi_module + return Path(openapi_module.__file__).parent + + +def get_default_output_path() -> Path: + return get_base_path().joinpath('openapi.json') def get_base() -> dict[str, Any]: """ Returns the base configuration from OpenAPI json """ - with open(os.path.join(BASE_PATH, 'openapi_base.json'), 'r') as f: + with open(get_base_path().joinpath('openapi_base.json'), 'r') as f: return json.load(f) def get_components() -> dict[str, Any]: """ Returns the components from OpenAPI json """ - with open(os.path.join(BASE_PATH, 'openapi_components.json'), 'r') as f: + with open(get_base_path().joinpath('openapi_components.json'), 'r') as f: return json.load(f) def get_openapi_dict() -> dict[str, Any]: """ Returns the generated OpenAPI dict """ - from hathor.cli.openapi_files.register import get_registered_resources + from hathor._openapi.register import get_registered_resources openapi = get_base() components = get_components() openapi['components'] = components['components'] @@ -49,12 +55,12 @@ def get_openapi_dict() -> dict[str, Any]: def main(): import argparse - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser parser = create_parser() parser.add_argument('--indent', type=int, default=None, help='Number of spaces to use for indentation') - parser.add_argument('out', type=argparse.FileType('w', encoding='UTF-8'), default=DEFAULT_OUTPUT_PATH, nargs='?', - help='Output file where OpenSPI json will be written') + parser.add_argument('out', type=argparse.FileType('w', encoding='UTF-8'), default=get_default_output_path(), + nargs='?', help='Output file where OpenSPI json will be written') args = parser.parse_args() openapi = get_openapi_dict() diff --git a/hathor/cli/oracle_create_key.py b/hathor_cli/oracle_create_key.py similarity index 96% rename from hathor/cli/oracle_create_key.py rename to hathor_cli/oracle_create_key.py index 7ba4f68ea..90b7c9fd8 100644 --- a/hathor/cli/oracle_create_key.py +++ b/hathor_cli/oracle_create_key.py @@ -19,7 +19,7 @@ def main(): - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser from hathor.crypto.util import get_hash160, get_private_key_bytes, get_public_key_bytes_compressed parser = create_parser() diff --git a/hathor/cli/oracle_encode_data.py b/hathor_cli/oracle_encode_data.py similarity index 97% rename from hathor/cli/oracle_encode_data.py rename to hathor_cli/oracle_encode_data.py index 227b7b6c9..88953aa5e 100644 --- a/hathor/cli/oracle_encode_data.py +++ b/hathor_cli/oracle_encode_data.py @@ -20,7 +20,7 @@ def main(): - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser from hathor.crypto.util import get_private_key_from_bytes parser = create_parser() diff --git a/hathor/cli/oracle_get_pubkey.py b/hathor_cli/oracle_get_pubkey.py similarity index 96% rename from hathor/cli/oracle_get_pubkey.py rename to hathor_cli/oracle_get_pubkey.py index ab9dbc073..14d22ac86 100644 --- a/hathor/cli/oracle_get_pubkey.py +++ b/hathor_cli/oracle_get_pubkey.py @@ -16,7 +16,7 @@ def main(): - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser from hathor.crypto.util import get_hash160, get_private_key_from_bytes, get_public_key_bytes_compressed parser = create_parser() diff --git a/hathor/cli/parse_logs.py b/hathor_cli/parse_logs.py similarity index 98% rename from hathor/cli/parse_logs.py rename to hathor_cli/parse_logs.py index a86ce67f0..b1db0a6c2 100644 --- a/hathor/cli/parse_logs.py +++ b/hathor_cli/parse_logs.py @@ -25,7 +25,7 @@ def main() -> None: Parse logs from a dump file (either as json or plain logs) into a file with only vertex hex bytes. The logs must be generated with --log-vertex-bytes. Then, use load-from-logs to run a full node from this file. """ - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser parser = create_parser() file_args = parser.add_mutually_exclusive_group(required=True) file_args.add_argument( diff --git a/hathor/cli/peer_id.py b/hathor_cli/peer_id.py similarity index 100% rename from hathor/cli/peer_id.py rename to hathor_cli/peer_id.py diff --git a/hathor/cli/quick_test.py b/hathor_cli/quick_test.py similarity index 98% rename from hathor/cli/quick_test.py rename to hathor_cli/quick_test.py index 0701ab7a9..80a0b0e67 100644 --- a/hathor/cli/quick_test.py +++ b/hathor_cli/quick_test.py @@ -21,7 +21,7 @@ from structlog import get_logger from twisted.internet.defer import inlineCallbacks -from hathor.cli.run_node import RunNode +from hathor_cli.run_node import RunNode if TYPE_CHECKING: from hathor.transaction import BaseTransaction, Block, Transaction diff --git a/hathor/cli/replay_logs.py b/hathor_cli/replay_logs.py similarity index 96% rename from hathor/cli/replay_logs.py rename to hathor_cli/replay_logs.py index 05a19424a..cc11ac254 100644 --- a/hathor/cli/replay_logs.py +++ b/hathor_cli/replay_logs.py @@ -19,7 +19,7 @@ def main(): import argparse import sys - from hathor.cli.util import ConsoleRenderer, create_parser + from hathor_cli.util import ConsoleRenderer, create_parser from hathor.util import json_loads parser = create_parser() diff --git a/hathor/cli/reset_event_queue.py b/hathor_cli/reset_event_queue.py similarity index 96% rename from hathor/cli/reset_event_queue.py rename to hathor_cli/reset_event_queue.py index 90fd10358..9ad717969 100644 --- a/hathor/cli/reset_event_queue.py +++ b/hathor_cli/reset_event_queue.py @@ -20,7 +20,7 @@ def create_parser() -> ArgumentParser: - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser parser = create_parser() parser.add_argument('--data', help='Data directory') diff --git a/hathor/cli/reset_feature_settings.py b/hathor_cli/reset_feature_settings.py similarity index 97% rename from hathor/cli/reset_feature_settings.py rename to hathor_cli/reset_feature_settings.py index a4c8ea9e0..062df6762 100644 --- a/hathor/cli/reset_feature_settings.py +++ b/hathor_cli/reset_feature_settings.py @@ -20,7 +20,7 @@ def create_parser() -> ArgumentParser: - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser parser = create_parser() parser.add_argument('--data', help='Data directory') diff --git a/hathor/cli/run_node.py b/hathor_cli/run_node.py similarity index 98% rename from hathor/cli/run_node.py rename to hathor_cli/run_node.py index ff65ffe63..9ed17ea66 100644 --- a/hathor/cli/run_node.py +++ b/hathor_cli/run_node.py @@ -26,7 +26,7 @@ # LOGGING_CAPTURE_STDOUT = True if TYPE_CHECKING: - from hathor.cli.run_node_args import RunNodeArgs + from hathor_cli.run_node_args import RunNodeArgs from hathor.sysctl.runner import SysctlRunner @@ -65,9 +65,9 @@ class RunNode: def create_parser(cls) -> ArgumentParser: """ Create a new parser with the run_node CLI arguments. - Arguments must also be added to hathor.cli.run_node_args.RunNodeArgs + Arguments must also be added to hathor_cli.run_node_args.RunNodeArgs """ - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser from hathor.feature_activation.feature import Feature from hathor.nanocontracts.nc_exec_logs import NCLogConfig parser = create_parser(prefix=cls.env_vars_prefix) @@ -202,8 +202,9 @@ def prepare(self, *, register_resources: bool = True) -> None: reactor = initialize_global_reactor(use_asyncio_reactor=self._args.x_asyncio_reactor) self.reactor = reactor - from hathor.builder import CliBuilder, ResourcesBuilder + from hathor.builder import ResourcesBuilder from hathor.exception import BuilderError + from hathor_cli.builder import CliBuilder builder = CliBuilder(self._args) try: self.manager = builder.create_manager(reactor) @@ -584,7 +585,7 @@ def parse_args(self, argv: list[str]) -> Namespace: return self.parser.parse_args(argv) def _parse_args_obj(self, args: dict[str, Any]) -> 'RunNodeArgs': - from hathor.cli.run_node_args import RunNodeArgs + from hathor_cli.run_node_args import RunNodeArgs return RunNodeArgs.parse_obj(args) def run(self) -> None: diff --git a/hathor/cli/run_node_args.py b/hathor_cli/run_node_args.py similarity index 97% rename from hathor/cli/run_node_args.py rename to hathor_cli/run_node_args.py index 555036739..ed3595ce4 100644 --- a/hathor/cli/run_node_args.py +++ b/hathor_cli/run_node_args.py @@ -24,7 +24,7 @@ class RunNodeArgs(BaseModel, extra=Extra.allow): """ Class that represents the CLI arguments used by the run_node command. - Arguments must also be added to hathor.cli.run_node.RunNode.create_parser. + Arguments must also be added to hathor_cli.run_node.RunNode.create_parser. """ hostname: Optional[str] auto_hostname: bool diff --git a/hathor/cli/shell.py b/hathor_cli/shell.py similarity index 98% rename from hathor/cli/shell.py rename to hathor_cli/shell.py index 0a1de97d8..9210977fb 100644 --- a/hathor/cli/shell.py +++ b/hathor_cli/shell.py @@ -15,7 +15,7 @@ from argparse import Namespace from typing import Any, Callable -from hathor.cli.run_node import RunNode +from hathor_cli.run_node import RunNode def get_ipython(extra_args: list[Any], imported_objects: dict[str, Any]) -> Callable[[], None]: diff --git a/hathor/cli/side_dag.py b/hathor_cli/side_dag.py similarity index 96% rename from hathor/cli/side_dag.py rename to hathor_cli/side_dag.py index 6658b8f08..d44fa1503 100644 --- a/hathor/cli/side_dag.py +++ b/hathor_cli/side_dag.py @@ -27,14 +27,14 @@ from setproctitle import setproctitle from typing_extensions import assert_never, override -from hathor.cli.run_node_args import RunNodeArgs # skip-cli-import-custom-check +from hathor_cli.run_node_args import RunNodeArgs # skip-cli-import-custom-check if TYPE_CHECKING: - from hathor.cli.util import LoggingOutput + from hathor_cli.util import LoggingOutput from structlog import get_logger -from hathor.cli.run_node import RunNode +from hathor_cli.run_node import RunNode logger = get_logger() @@ -91,7 +91,7 @@ def main(capture_stdout: bool) -> None: In this example, Hathor testnet logs would be disabled, while side-dag logs would be outputted to stdout as json. """ - from hathor.cli.util import process_logging_options, setup_logging + from hathor_cli.util import process_logging_options, setup_logging argv = sys.argv[1:] hathor_logging_output, side_dag_logging_output = _process_logging_output(argv) hathor_node_argv, side_dag_argv = _partition_argv(argv) @@ -132,7 +132,7 @@ def main(capture_stdout: bool) -> None: def _process_logging_output(argv: list[str]) -> tuple[LoggingOutput, LoggingOutput]: """Extract logging output before argv parsing.""" - from hathor.cli.util import LoggingOutput, create_parser + from hathor_cli.util import LoggingOutput, create_parser class LogOutputConfig(str, Enum): HATHOR = 'hathor' @@ -282,7 +282,7 @@ class _RunNodeArgs: def _run_node(args: _RunNodeArgs) -> None: - from hathor.cli.util import process_logging_options, setup_logging + from hathor_cli.util import process_logging_options, setup_logging try: log_options = process_logging_options(args.argv) setup_logging( diff --git a/hathor/cli/stratum_mining.py b/hathor_cli/stratum_mining.py similarity index 97% rename from hathor/cli/stratum_mining.py rename to hathor_cli/stratum_mining.py index 679bba1ee..2d2400be3 100644 --- a/hathor/cli/stratum_mining.py +++ b/hathor_cli/stratum_mining.py @@ -19,7 +19,7 @@ def create_parser() -> ArgumentParser: - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser parser = create_parser() parser.add_argument('--address', help='Address to send funds to', type=str, required=False) parser.add_argument('--host', help='Hostname of Stratum server', type=str, required=True) diff --git a/hathor/cli/top.py b/hathor_cli/top.py similarity index 99% rename from hathor/cli/top.py rename to hathor_cli/top.py index bae913709..94ea337d9 100644 --- a/hathor/cli/top.py +++ b/hathor_cli/top.py @@ -767,7 +767,7 @@ def _register(self, attr: int, fore: int, back: int) -> int: return attr | curses.color_pair(code) def main() -> None: - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser parser = create_parser() parser.add_argument('url', help='URL of the full-node API') parser.add_argument('-g', action='store_true', help='Group small CPU percent') diff --git a/hathor/cli/twin_tx.py b/hathor_cli/twin_tx.py similarity index 98% rename from hathor/cli/twin_tx.py rename to hathor_cli/twin_tx.py index f57c4ee97..02d832ddb 100644 --- a/hathor/cli/twin_tx.py +++ b/hathor_cli/twin_tx.py @@ -21,7 +21,7 @@ def create_parser() -> ArgumentParser: - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser parser = create_parser() parser.add_argument('--url', help='URL to access tx storage in case the hash was passed') parser.add_argument('--hash', help='Hash of tx to create a twin') diff --git a/hathor/cli/tx_generator.py b/hathor_cli/tx_generator.py similarity index 99% rename from hathor/cli/tx_generator.py rename to hathor_cli/tx_generator.py index 22f9496e5..1114d5392 100644 --- a/hathor/cli/tx_generator.py +++ b/hathor_cli/tx_generator.py @@ -28,7 +28,7 @@ def create_parser() -> ArgumentParser: - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser parser = create_parser() parser.add_argument('url', help='URL to get mining bytes') parser.add_argument('--address', action='append') diff --git a/hathor/cli/util.py b/hathor_cli/util.py similarity index 100% rename from hathor/cli/util.py rename to hathor_cli/util.py diff --git a/hathor/cli/wallet.py b/hathor_cli/wallet.py similarity index 96% rename from hathor/cli/wallet.py rename to hathor_cli/wallet.py index b649a5dc3..c9b35ea9f 100644 --- a/hathor/cli/wallet.py +++ b/hathor_cli/wallet.py @@ -17,7 +17,7 @@ def create_parser() -> ArgumentParser: - from hathor.cli.util import create_parser + from hathor_cli.util import create_parser parser = create_parser() parser.add_argument('--count', type=int, default=20, help='Number of keys/addresses (default=20)') parser.add_argument('--directory', help='Wallet directory') diff --git a/tests/__init__.py b/hathor_tests/__init__.py similarity index 100% rename from tests/__init__.py rename to hathor_tests/__init__.py diff --git a/tests/cli/__init__.py b/hathor_tests/cli/__init__.py similarity index 100% rename from tests/cli/__init__.py rename to hathor_tests/cli/__init__.py diff --git a/tests/cli/test_cli_main.py b/hathor_tests/cli/test_cli_main.py similarity index 98% rename from tests/cli/test_cli_main.py rename to hathor_tests/cli/test_cli_main.py index 185938635..7a64f674f 100644 --- a/tests/cli/test_cli_main.py +++ b/hathor_tests/cli/test_cli_main.py @@ -4,7 +4,7 @@ from structlog.testing import capture_logs -from hathor.cli import main +from hathor_cli import main class CliMainTest(unittest.TestCase): diff --git a/tests/cli/test_db_export.py b/hathor_tests/cli/test_db_export.py similarity index 78% rename from tests/cli/test_db_export.py rename to hathor_tests/cli/test_db_export.py index 89c767005..754849eee 100644 --- a/tests/cli/test_db_export.py +++ b/hathor_tests/cli/test_db_export.py @@ -1,7 +1,7 @@ import os -from hathor.cli.db_export import DbExport -from tests import unittest +from hathor_cli.db_export import DbExport +from hathor_tests import unittest class TestDbExport(unittest.TestCase): diff --git a/tests/cli/test_db_import.py b/hathor_tests/cli/test_db_import.py similarity index 76% rename from tests/cli/test_db_import.py rename to hathor_tests/cli/test_db_import.py index a7e4ece39..762b003db 100644 --- a/tests/cli/test_db_import.py +++ b/hathor_tests/cli/test_db_import.py @@ -1,7 +1,7 @@ import tempfile -from hathor.cli.db_import import DbImport -from tests import unittest +from hathor_cli.db_import import DbImport +from hathor_tests import unittest class TestDbImport(unittest.TestCase): diff --git a/tests/cli/test_events_simulator.py b/hathor_tests/cli/test_events_simulator.py similarity index 85% rename from tests/cli/test_events_simulator.py rename to hathor_tests/cli/test_events_simulator.py index 2a4ee941f..394276433 100644 --- a/tests/cli/test_events_simulator.py +++ b/hathor_tests/cli/test_events_simulator.py @@ -14,10 +14,10 @@ from unittest.mock import Mock -from hathor.cli.events_simulator.event_forwarding_websocket_factory import EventForwardingWebsocketFactory -from hathor.cli.events_simulator.events_simulator import create_parser, execute from hathor.conf.get_settings import get_global_settings -from tests.test_memory_reactor_clock import TestMemoryReactorClock +from hathor_cli.events_simulator.event_forwarding_websocket_factory import EventForwardingWebsocketFactory +from hathor_cli.events_simulator.events_simulator import create_parser, execute +from hathor_tests.test_memory_reactor_clock import TestMemoryReactorClock def test_events_simulator() -> None: diff --git a/tests/cli/test_generate_tx.py b/hathor_tests/cli/test_generate_tx.py similarity index 97% rename from tests/cli/test_generate_tx.py rename to hathor_tests/cli/test_generate_tx.py index 11bff495f..4bd0433cf 100644 --- a/tests/cli/test_generate_tx.py +++ b/hathor_tests/cli/test_generate_tx.py @@ -1,8 +1,8 @@ import pytest import hathor.util -from tests import unittest -from tests.utils import execute_mining, execute_tx_gen, request_server, run_server +from hathor_tests import unittest +from hathor_tests.utils import execute_mining, execute_tx_gen, request_server, run_server class GenerateTxTest(unittest.TestCase): diff --git a/tests/cli/test_generate_words.py b/hathor_tests/cli/test_generate_words.py similarity index 93% rename from tests/cli/test_generate_words.py rename to hathor_tests/cli/test_generate_words.py index e42209a54..cec4ac43d 100644 --- a/tests/cli/test_generate_words.py +++ b/hathor_tests/cli/test_generate_words.py @@ -3,8 +3,8 @@ from structlog.testing import capture_logs -from hathor.cli.generate_valid_words import create_parser, execute -from tests import unittest +from hathor_cli.generate_valid_words import create_parser, execute +from hathor_tests import unittest class GenerateWordsTest(unittest.TestCase): diff --git a/tests/cli/test_multisig_address.py b/hathor_tests/cli/test_multisig_address.py similarity index 96% rename from tests/cli/test_multisig_address.py rename to hathor_tests/cli/test_multisig_address.py index 4244ec5e8..af010cdcb 100644 --- a/tests/cli/test_multisig_address.py +++ b/hathor_tests/cli/test_multisig_address.py @@ -4,8 +4,8 @@ from structlog.testing import capture_logs -from hathor.cli.multisig_address import create_parser, execute -from tests import unittest +from hathor_cli.multisig_address import create_parser, execute +from hathor_tests import unittest class MultisigAddressTest(unittest.TestCase): diff --git a/tests/cli/test_multisig_signature.py b/hathor_tests/cli/test_multisig_signature.py similarity index 91% rename from tests/cli/test_multisig_signature.py rename to hathor_tests/cli/test_multisig_signature.py index 46b8051e0..e02ae9a52 100644 --- a/tests/cli/test_multisig_signature.py +++ b/hathor_tests/cli/test_multisig_signature.py @@ -8,11 +8,11 @@ from cryptography.hazmat.primitives.asymmetric import ec from structlog.testing import capture_logs -from hathor.cli.multisig_signature import create_parser, execute from hathor.simulator.utils import add_new_blocks from hathor.wallet import Wallet -from tests import unittest -from tests.utils import add_blocks_unlock_reward, add_new_transactions +from hathor_cli.multisig_signature import create_parser, execute +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward, add_new_transactions class SignatureTest(unittest.TestCase): diff --git a/tests/cli/test_multisig_spend.py b/hathor_tests/cli/test_multisig_spend.py similarity index 97% rename from tests/cli/test_multisig_spend.py rename to hathor_tests/cli/test_multisig_spend.py index ebbf61dd2..25e6660c5 100644 --- a/tests/cli/test_multisig_spend.py +++ b/hathor_tests/cli/test_multisig_spend.py @@ -3,15 +3,15 @@ from structlog.testing import capture_logs -from hathor.cli.multisig_spend import create_parser, execute from hathor.crypto.util import decode_address from hathor.simulator.utils import add_new_blocks from hathor.transaction import Transaction, TxInput, TxOutput from hathor.transaction.scripts import create_output_script from hathor.wallet.base_wallet import WalletBalance, WalletOutputInfo from hathor.wallet.util import generate_multisig_address, generate_multisig_redeem_script, generate_signature -from tests import unittest -from tests.utils import add_blocks_unlock_reward +from hathor_cli.multisig_spend import create_parser, execute +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward class MultiSigSpendTest(unittest.TestCase): diff --git a/tests/cli/test_peer_id.py b/hathor_tests/cli/test_peer_id.py similarity index 90% rename from tests/cli/test_peer_id.py rename to hathor_tests/cli/test_peer_id.py index cfbfa958c..8933cd957 100644 --- a/tests/cli/test_peer_id.py +++ b/hathor_tests/cli/test_peer_id.py @@ -3,9 +3,9 @@ from structlog.testing import capture_logs -from hathor.cli.peer_id import main from hathor.util import json_loadb -from tests import unittest +from hathor_cli.peer_id import main +from hathor_tests import unittest class PeerIdTest(unittest.TestCase): diff --git a/tests/cli/test_quick_test.py b/hathor_tests/cli/test_quick_test.py similarity index 84% rename from tests/cli/test_quick_test.py rename to hathor_tests/cli/test_quick_test.py index 1d3d866c4..90f981d1c 100644 --- a/tests/cli/test_quick_test.py +++ b/hathor_tests/cli/test_quick_test.py @@ -1,5 +1,5 @@ -from hathor.cli.quick_test import QuickTest -from tests import unittest +from hathor_cli.quick_test import QuickTest +from hathor_tests import unittest class TestQuickTest(unittest.TestCase): diff --git a/tests/cli/test_run_node.py b/hathor_tests/cli/test_run_node.py similarity index 96% rename from tests/cli/test_run_node.py rename to hathor_tests/cli/test_run_node.py index 57a71e649..b02388e60 100644 --- a/tests/cli/test_run_node.py +++ b/hathor_tests/cli/test_run_node.py @@ -1,7 +1,7 @@ from unittest.mock import ANY, patch -from hathor.cli.run_node import RunNode -from tests import unittest +from hathor_cli.run_node import RunNode +from hathor_tests import unittest class RunNodeTest(unittest.TestCase): diff --git a/tests/cli/test_shell.py b/hathor_tests/cli/test_shell.py similarity index 87% rename from tests/cli/test_shell.py rename to hathor_tests/cli/test_shell.py index b446bcf00..792180770 100644 --- a/tests/cli/test_shell.py +++ b/hathor_tests/cli/test_shell.py @@ -1,7 +1,7 @@ import tempfile -from hathor.cli.shell import Shell -from tests import unittest +from hathor_cli.shell import Shell +from hathor_tests import unittest class ShellTest(unittest.TestCase): diff --git a/tests/cli/test_side_dag.py b/hathor_tests/cli/test_side_dag.py similarity index 96% rename from tests/cli/test_side_dag.py rename to hathor_tests/cli/test_side_dag.py index 0d4caf4a5..a6c4da0cd 100644 --- a/tests/cli/test_side_dag.py +++ b/hathor_tests/cli/test_side_dag.py @@ -14,7 +14,7 @@ import pytest -from hathor.cli.side_dag import _partition_argv +from hathor_cli.side_dag import _partition_argv @pytest.mark.parametrize( diff --git a/tests/cli/test_sysctl_init.py b/hathor_tests/cli/test_sysctl_init.py similarity index 99% rename from tests/cli/test_sysctl_init.py rename to hathor_tests/cli/test_sysctl_init.py index d7a3e5a03..c502c4b74 100644 --- a/tests/cli/test_sysctl_init.py +++ b/hathor_tests/cli/test_sysctl_init.py @@ -5,11 +5,11 @@ from unittest.mock import Mock, patch from hathor.builder.sysctl_builder import SysctlBuilder -from hathor.cli.run_node import RunNode from hathor.sysctl.exception import SysctlEntryNotFound, SysctlRunnerException from hathor.sysctl.init_file_loader import SysctlInitFileLoader from hathor.sysctl.runner import SysctlRunner -from tests import unittest +from hathor_cli.run_node import RunNode +from hathor_tests import unittest class SysctlInitTest(unittest.TestCase): diff --git a/tests/cli/test_twin_tx.py b/hathor_tests/cli/test_twin_tx.py similarity index 97% rename from tests/cli/test_twin_tx.py rename to hathor_tests/cli/test_twin_tx.py index 1696c2625..25e3ab05a 100644 --- a/tests/cli/test_twin_tx.py +++ b/hathor_tests/cli/test_twin_tx.py @@ -4,12 +4,12 @@ import pytest from structlog.testing import capture_logs -from hathor.cli.twin_tx import create_parser, execute from hathor.simulator.utils import add_new_blocks from hathor.transaction import Transaction, TransactionMetadata from hathor.util import json_loadb -from tests import unittest -from tests.utils import ( +from hathor_cli.twin_tx import create_parser, execute +from hathor_tests import unittest +from hathor_tests.utils import ( add_blocks_unlock_reward, add_new_transactions, execute_mining, diff --git a/tests/cli/test_wallet.py b/hathor_tests/cli/test_wallet.py similarity index 86% rename from tests/cli/test_wallet.py rename to hathor_tests/cli/test_wallet.py index 61808a9eb..1097c6c34 100644 --- a/tests/cli/test_wallet.py +++ b/hathor_tests/cli/test_wallet.py @@ -1,9 +1,9 @@ import shutil import tempfile -from hathor.cli.wallet import create_parser, execute from hathor.util import json_loadb -from tests import unittest +from hathor_cli.wallet import create_parser, execute +from hathor_tests import unittest class WalletTest(unittest.TestCase): diff --git a/tests/conftest.py b/hathor_tests/conftest.py similarity index 100% rename from tests/conftest.py rename to hathor_tests/conftest.py diff --git a/tests/consensus/__init__.py b/hathor_tests/consensus/__init__.py similarity index 100% rename from tests/consensus/__init__.py rename to hathor_tests/consensus/__init__.py diff --git a/tests/consensus/test_consensus.py b/hathor_tests/consensus/test_consensus.py similarity index 98% rename from tests/consensus/test_consensus.py rename to hathor_tests/consensus/test_consensus.py index 0da029cdb..b0396a99a 100644 --- a/tests/consensus/test_consensus.py +++ b/hathor_tests/consensus/test_consensus.py @@ -3,8 +3,8 @@ from hathor.execution_manager import ExecutionManager from hathor.simulator.utils import add_new_block, add_new_blocks, gen_new_tx from hathor.util import not_none -from tests import unittest -from tests.utils import add_blocks_unlock_reward, add_new_double_spending, add_new_transactions +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward, add_new_double_spending, add_new_transactions class ConsensusTestCase(unittest.TestCase): diff --git a/tests/consensus/test_consensus2.py b/hathor_tests/consensus/test_consensus2.py similarity index 98% rename from tests/consensus/test_consensus2.py rename to hathor_tests/consensus/test_consensus2.py index c4318b776..436ba4de5 100644 --- a/tests/consensus/test_consensus2.py +++ b/hathor_tests/consensus/test_consensus2.py @@ -3,8 +3,8 @@ from hathor.simulator.utils import gen_new_tx from hathor.transaction import Transaction from hathor.util import not_none -from tests.simulation.base import SimulatorTestCase -from tests.utils import add_custom_tx +from hathor_tests.simulation.base import SimulatorTestCase +from hathor_tests.utils import add_custom_tx class ConsensusSimulatorTestCase(SimulatorTestCase): diff --git a/tests/consensus/test_consensus3.py b/hathor_tests/consensus/test_consensus3.py similarity index 99% rename from tests/consensus/test_consensus3.py rename to hathor_tests/consensus/test_consensus3.py index 8990b5967..dbca3c15b 100644 --- a/tests/consensus/test_consensus3.py +++ b/hathor_tests/consensus/test_consensus3.py @@ -1,8 +1,8 @@ import pytest from hathor.simulator.utils import add_new_block, add_new_blocks -from tests import unittest -from tests.utils import add_blocks_unlock_reward +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward class DoubleSpendingTestCase(unittest.TestCase): diff --git a/tests/consensus/test_consensus4.py b/hathor_tests/consensus/test_consensus4.py similarity index 96% rename from tests/consensus/test_consensus4.py rename to hathor_tests/consensus/test_consensus4.py index 46097857d..699916f62 100644 --- a/tests/consensus/test_consensus4.py +++ b/hathor_tests/consensus/test_consensus4.py @@ -2,8 +2,8 @@ from hathor.manager import HathorManager from hathor.transaction import Block from hathor.types import VertexId -from tests.simulation.base import SimulatorTestCase -from tests.utils import gen_custom_tx +from hathor_tests.simulation.base import SimulatorTestCase +from hathor_tests.utils import gen_custom_tx class ConsensusSimulatorTestCase(SimulatorTestCase): diff --git a/tests/consensus/test_consensus5.py b/hathor_tests/consensus/test_consensus5.py similarity index 96% rename from tests/consensus/test_consensus5.py rename to hathor_tests/consensus/test_consensus5.py index d119c6f59..55357fc1a 100644 --- a/tests/consensus/test_consensus5.py +++ b/hathor_tests/consensus/test_consensus5.py @@ -2,8 +2,8 @@ from hathor.manager import HathorManager from hathor.transaction import Block from hathor.types import VertexId -from tests.simulation.base import SimulatorTestCase -from tests.utils import gen_custom_tx +from hathor_tests.simulation.base import SimulatorTestCase +from hathor_tests.utils import gen_custom_tx class ConsensusSimulatorTestCase(SimulatorTestCase): diff --git a/tests/consensus/test_consensus6.py b/hathor_tests/consensus/test_consensus6.py similarity index 98% rename from tests/consensus/test_consensus6.py rename to hathor_tests/consensus/test_consensus6.py index 4e4bec521..16dd62004 100644 --- a/tests/consensus/test_consensus6.py +++ b/hathor_tests/consensus/test_consensus6.py @@ -15,8 +15,8 @@ from hathor.daa import DifficultyAdjustmentAlgorithm, TestMode from hathor.graphviz import GraphvizVisualizer from hathor.transaction import Block, Transaction -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder DEBUG: bool = False diff --git a/tests/consensus/test_first_block.py b/hathor_tests/consensus/test_first_block.py similarity index 95% rename from tests/consensus/test_first_block.py rename to hathor_tests/consensus/test_first_block.py index 4b291989d..5130411d2 100644 --- a/tests/consensus/test_first_block.py +++ b/hathor_tests/consensus/test_first_block.py @@ -1,6 +1,6 @@ from hathor.transaction import Block, Transaction -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder class FirstBlockTestCase(unittest.TestCase): diff --git a/tests/consensus/test_soft_voided.py b/hathor_tests/consensus/test_soft_voided.py similarity index 98% rename from tests/consensus/test_soft_voided.py rename to hathor_tests/consensus/test_soft_voided.py index 74b3650e9..0c2c042d6 100644 --- a/tests/consensus/test_soft_voided.py +++ b/hathor_tests/consensus/test_soft_voided.py @@ -6,8 +6,8 @@ from hathor.simulator.utils import gen_new_tx from hathor.transaction import Block from hathor.types import VertexId -from tests.simulation.base import SimulatorTestCase -from tests.utils import add_custom_tx +from hathor_tests.simulation.base import SimulatorTestCase +from hathor_tests.utils import add_custom_tx class SoftVoidedTestCase(SimulatorTestCase): diff --git a/tests/consensus/test_soft_voided2.py b/hathor_tests/consensus/test_soft_voided2.py similarity index 98% rename from tests/consensus/test_soft_voided2.py rename to hathor_tests/consensus/test_soft_voided2.py index 852af9c61..778d99bcf 100644 --- a/tests/consensus/test_soft_voided2.py +++ b/hathor_tests/consensus/test_soft_voided2.py @@ -7,8 +7,8 @@ from hathor.transaction import Block, Transaction from hathor.types import VertexId from hathor.wallet import HDWallet -from tests.simulation.base import SimulatorTestCase -from tests.utils import BURN_ADDRESS, add_custom_tx +from hathor_tests.simulation.base import SimulatorTestCase +from hathor_tests.utils import BURN_ADDRESS, add_custom_tx class ConsensusSimulatorTestCase(SimulatorTestCase): diff --git a/tests/consensus/test_soft_voided3.py b/hathor_tests/consensus/test_soft_voided3.py similarity index 97% rename from tests/consensus/test_soft_voided3.py rename to hathor_tests/consensus/test_soft_voided3.py index 38f803ebd..eb318d449 100644 --- a/tests/consensus/test_soft_voided3.py +++ b/hathor_tests/consensus/test_soft_voided3.py @@ -6,8 +6,8 @@ from hathor.simulator.utils import gen_new_tx from hathor.transaction import BaseTransaction from hathor.types import VertexId -from tests.simulation.base import SimulatorTestCase -from tests.utils import add_custom_tx, gen_custom_tx +from hathor_tests.simulation.base import SimulatorTestCase +from hathor_tests.utils import add_custom_tx, gen_custom_tx class SoftVoidedTestCase(SimulatorTestCase): diff --git a/tests/consensus/test_soft_voided4.py b/hathor_tests/consensus/test_soft_voided4.py similarity index 98% rename from tests/consensus/test_soft_voided4.py rename to hathor_tests/consensus/test_soft_voided4.py index 7bb510f75..58e4bcd2b 100644 --- a/tests/consensus/test_soft_voided4.py +++ b/hathor_tests/consensus/test_soft_voided4.py @@ -6,8 +6,8 @@ from hathor.simulator.utils import gen_new_double_spending from hathor.transaction import Transaction from hathor.types import VertexId -from tests.simulation.base import SimulatorTestCase -from tests.utils import add_custom_tx +from hathor_tests.simulation.base import SimulatorTestCase +from hathor_tests.utils import add_custom_tx class SoftVoidedTestCase(SimulatorTestCase): diff --git a/tests/crypto/test_util.py b/hathor_tests/crypto/test_util.py similarity index 100% rename from tests/crypto/test_util.py rename to hathor_tests/crypto/test_util.py diff --git a/tests/dag_builder/__init__.py b/hathor_tests/dag_builder/__init__.py similarity index 100% rename from tests/dag_builder/__init__.py rename to hathor_tests/dag_builder/__init__.py diff --git a/tests/dag_builder/builder.py b/hathor_tests/dag_builder/builder.py similarity index 94% rename from tests/dag_builder/builder.py rename to hathor_tests/dag_builder/builder.py index a787fe83e..63dc362c2 100644 --- a/tests/dag_builder/builder.py +++ b/hathor_tests/dag_builder/builder.py @@ -21,8 +21,8 @@ from hathor.manager import HathorManager from hathor.util import Random from hathor.wallet import HDWallet -from tests.nanocontracts import test_blueprints -from tests.utils import GENESIS_SEED +from hathor_tests.nanocontracts import test_blueprints +from hathor_tests.utils import GENESIS_SEED class TestDAGBuilder: diff --git a/tests/dag_builder/test_dag_builder.py b/hathor_tests/dag_builder/test_dag_builder.py similarity index 99% rename from tests/dag_builder/test_dag_builder.py rename to hathor_tests/dag_builder/test_dag_builder.py index 5531a48ec..0660108a2 100644 --- a/tests/dag_builder/test_dag_builder.py +++ b/hathor_tests/dag_builder/test_dag_builder.py @@ -10,9 +10,9 @@ from hathor.transaction.nc_execution_state import NCExecutionState from hathor.transaction.token_creation_tx import TokenCreationTransaction from hathor.transaction.token_info import TokenVersion -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder -from tests.nanocontracts import test_blueprints +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.nanocontracts import test_blueprints class MyBlueprint(Blueprint): diff --git a/tests/event/__init__.py b/hathor_tests/event/__init__.py similarity index 100% rename from tests/event/__init__.py rename to hathor_tests/event/__init__.py diff --git a/tests/event/event_simulation_tester.py b/hathor_tests/event/event_simulation_tester.py similarity index 98% rename from tests/event/event_simulation_tester.py rename to hathor_tests/event/event_simulation_tester.py index 00fedaa71..6288e7ad7 100644 --- a/tests/event/event_simulation_tester.py +++ b/hathor_tests/event/event_simulation_tester.py @@ -24,7 +24,7 @@ from hathor.p2p.peer import PrivatePeer from hathor.transaction.util import unpack, unpack_len from hathor.util import json_loadb -from tests.simulation.base import SimulatorTestCase +from hathor_tests.simulation.base import SimulatorTestCase class BaseEventSimulationTester(SimulatorTestCase): diff --git a/tests/event/test_base_event.py b/hathor_tests/event/test_base_event.py similarity index 98% rename from tests/event/test_base_event.py rename to hathor_tests/event/test_base_event.py index 15393d5e9..a5311738f 100644 --- a/tests/event/test_base_event.py +++ b/hathor_tests/event/test_base_event.py @@ -18,7 +18,7 @@ from hathor.event.model.base_event import BaseEvent from hathor.event.model.event_data import ReorgData from hathor.event.model.event_type import EventType -from tests.utils import EventMocker +from hathor_tests.utils import EventMocker @pytest.mark.parametrize('event_id', [0, 1, 1000]) @@ -58,7 +58,6 @@ def test_create_base_event(event_id: int, group_id: int | None) -> None: first_block=None, voided_by=[], received_by=[], - children=[], twins=[], accumulated_weight=10.0, score=20.0, diff --git a/hathor_tests/event/test_event_manager.py b/hathor_tests/event/test_event_manager.py new file mode 100644 index 000000000..c3337cadb --- /dev/null +++ b/hathor_tests/event/test_event_manager.py @@ -0,0 +1,286 @@ +from hathor.event.model.event_data import TokenCreatedData +from hathor.event.model.event_type import EventType +from hathor.event.storage import EventRocksDBStorage +from hathor.nanocontracts import Blueprint, Context, public +from hathor.nanocontracts.catalog import NCBlueprintCatalog +from hathor.nanocontracts.types import ContractId +from hathor.nanocontracts.utils import derive_child_token_id +from hathor.pubsub import HathorEvents +from hathor.transaction import Transaction +from hathor.transaction.token_info import TokenVersion +from hathor.util import not_none +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.utils import create_tokens + + +class _TokenFactoryBlueprint(Blueprint): + @public(allow_deposit=True) + def initialize(self, ctx: Context) -> None: + pass + + @public(allow_deposit=True) + def create_token(self, ctx: Context) -> None: + self.syscall.create_deposit_token( + token_name='Deposit Token', + token_symbol='DBT', + amount=100, + ) + + +class EventManagerTest(unittest.TestCase): + def setUp(self) -> None: + super().setUp() + self.network = 'testnet' + self.event_storage = EventRocksDBStorage( + rocksdb_storage=self.create_rocksdb_storage(), + ) + self.manager = self.create_peer( + self.network, + enable_event_queue=True, + event_storage=self.event_storage + ) + self.dag_builder = TestDAGBuilder.from_manager(self.manager) + + def test_if_event_is_persisted(self) -> None: + block = self.manager.tx_storage.get_best_block() + self.manager.pubsub.publish(HathorEvents.NETWORK_NEW_TX_ACCEPTED, tx=block) + self.run_to_completion() + self.assertIsNotNone(self.event_storage.get_event(0)) + + def _fake_reorg_started(self) -> None: + block = self.manager.tx_storage.get_best_block() + # XXX: since we're faking these events, they don't neet to be consistent + self.manager.pubsub.publish(HathorEvents.REORG_STARTED, old_best_height=1, old_best_block=block, + new_best_height=1, new_best_block=block, reorg_size=1, common_block=block) + + def _fake_reorg_finished(self) -> None: + self.manager.pubsub.publish(HathorEvents.REORG_FINISHED) + + def test_event_group(self) -> None: + self._fake_reorg_started() + self._fake_reorg_finished() + self._fake_reorg_started() + self._fake_reorg_finished() + self.run_to_completion() + + event0 = not_none(self.event_storage.get_event(0)) + event1 = not_none(self.event_storage.get_event(1)) + event2 = not_none(self.event_storage.get_event(2)) + event3 = not_none(self.event_storage.get_event(3)) + event4 = not_none(self.event_storage.get_event(4)) + event5 = not_none(self.event_storage.get_event(5)) + event6 = not_none(self.event_storage.get_event(6)) + event7 = not_none(self.event_storage.get_event(7)) + event8 = not_none(self.event_storage.get_event(8)) + + self.assertEqual(EventType(event0.type), EventType.LOAD_STARTED) + self.assertEqual(EventType(event1.type), EventType.NEW_VERTEX_ACCEPTED) + self.assertEqual(EventType(event2.type), EventType.NEW_VERTEX_ACCEPTED) + self.assertEqual(EventType(event3.type), EventType.NEW_VERTEX_ACCEPTED) + self.assertEqual(EventType(event4.type), EventType.LOAD_FINISHED) + self.assertEqual(EventType(event5.type), EventType.REORG_STARTED) + + self.assertIsNotNone(event5.group_id) + self.assertEqual(EventType(event6.type), EventType.REORG_FINISHED) + self.assertIsNotNone(event6.group_id) + self.assertEqual(event5.group_id, event6.group_id) + + self.assertNotEqual(event6.group_id, event7.group_id) + self.assertIsNotNone(event7.group_id) + self.assertEqual(event7.group_id, event8.group_id) + + def test_cannot_start_group_twice(self) -> None: + self._fake_reorg_started() + self.run_to_completion() + with self.assertRaises(AssertionError): + self._fake_reorg_started() + self.run_to_completion() + + def test_cannot_finish_group_that_was_not_started(self) -> None: + with self.assertRaises(AssertionError): + self._fake_reorg_finished() + self.run_to_completion() + + def test_cannot_finish_group_twice(self) -> None: + self._fake_reorg_started() + self._fake_reorg_finished() + self.run_to_completion() + with self.assertRaises(AssertionError): + self._fake_reorg_finished() + self.run_to_completion() + + def test_nc_token_creation_event(self) -> None: + blueprint_id = b'\x01' * 32 + self.manager.tx_storage.nc_catalog = NCBlueprintCatalog({ + blueprint_id: _TokenFactoryBlueprint, + }) + + dag_builder = TestDAGBuilder.from_manager(self.manager) + artifacts = dag_builder.build_from_str(f''' + blockchain genesis b[1..15] + b12 < dummy + + init.nc_id = "{blueprint_id.hex()}" + init.nc_method = initialize() + init.nc_deposit = 1 HTR + + call.nc_id = init + call.nc_method = create_token() + call.nc_deposit = 3 HTR + + init < b13 < call < b14 + init <-- b13 + call <-- b14 + ''') + + init_tx, call_tx = artifacts.get_typed_vertices(('init', 'call'), Transaction) + + # stop right after `call` is accepted + artifacts.propagate_with(self.manager, up_to='call') + self.run_to_completion() + + # the NEW_VERTEX_ACCEPTED must have been emitted + tx_events = [ + event + for event in self.event_storage.iter_from_event(0) + if EventType(event.type) == EventType.NEW_VERTEX_ACCEPTED + and getattr(event.data, 'hash', None) == call_tx.hash_hex + ] + + self.assertEqual(len(tx_events), 1) + + expected_token_uid = derive_child_token_id( + ContractId(init_tx.hash), + token_symbol='DBT', + ).hex() + + # but the TOKEN_CREATED must have not + token_events = [ + event + for event in self.event_storage.iter_from_event(0) + if EventType(event.type) == EventType.TOKEN_CREATED + and getattr(event.data, 'token_uid', None) == expected_token_uid + ] + + self.assertEqual(len(token_events), 0) + + # only after the block is accepted it will emit the TOKEN_CREATED + artifacts.propagate_with(self.manager) + self.run_to_completion() + + token_events = [ + event + for event in self.event_storage.iter_from_event(0) + if EventType(event.type) == EventType.TOKEN_CREATED + and getattr(event.data, 'token_uid', None) == expected_token_uid + ] + + self.assertEqual(len(token_events), 1) + + token_event = token_events[0] + token_data = token_event.data + assert isinstance(token_data, TokenCreatedData) + + self.assertEqual(token_data.token_uid, expected_token_uid) + self.assertEqual(token_data.token_name, 'Deposit Token') + self.assertEqual(token_data.token_symbol, 'DBT') + self.assertEqual(token_data.token_version, TokenVersion.DEPOSIT) + + nc_exec_info = not_none(token_data.nc_exec_info) + self.assertEqual(nc_exec_info.nc_tx, call_tx.hash_hex) + call_meta = call_tx.get_metadata() + assert call_meta.first_block is not None + self.assertEqual(nc_exec_info.nc_block, call_meta.first_block.hex()) + + def test_nc_token_creation_event_not_emitted_twice(self) -> None: + blueprint_id = b'\x01' * 32 + self.manager.tx_storage.nc_catalog = NCBlueprintCatalog({ + blueprint_id: _TokenFactoryBlueprint, + }) + + dag_builder = TestDAGBuilder.from_manager(self.manager) + artifacts = dag_builder.build_from_str(f''' + blockchain genesis b[1..15] + b12 < dummy + + init.nc_id = "{blueprint_id.hex()}" + init.nc_method = initialize() + init.nc_deposit = 1 HTR + + call.nc_id = init + call.nc_method = create_token() + call.nc_deposit = 3 HTR + + init < b13 < call < b14 + init <-- b13 + call <-- b14 + ''') + + init_tx, call_tx = artifacts.get_typed_vertices(('init', 'call'), Transaction) + + artifacts.propagate_with(self.manager) + self.run_to_completion() + + expected_token_uid = derive_child_token_id( + ContractId(init_tx.hash), + token_symbol='DBT', + ).hex() + + token_events = [ + event + for event in self.event_storage.iter_from_event(0) + if EventType(event.type) == EventType.TOKEN_CREATED + and getattr(event.data, 'token_uid', None) == expected_token_uid + ] + + self.assertEqual(len(token_events), 1) + + self.manager.pubsub.publish(HathorEvents.CONSENSUS_TX_UPDATE, tx=call_tx) + self.run_to_completion() + + token_events = [ + event + for event in self.event_storage.iter_from_event(0) + if EventType(event.type) == EventType.TOKEN_CREATED + and getattr(event.data, 'token_uid', None) == expected_token_uid + ] + + self.assertEqual( + len(token_events), + 1, + 'Token creation event should not be emitted more than once for the same transaction.', + ) + + def test_token_creation_transaction_emits_token_created_event(self) -> None: + tx = create_tokens( + self.manager, + token_name='Created Token', + token_symbol='CTK', + mint_amount=123, + propagate=True, + use_genesis=False, + ) + + self.run_to_completion() + + expected_token_uid = tx.hash_hex + + token_events = [ + event + for event in self.event_storage.iter_from_event(0) + if EventType(event.type) == EventType.TOKEN_CREATED + and getattr(event.data, 'token_uid', None) == expected_token_uid + ] + + self.assertEqual(len(token_events), 1) + + token_event = token_events[0] + token_data = token_event.data + assert isinstance(token_data, TokenCreatedData) + + self.assertEqual(token_data.token_uid, expected_token_uid) + self.assertIsNone(token_data.nc_exec_info) + self.assertEqual(token_data.token_name, 'Created Token') + self.assertEqual(token_data.token_symbol, 'CTK') + self.assertEqual(token_data.token_version, TokenVersion.DEPOSIT) diff --git a/tests/event/test_event_reorg.py b/hathor_tests/event/test_event_reorg.py similarity index 98% rename from tests/event/test_event_reorg.py rename to hathor_tests/event/test_event_reorg.py index bf3e9eab5..1ef7a2812 100644 --- a/tests/event/test_event_reorg.py +++ b/hathor_tests/event/test_event_reorg.py @@ -1,8 +1,8 @@ from hathor.event.model.event_type import EventType from hathor.event.storage import EventRocksDBStorage from hathor.simulator.utils import add_new_blocks -from tests import unittest -from tests.utils import BURN_ADDRESS, get_genesis_key +from hathor_tests import unittest +from hathor_tests.utils import BURN_ADDRESS, get_genesis_key class EventReorgTest(unittest.TestCase): diff --git a/tests/event/test_event_simulation_responses.py b/hathor_tests/event/test_event_simulation_responses.py similarity index 99% rename from tests/event/test_event_simulation_responses.py rename to hathor_tests/event/test_event_simulation_responses.py index 779d1b485..a1c2db62c 100644 --- a/tests/event/test_event_simulation_responses.py +++ b/hathor_tests/event/test_event_simulation_responses.py @@ -15,7 +15,7 @@ from hathor.event.websocket.request import AckRequest, StartStreamRequest, StopStreamRequest from hathor.event.websocket.response import InvalidRequestType from hathor.simulator.trigger import StopAfterNMinedBlocks -from tests.event.event_simulation_tester import BaseEventSimulationTester +from hathor_tests.event.event_simulation_tester import BaseEventSimulationTester class EventSimulationResponsesTest(BaseEventSimulationTester): diff --git a/tests/event/test_event_simulation_scenarios.py b/hathor_tests/event/test_event_simulation_scenarios.py similarity index 74% rename from tests/event/test_event_simulation_scenarios.py rename to hathor_tests/event/test_event_simulation_scenarios.py index aacd6fd80..179d0063f 100644 --- a/tests/event/test_event_simulation_scenarios.py +++ b/hathor_tests/event/test_event_simulation_scenarios.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from hathor.cli.events_simulator.scenario import Scenario from hathor.event.model.base_event import BaseEvent from hathor.event.model.event_data import ( DecodedTxOutput, @@ -30,7 +29,8 @@ from hathor.event.websocket.request import StartStreamRequest from hathor.event.websocket.response import EventResponse from hathor.transaction import Block, Transaction -from tests.event.event_simulation_tester import BaseEventSimulationTester +from hathor_cli.events_simulator.scenario import Scenario +from hathor_tests.event.event_simulation_tester import BaseEventSimulationTester class EventSimulationScenariosTest(BaseEventSimulationTester): @@ -78,9 +78,9 @@ def test_only_load(self) -> None: # LOAD_STATED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=0, timestamp=1578878880.0, type=EventType.LOAD_STARTED, data=EmptyData(), group_id=None), latest_event_id=4, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for each genesis (1 block and 2 txs) - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', nonce=0, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU/QUFm2AGJJVDuC82h2oXxz/SJnuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HVayMofEDh4XGsaQJeRJKhutYxYodYNop6', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=4, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=4, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=4, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', nonce=0, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU/QUFm2AGJJVDuC82h2oXxz/SJnuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HVayMofEDh4XGsaQJeRJKhutYxYodYNop6', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=4, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=4, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=4, stream_id=stream_id), # noqa: E501 # LOAD_FINISHED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=4, timestamp=1578878880.0, type=EventType.LOAD_FINISHED, data=EmptyData(), group_id=None), latest_event_id=4, stream_id=stream_id) # noqa: E501 ] @@ -99,18 +99,18 @@ def test_single_chain_one_block(self) -> None: # LOAD_STATED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=0, timestamp=1578878880.0, type=EventType.LOAD_STARTED, data=EmptyData(), group_id=None), latest_event_id=9, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for each genesis (1 block and 2 txs) - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', nonce=0, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU/QUFm2AGJJVDuC82h2oXxz/SJnuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HVayMofEDh4XGsaQJeRJKhutYxYodYNop6', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=9, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=9, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=9, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', nonce=0, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU/QUFm2AGJJVDuC82h2oXxz/SJnuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HVayMofEDh4XGsaQJeRJKhutYxYodYNop6', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=9, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=9, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=9, stream_id=stream_id), # noqa: E501 # LOAD_FINISHED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=4, timestamp=1578878880.0, type=EventType.LOAD_FINISHED, data=EmptyData(), group_id=None), latest_event_id=9, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new block (below), and one VERTEX_METADATA_CHANGED for each genesis tx (2), adding the new block as their child # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=5, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=9, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=6, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=9, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=7, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=9, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=8, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[''], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=9, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=5, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=9, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=6, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=9, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=7, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=9, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=8, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=9, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new block - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=9, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=9, stream_id=stream_id) # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=9, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=9, stream_id=stream_id) # noqa: E501 ] self.assert_response_equal(responses, expected) @@ -127,55 +127,55 @@ def test_single_chain_blocks_and_transactions(self) -> None: # LOAD_STATED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=0, timestamp=1578878880.0, type=EventType.LOAD_STARTED, data=EmptyData(), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for each genesis (1 block and 2 txs) - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', nonce=0, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU/QUFm2AGJJVDuC82h2oXxz/SJnuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HVayMofEDh4XGsaQJeRJKhutYxYodYNop6', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', nonce=0, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU/QUFm2AGJJVDuC82h2oXxz/SJnuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HVayMofEDh4XGsaQJeRJKhutYxYodYNop6', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # LOAD_FINISHED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=4, timestamp=1578878880.0, type=EventType.LOAD_FINISHED, data=EmptyData(), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new block (below), and one VERTEX_METADATA_CHANGED for each genesis tx (2), adding the new block as their child # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=5, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=6, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', 'fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', 'eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', 'f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=7, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', 'fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', 'eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', 'f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=8, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[''], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=5, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=6, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=7, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=8, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new block - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=9, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=9, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED and one NEW_VERTEX_ACCEPTED for 10 new blocks - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=10, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8'], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=11, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8'], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=12, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393'], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=13, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393'], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=14, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49'], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=15, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49'], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=16, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3'], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=17, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3'], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=18, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e'], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=19, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e'], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=20, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d'], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=21, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d'], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=22, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6'], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=23, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6'], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=24, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7'], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=25, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7'], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=26, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb'], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=27, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb'], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=28, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=29, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=10, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=11, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=12, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=13, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=14, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=15, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=16, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=17, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=18, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=19, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=20, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=21, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=22, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=23, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=24, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=25, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=26, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=27, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=28, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=29, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new tx (below), and one VERTEX_METADATA_CHANGED for a block, adding the new tx as spending their output # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=30, timestamp=1578878970.5, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.656776158409354, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=18.656777477108076, score=0.0, accumulated_weight_raw="413285", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=31, timestamp=1578878970.5, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[SpentOutput(index=0, tx_ids=['5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650'])], conflict_with=[], voided_by=[], received_by=[], children=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=30, timestamp=1578878970.5, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.656776158409354, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.656777477108076, score=0.0, accumulated_weight_raw="413285", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=31, timestamp=1578878970.5, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[SpentOutput(index=0, tx_ids=['5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new tx - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=32, timestamp=1578878970.5, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.656776158409354, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=18.656777477108076, score=0.0, accumulated_weight_raw="413285", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=32, timestamp=1578878970.5, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.656776158409354, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.656777477108076, score=0.0, accumulated_weight_raw="413285", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new tx (below), and one VERTEX_METADATA_CHANGED for a tx, adding the new tx as spending their output and children # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=33, timestamp=1578879030.75, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='d2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=18.4904519466213, inputs=[TxInput(tx_id='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', index=0, spent_output=TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)))], outputs=[TxOutput(value=3400, token_data=0, script='dqkUmkey79Rbhjq4BtHYCm2mT8hDprWIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLatLcoaATFMqECb5fD5rdW2nF9WGyw9os', timelock=None)), TxOutput(value=2000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='d2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=18.49045136082641, score=0.0, accumulated_weight_raw="368282", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=34, timestamp=1578879030.75, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.656776158409354, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', spent_outputs=[SpentOutput(index=0, tx_ids=['d2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6'])], conflict_with=[], voided_by=[], received_by=[], children=['d2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6'], twins=[], accumulated_weight=18.656777477108076, score=0.0, accumulated_weight_raw="413285", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=33, timestamp=1578879030.75, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='d2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=18.4904519466213, inputs=[TxInput(tx_id='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', index=0, spent_output=TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)))], outputs=[TxOutput(value=3400, token_data=0, script='dqkUmkey79Rbhjq4BtHYCm2mT8hDprWIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLatLcoaATFMqECb5fD5rdW2nF9WGyw9os', timelock=None)), TxOutput(value=2000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='d2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.49045136082641, score=0.0, accumulated_weight_raw="368282", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=34, timestamp=1578879030.75, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.656776158409354, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', spent_outputs=[SpentOutput(index=0, tx_ids=['d2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.656777477108076, score=0.0, accumulated_weight_raw="413285", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new tx - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=35, timestamp=1578879030.75, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='d2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=18.4904519466213, inputs=[TxInput(tx_id='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', index=0, spent_output=TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)))], outputs=[TxOutput(value=3400, token_data=0, script='dqkUmkey79Rbhjq4BtHYCm2mT8hDprWIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLatLcoaATFMqECb5fD5rdW2nF9WGyw9os', timelock=None)), TxOutput(value=2000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='d2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=18.49045136082641, score=0.0, accumulated_weight_raw="368282", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=35, timestamp=1578879030.75, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='d2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=18.4904519466213, inputs=[TxInput(tx_id='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', index=0, spent_output=TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)))], outputs=[TxOutput(value=3400, token_data=0, script='dqkUmkey79Rbhjq4BtHYCm2mT8hDprWIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLatLcoaATFMqECb5fD5rdW2nF9WGyw9os', timelock=None)), TxOutput(value=2000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='d2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.49045136082641, score=0.0, accumulated_weight_raw="368282", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new block (below), and one VERTEX_METADATA_CHANGED for each confirmed transaction (first block changed) # noqa E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=36, timestamp=1578879091.0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='7c7449a44a6adf26fb9b68f8c2b7751905c788b417946c43b8a999d0b66f76d9', nonce=0, timestamp=1578879090, signal_bits=0, version=0, weight=8.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUTisHvpM4sDeINzxF5auK/8bP6UaIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDeSe6qKqjSLwtnjLBV84NddtZQyNb9HUU', timelock=None))], parents=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', 'd2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6', '5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='7c7449a44a6adf26fb9b68f8c2b7751905c788b417946c43b8a999d0b66f76d9', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=8.0, score=19.576585834390443, accumulated_weight_raw="256", score_raw="781879", first_block=None, height=12, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=37, timestamp=1578879091.0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='d2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=18.4904519466213, inputs=[TxInput(tx_id='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', index=0, spent_output=TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)))], outputs=[TxOutput(value=3400, token_data=0, script='dqkUmkey79Rbhjq4BtHYCm2mT8hDprWIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLatLcoaATFMqECb5fD5rdW2nF9WGyw9os', timelock=None)), TxOutput(value=2000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='d2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['7c7449a44a6adf26fb9b68f8c2b7751905c788b417946c43b8a999d0b66f76d9'], twins=[], accumulated_weight=18.49045136082641, score=0.0, accumulated_weight_raw="368282", score_raw="0", first_block='7c7449a44a6adf26fb9b68f8c2b7751905c788b417946c43b8a999d0b66f76d9', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=38, timestamp=1578879091.0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.656776158409354, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', spent_outputs=[SpentOutput(index=0, tx_ids=['d2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6'])], conflict_with=[], voided_by=[], received_by=[], children=['d2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6', '7c7449a44a6adf26fb9b68f8c2b7751905c788b417946c43b8a999d0b66f76d9'], twins=[], accumulated_weight=18.656777477108076, score=0.0, accumulated_weight_raw="413285", score_raw="0", first_block='7c7449a44a6adf26fb9b68f8c2b7751905c788b417946c43b8a999d0b66f76d9', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=36, timestamp=1578879091.0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='7c7449a44a6adf26fb9b68f8c2b7751905c788b417946c43b8a999d0b66f76d9', nonce=0, timestamp=1578879090, signal_bits=0, version=0, weight=8.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUTisHvpM4sDeINzxF5auK/8bP6UaIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDeSe6qKqjSLwtnjLBV84NddtZQyNb9HUU', timelock=None))], parents=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', 'd2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6', '5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='7c7449a44a6adf26fb9b68f8c2b7751905c788b417946c43b8a999d0b66f76d9', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=8.0, score=19.576585834390443, accumulated_weight_raw="256", score_raw="781879", first_block=None, height=12, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=37, timestamp=1578879091.0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='d2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=18.4904519466213, inputs=[TxInput(tx_id='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', index=0, spent_output=TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)))], outputs=[TxOutput(value=3400, token_data=0, script='dqkUmkey79Rbhjq4BtHYCm2mT8hDprWIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLatLcoaATFMqECb5fD5rdW2nF9WGyw9os', timelock=None)), TxOutput(value=2000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='d2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.49045136082641, score=0.0, accumulated_weight_raw="368282", score_raw="0", first_block='7c7449a44a6adf26fb9b68f8c2b7751905c788b417946c43b8a999d0b66f76d9', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=38, timestamp=1578879091.0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.656776158409354, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', spent_outputs=[SpentOutput(index=0, tx_ids=['d2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.656777477108076, score=0.0, accumulated_weight_raw="413285", score_raw="0", first_block='7c7449a44a6adf26fb9b68f8c2b7751905c788b417946c43b8a999d0b66f76d9', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new block - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=39, timestamp=1578879091.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='7c7449a44a6adf26fb9b68f8c2b7751905c788b417946c43b8a999d0b66f76d9', nonce=0, timestamp=1578879090, signal_bits=0, version=0, weight=8.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUTisHvpM4sDeINzxF5auK/8bP6UaIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDeSe6qKqjSLwtnjLBV84NddtZQyNb9HUU', timelock=None))], parents=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', 'd2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6', '5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='7c7449a44a6adf26fb9b68f8c2b7751905c788b417946c43b8a999d0b66f76d9', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=8.0, score=19.576585834390443, accumulated_weight_raw="256", score_raw="781879", first_block=None, height=12, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id) # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=39, timestamp=1578879091.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='7c7449a44a6adf26fb9b68f8c2b7751905c788b417946c43b8a999d0b66f76d9', nonce=0, timestamp=1578879090, signal_bits=0, version=0, weight=8.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUTisHvpM4sDeINzxF5auK/8bP6UaIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDeSe6qKqjSLwtnjLBV84NddtZQyNb9HUU', timelock=None))], parents=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', 'd2bd5f83fcbfa5dee2b602ddc18ebd4f7714e1ecf928824f862efb0559dcb4d6', '5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='7c7449a44a6adf26fb9b68f8c2b7751905c788b417946c43b8a999d0b66f76d9', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=8.0, score=19.576585834390443, accumulated_weight_raw="256", score_raw="781879", first_block=None, height=12, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id) # noqa: E501 ] self.assert_response_equal(responses, expected) @@ -192,38 +192,38 @@ def test_reorg(self) -> None: # LOAD_STATED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=0, timestamp=1578878880.0, type=EventType.LOAD_STARTED, data=EmptyData(), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for each genesis (1 block and 2 txs) - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', nonce=0, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU/QUFm2AGJJVDuC82h2oXxz/SJnuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HVayMofEDh4XGsaQJeRJKhutYxYodYNop6', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', nonce=0, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU/QUFm2AGJJVDuC82h2oXxz/SJnuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HVayMofEDh4XGsaQJeRJKhutYxYodYNop6', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 # LOAD_FINISHED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=4, timestamp=1578878880.0, type=EventType.LOAD_FINISHED, data=EmptyData(), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new block (below), and one VERTEX_METADATA_CHANGED for each genesis tx (2), adding the new block as their child # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=5, timestamp=1578878940.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', nonce=0, timestamp=1578878940, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=6, timestamp=1578878940.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=7, timestamp=1578878940.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=8, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[''], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=5, timestamp=1578878940.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', nonce=0, timestamp=1578878940, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=6, timestamp=1578878940.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=7, timestamp=1578878940.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=8, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new block from manager1 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=9, timestamp=1578878940.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', nonce=0, timestamp=1578878940, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=9, timestamp=1578878940.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', nonce=0, timestamp=1578878940, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new block (below), and one VERTEX_METADATA_CHANGED for each genesis tx (2), adding the new block as their child # noqa: E501 # Also one VERTEX_METADATA_CHANGED for the previous block, voiding it - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=10, timestamp=1578879064.0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', nonce=0, timestamp=1578879000, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUfBo1MGBHkHtXDktO+BxtBdh5T5GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HHqKa5Y6viZ8fkH2bd1qQBdsZnrtsmruqS', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', spent_outputs=[], conflict_with=[], voided_by=['1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533'], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=11, timestamp=1578879064.0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', nonce=0, timestamp=1578878940, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', spent_outputs=[], conflict_with=[], voided_by=['82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a'], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=12, timestamp=1578879064.0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', '1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=13, timestamp=1578879064.0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', '1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=10, timestamp=1578879064.0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', nonce=0, timestamp=1578879000, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUfBo1MGBHkHtXDktO+BxtBdh5T5GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HHqKa5Y6viZ8fkH2bd1qQBdsZnrtsmruqS', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', spent_outputs=[], conflict_with=[], voided_by=['1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533'], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=11, timestamp=1578879064.0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', nonce=0, timestamp=1578878940, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', spent_outputs=[], conflict_with=[], voided_by=['82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a'], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=12, timestamp=1578879064.0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=13, timestamp=1578879064.0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new block from manager2 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=14, timestamp=1578879064.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', nonce=0, timestamp=1578879000, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUfBo1MGBHkHtXDktO+BxtBdh5T5GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HHqKa5Y6viZ8fkH2bd1qQBdsZnrtsmruqS', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', spent_outputs=[], conflict_with=[], voided_by=['1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533'], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=14, timestamp=1578879064.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', nonce=0, timestamp=1578879000, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUfBo1MGBHkHtXDktO+BxtBdh5T5GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HHqKa5Y6viZ8fkH2bd1qQBdsZnrtsmruqS', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', spent_outputs=[], conflict_with=[], voided_by=['1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533'], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id), # noqa: E501 # REORG_STARTED caused by a new block from manager2 (below) EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=15, timestamp=1578879064.25, type=EventType.REORG_STARTED, data=ReorgData(reorg_size=1, previous_best_block='82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', new_best_block='38e7f91420ae78ae01707f80c29abe692beebf9d5575cc7c9248e9bdc78169c1', common_block='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792'), group_id=0), latest_event_id=21, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new block (below), and one VERTEX_METADATA_CHANGED for each genesis tx (2), adding the new block as their child # noqa: E501 # Also one VERTEX_METADATA_CHANGED for the previous block, un-voiding it as it's now part of the best blockchain # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=16, timestamp=1578879064.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='38e7f91420ae78ae01707f80c29abe692beebf9d5575cc7c9248e9bdc78169c1', nonce=0, timestamp=1578879001, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUgQrqLefPfPVpkXlfvvAp943epyOIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJHSdTickduA1MF9PTbzBQi6Z7stNAzwAu', timelock=None))], parents=['1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='38e7f91420ae78ae01707f80c29abe692beebf9d5575cc7c9248e9bdc78169c1', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full'), aux_pow=None), group_id=0), latest_event_id=21, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=17, timestamp=1578879064.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', nonce=0, timestamp=1578879000, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUfBo1MGBHkHtXDktO+BxtBdh5T5GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HHqKa5Y6viZ8fkH2bd1qQBdsZnrtsmruqS', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['38e7f91420ae78ae01707f80c29abe692beebf9d5575cc7c9248e9bdc78169c1'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=0), latest_event_id=21, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=18, timestamp=1578879064.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', '1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', '38e7f91420ae78ae01707f80c29abe692beebf9d5575cc7c9248e9bdc78169c1'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', height=0, validation='full'), aux_pow=None), group_id=0), latest_event_id=21, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=19, timestamp=1578879064.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['82afedcd590f7ad34d09475fc1dfd00e5a0f8ad6b70508ca4659351709c90f9a', '1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', '38e7f91420ae78ae01707f80c29abe692beebf9d5575cc7c9248e9bdc78169c1'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', height=0, validation='full'), aux_pow=None), group_id=0), latest_event_id=21, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=16, timestamp=1578879064.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='38e7f91420ae78ae01707f80c29abe692beebf9d5575cc7c9248e9bdc78169c1', nonce=0, timestamp=1578879001, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUgQrqLefPfPVpkXlfvvAp943epyOIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJHSdTickduA1MF9PTbzBQi6Z7stNAzwAu', timelock=None))], parents=['1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='38e7f91420ae78ae01707f80c29abe692beebf9d5575cc7c9248e9bdc78169c1', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full'), aux_pow=None), group_id=0), latest_event_id=21, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=17, timestamp=1578879064.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', nonce=0, timestamp=1578879000, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUfBo1MGBHkHtXDktO+BxtBdh5T5GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HHqKa5Y6viZ8fkH2bd1qQBdsZnrtsmruqS', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=0), latest_event_id=21, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=18, timestamp=1578879064.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', height=0, validation='full'), aux_pow=None), group_id=0), latest_event_id=21, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=19, timestamp=1578879064.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', height=0, validation='full'), aux_pow=None), group_id=0), latest_event_id=21, stream_id=stream_id), # noqa: E501 # REORG_FINISHED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=20, timestamp=1578879064.25, type=EventType.REORG_FINISHED, data=EmptyData(), group_id=0), latest_event_id=21, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new block from manager2 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=21, timestamp=1578879064.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='38e7f91420ae78ae01707f80c29abe692beebf9d5575cc7c9248e9bdc78169c1', nonce=0, timestamp=1578879001, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUgQrqLefPfPVpkXlfvvAp943epyOIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJHSdTickduA1MF9PTbzBQi6Z7stNAzwAu', timelock=None))], parents=['1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='38e7f91420ae78ae01707f80c29abe692beebf9d5575cc7c9248e9bdc78169c1', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id) # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=21, timestamp=1578879064.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='38e7f91420ae78ae01707f80c29abe692beebf9d5575cc7c9248e9bdc78169c1', nonce=0, timestamp=1578879001, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUgQrqLefPfPVpkXlfvvAp943epyOIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJHSdTickduA1MF9PTbzBQi6Z7stNAzwAu', timelock=None))], parents=['1204b8c30f0236ae6f1841d0c4805a47089c4d5e3ccd0dcab8aa65f0e4991533', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='38e7f91420ae78ae01707f80c29abe692beebf9d5575cc7c9248e9bdc78169c1', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full'), aux_pow=None), group_id=None), latest_event_id=21, stream_id=stream_id) # noqa: E501 ] self.assert_response_equal(responses, expected) @@ -240,57 +240,57 @@ def test_unvoided_transaction(self) -> None: # LOAD_STATED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=0, type=EventType.LOAD_STARTED, timestamp=0, data=EmptyData(), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for each genesis (1 block and 2 txs) - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', nonce=0, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU/QUFm2AGJJVDuC82h2oXxz/SJnuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HVayMofEDh4XGsaQJeRJKhutYxYodYNop6', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', nonce=0, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU/QUFm2AGJJVDuC82h2oXxz/SJnuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HVayMofEDh4XGsaQJeRJKhutYxYodYNop6', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 # LOAD_FINISHED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=4, type=EventType.LOAD_FINISHED, timestamp=0, data=EmptyData(), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new block (below), and one VERTEX_METADATA_CHANGED for each genesis tx (2), adding the new block as their child # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=5, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=6, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', 'fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', 'eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', 'f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=7, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', 'fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', 'eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', 'f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=8, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[''], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=5, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=6, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=7, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=8, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new block - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=9, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=9, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED and one NEW_VERTEX_ACCEPTED for 10 new blocks - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=10, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8'], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=11, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8'], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=12, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393'], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=13, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393'], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=14, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49'], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=15, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49'], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=16, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3'], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=17, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3'], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=18, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e'], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=19, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e'], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=20, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d'], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=21, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d'], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=22, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6'], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=23, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6'], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=24, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7'], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=25, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7'], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=26, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb'], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=27, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb'], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=28, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=29, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=10, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=11, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=12, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=13, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=14, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=15, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=16, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=17, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=18, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=19, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=20, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=21, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=22, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=23, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=24, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=25, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=26, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=27, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=28, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=29, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new tx (below), and one VERTEX_METADATA_CHANGED for a block, adding the new tx as spending their output # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=30, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=19.0005, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=19.00050072657387, score=0.0, accumulated_weight_raw="524470", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=31, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[SpentOutput(index=0, tx_ids=['cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4'])], conflict_with=[], voided_by=[], received_by=[], children=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=30, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=19.0005, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=19.00050072657387, score=0.0, accumulated_weight_raw="524470", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=31, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[SpentOutput(index=0, tx_ids=['cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new tx - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=32, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=19.0005, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=19.00050072657387, score=0.0, accumulated_weight_raw="524470", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=32, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=19.0005, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=19.00050072657387, score=0.0, accumulated_weight_raw="524470", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new tx (below), one VERTEX_METADATA_CHANGED for a block, adding the new tx as spending their output, and one VERTEX_METADATA_CHANGED adding the new tx as twin/conflict of the previous tx # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=33, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=19.0, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88', spent_outputs=[], conflict_with=['cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4'], voided_by=['0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88'], received_by=[], children=[], twins=['cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4'], accumulated_weight=19.0, score=0.0, accumulated_weight_raw="524288", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=34, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=19.0005, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4', spent_outputs=[], conflict_with=['0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88'], voided_by=[], received_by=[], children=[], twins=['0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88'], accumulated_weight=19.00050072657387, score=0.0, accumulated_weight_raw="524470", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=35, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[SpentOutput(index=0, tx_ids=['cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4', '0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88'])], conflict_with=[], voided_by=[], received_by=[], children=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=33, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=19.0, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88', spent_outputs=[], conflict_with=['cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4'], voided_by=['0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88'], received_by=[], twins=['cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4'], accumulated_weight=19.0, score=0.0, accumulated_weight_raw="524288", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=34, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=19.0005, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4', spent_outputs=[], conflict_with=['0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88'], voided_by=[], received_by=[], twins=['0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88'], accumulated_weight=19.00050072657387, score=0.0, accumulated_weight_raw="524470", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=35, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[SpentOutput(index=0, tx_ids=['cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4', '0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new tx that is a twin of the previous one. It's voided. - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=36, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=19.0, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88', spent_outputs=[], conflict_with=['cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4'], voided_by=['0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88'], received_by=[], children=[], twins=['cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4'], accumulated_weight=19.0, score=0.0, accumulated_weight_raw="524288", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=36, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=19.0, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88', spent_outputs=[], conflict_with=['cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4'], voided_by=['0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88'], received_by=[], twins=['cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4'], accumulated_weight=19.0, score=0.0, accumulated_weight_raw="524288", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new block (below), and one VERTEX_METADATA_CHANGED for each twin tx, inverting the voided state of them. # noqa E501 # The order of events is important, we receive the voided txs first, then reverse topological ordering. - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=37, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=19.0005, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4', spent_outputs=[], conflict_with=['0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88'], voided_by=['cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4'], received_by=[], children=[], twins=['0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88'], accumulated_weight=19.00050072657387, score=0.0, accumulated_weight_raw="524470", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=38, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='24707288e7c72c5e74c68241ee32d64239902533e64946de6e6cddb66ef3432a', nonce=0, timestamp=1578879090, signal_bits=0, version=0, weight=8.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUFgE9a6rVMusN303z18sYfjdpYGqIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H8XUjiUx24WLXUN63da34hX6bEs29GJjSs', timelock=None))], parents=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='24707288e7c72c5e74c68241ee32d64239902533e64946de6e6cddb66ef3432a', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=8.0, score=19.000858282039708, accumulated_weight_raw="256", score_raw="524600", first_block=None, height=12, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=39, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=19.0, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88', spent_outputs=[], conflict_with=['cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4'], voided_by=[], received_by=[], children=['24707288e7c72c5e74c68241ee32d64239902533e64946de6e6cddb66ef3432a'], twins=['cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4'], accumulated_weight=19.000704269011248, score=0.0, accumulated_weight_raw="524544", score_raw="0", first_block='24707288e7c72c5e74c68241ee32d64239902533e64946de6e6cddb66ef3432a', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=37, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=19.0005, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4', spent_outputs=[], conflict_with=['0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88'], voided_by=['cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4'], received_by=[], twins=['0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88'], accumulated_weight=19.00050072657387, score=0.0, accumulated_weight_raw="524470", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=38, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='24707288e7c72c5e74c68241ee32d64239902533e64946de6e6cddb66ef3432a', nonce=0, timestamp=1578879090, signal_bits=0, version=0, weight=8.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUFgE9a6rVMusN303z18sYfjdpYGqIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H8XUjiUx24WLXUN63da34hX6bEs29GJjSs', timelock=None))], parents=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='24707288e7c72c5e74c68241ee32d64239902533e64946de6e6cddb66ef3432a', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=8.0, score=19.000858282039708, accumulated_weight_raw="256", score_raw="524600", first_block=None, height=12, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=39, type=EventType.VERTEX_METADATA_CHANGED, timestamp=0, data=TxData(hash='0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=19.0, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88', spent_outputs=[], conflict_with=['cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4'], voided_by=[], received_by=[], twins=['cba55aadc9fd8d5bdb6f394d8f5eb00cc775db12c2512c9e37df8e31ca3841f4'], accumulated_weight=19.000704269011248, score=0.0, accumulated_weight_raw="524544", score_raw="0", first_block='24707288e7c72c5e74c68241ee32d64239902533e64946de6e6cddb66ef3432a', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new block - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=40, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='24707288e7c72c5e74c68241ee32d64239902533e64946de6e6cddb66ef3432a', nonce=0, timestamp=1578879090, signal_bits=0, version=0, weight=8.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUFgE9a6rVMusN303z18sYfjdpYGqIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H8XUjiUx24WLXUN63da34hX6bEs29GJjSs', timelock=None))], parents=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='24707288e7c72c5e74c68241ee32d64239902533e64946de6e6cddb66ef3432a', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=8.0, score=19.000858282039708, accumulated_weight_raw="256", score_raw="524600", first_block=None, height=12, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=40, type=EventType.NEW_VERTEX_ACCEPTED, timestamp=0, data=TxData(hash='24707288e7c72c5e74c68241ee32d64239902533e64946de6e6cddb66ef3432a', nonce=0, timestamp=1578879090, signal_bits=0, version=0, weight=8.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUFgE9a6rVMusN303z18sYfjdpYGqIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H8XUjiUx24WLXUN63da34hX6bEs29GJjSs', timelock=None))], parents=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '0639e93ff22647ed06af3ac3a3bc7dd2ca8db18c67fdd9a039318b4d6bf51a88'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='24707288e7c72c5e74c68241ee32d64239902533e64946de6e6cddb66ef3432a', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=8.0, score=19.000858282039708, accumulated_weight_raw="256", score_raw="524600", first_block=None, height=12, validation='full'), aux_pow=None), group_id=None), latest_event_id=40, stream_id=stream_id), # noqa: E501 ] self.assert_response_equal(responses, expected) @@ -309,62 +309,62 @@ def test_invalid_mempool(self) -> None: # LOAD_STATED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=0, timestamp=1578878880.0, type=EventType.LOAD_STARTED, data=EmptyData(), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for each genesis (1 block and 2 txs) - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', nonce=0, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU/QUFm2AGJJVDuC82h2oXxz/SJnuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HVayMofEDh4XGsaQJeRJKhutYxYodYNop6', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', nonce=0, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU/QUFm2AGJJVDuC82h2oXxz/SJnuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HVayMofEDh4XGsaQJeRJKhutYxYodYNop6', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, timestamp=1578878880.0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 # LOAD_FINISHED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=4, timestamp=1578878880.0, type=EventType.LOAD_FINISHED, data=EmptyData(), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new block (below), and one VERTEX_METADATA_CHANGED for each genesis tx (2), adding the new block as their child # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=5, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=6, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', 'fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', 'eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', 'f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=7, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', 'fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', 'eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', 'f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=8, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[''], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=5, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=6, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=7, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=8, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new block - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=9, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=9, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED and one NEW_VERTEX_ACCEPTED for 10 new blocks - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=10, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8'], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=11, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8'], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=12, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393'], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=13, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393'], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=14, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49'], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=15, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49'], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=16, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3'], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=17, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3'], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=18, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e'], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=19, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e'], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=20, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d'], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=21, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d'], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=22, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6'], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=23, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6'], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=24, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7'], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=25, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7'], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=26, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb'], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=27, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb'], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=28, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=29, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=10, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=11, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=12, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=13, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=14, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=15, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=16, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=17, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=18, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=19, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=20, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=21, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=22, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=23, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=24, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=25, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=26, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=27, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=28, timestamp=1578878910.25, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=29, timestamp=1578878910.25, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new tx (below), and one VERTEX_METADATA_CHANGED for a block, adding the new tx as spending their output # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=30, timestamp=1578878970.5, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.656776158409354, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=18.656777477108076, score=0.0, accumulated_weight_raw="413285", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=31, timestamp=1578878970.5, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[SpentOutput(index=0, tx_ids=['5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650'])], conflict_with=[], voided_by=[], received_by=[], children=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=30, timestamp=1578878970.5, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.656776158409354, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.656777477108076, score=0.0, accumulated_weight_raw="413285", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=31, timestamp=1578878970.5, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[SpentOutput(index=0, tx_ids=['5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new tx - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=32, timestamp=1578878970.5, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.656776158409354, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=18.656777477108076, score=0.0, accumulated_weight_raw="413285", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=32, timestamp=1578878970.5, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.656776158409354, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.656777477108076, score=0.0, accumulated_weight_raw="413285", score_raw="0", first_block=None, height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id), # noqa: E501 # REORG_STARTED caused by a block with lower height but higher weight (below) EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=33, timestamp=0, type=EventType.REORG_STARTED, data=ReorgData(reorg_size=2, previous_best_block='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', new_best_block='2e3122412eb129c7f0d03e37d8a5637da9354df980a2259332b2b14e7a340d94', common_block='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6'), group_id=0), latest_event_id=42, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for each block that was voided by the reorg - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=34, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', spent_outputs=[], conflict_with=[], voided_by=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb'], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full'), aux_pow=None), group_id=0), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=35, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', spent_outputs=[], conflict_with=[], voided_by=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7'], received_by=[], children=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb'], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full'), aux_pow=None), group_id=0), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=34, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', spent_outputs=[], conflict_with=[], voided_by=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb'], received_by=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full'), aux_pow=None), group_id=0), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=35, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', spent_outputs=[], conflict_with=[], voided_by=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7'], received_by=[], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full'), aux_pow=None), group_id=0), latest_event_id=42, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for the new block - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=36, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='2e3122412eb129c7f0d03e37d8a5637da9354df980a2259332b2b14e7a340d94', nonce=0, timestamp=1578879030, signal_bits=0, version=0, weight=10.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='', decoded={})], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='2e3122412eb129c7f0d03e37d8a5637da9354df980a2259332b2b14e7a340d94', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=10.0, score=10.066089190457772, accumulated_weight_raw="1024", score_raw="1072", first_block=None, height=10, validation='full'), aux_pow=None), group_id=0), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=36, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='2e3122412eb129c7f0d03e37d8a5637da9354df980a2259332b2b14e7a340d94', nonce=0, timestamp=1578879030, signal_bits=0, version=0, weight=10.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='', decoded={})], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='2e3122412eb129c7f0d03e37d8a5637da9354df980a2259332b2b14e7a340d94', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=10.0, score=10.066089190457772, accumulated_weight_raw="1024", score_raw="1072", first_block=None, height=10, validation='full'), aux_pow=None), group_id=0), latest_event_id=42, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for the block that had its output unspent, since the previous tx was removed - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=37, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[SpentOutput(index=0, tx_ids=[])], conflict_with=[], voided_by=[], received_by=[], children=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=0), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=37, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[SpentOutput(index=0, tx_ids=[])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full'), aux_pow=None), group_id=0), latest_event_id=42, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for each parent of the tx that was removed - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=38, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', 'fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', 'eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', 'f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', '2e3122412eb129c7f0d03e37d8a5637da9354df980a2259332b2b14e7a340d94'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=0), latest_event_id=42, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=39, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', 'fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', 'eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', 'f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', '2e3122412eb129c7f0d03e37d8a5637da9354df980a2259332b2b14e7a340d94'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=0), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=38, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=0), latest_event_id=42, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=39, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full'), aux_pow=None), group_id=0), latest_event_id=42, stream_id=stream_id), # noqa: E501 # One VERTEX_REMOVED for the tx above EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=40, timestamp=0, type=EventType.VERTEX_REMOVED, data=TxDataWithoutMeta(hash='5453759e15a6413a06390868cbb56509704c6f3f7d25f443556d8d6b2dacc650', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.656776158409354, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None), group_id=0), latest_event_id=42, stream_id=stream_id), # noqa: E501 # REORG_FINISHED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=41, timestamp=0, type=EventType.REORG_FINISHED, data=EmptyData(), group_id=0), latest_event_id=42, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for the block that caused the reorg - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=42, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='2e3122412eb129c7f0d03e37d8a5637da9354df980a2259332b2b14e7a340d94', nonce=0, timestamp=1578879030, signal_bits=0, version=0, weight=10.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='', decoded={})], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='2e3122412eb129c7f0d03e37d8a5637da9354df980a2259332b2b14e7a340d94', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=10.0, score=10.066089190457772, accumulated_weight_raw="1024", score_raw="1072", first_block=None, height=10, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id) # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=42, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='2e3122412eb129c7f0d03e37d8a5637da9354df980a2259332b2b14e7a340d94', nonce=0, timestamp=1578879030, signal_bits=0, version=0, weight=10.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='', decoded={})], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='2e3122412eb129c7f0d03e37d8a5637da9354df980a2259332b2b14e7a340d94', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=10.0, score=10.066089190457772, accumulated_weight_raw="1024", score_raw="1072", first_block=None, height=10, validation='full'), aux_pow=None), group_id=None), latest_event_id=42, stream_id=stream_id) # noqa: E501 ] self.assert_response_equal(responses, expected) @@ -381,55 +381,55 @@ def test_empty_script(self) -> None: # LOAD_STATED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=0, timestamp=0, type=EventType.LOAD_STARTED, data=EmptyData(), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for each genesis (1 block and 2 txs) - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', nonce=0, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU/QUFm2AGJJVDuC82h2oXxz/SJnuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HVayMofEDh4XGsaQJeRJKhutYxYodYNop6', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', nonce=0, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU/QUFm2AGJJVDuC82h2oXxz/SJnuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HVayMofEDh4XGsaQJeRJKhutYxYodYNop6', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # LOAD_FINISHED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=4, timestamp=0, type=EventType.LOAD_FINISHED, data=EmptyData(), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new block (below), and one VERTEX_METADATA_CHANGED for each genesis tx (2), adding the new block as their first block # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=5, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=6, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', 'fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', 'eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', 'f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=7, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', 'fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', 'eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', 'f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=8, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[''], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=5, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=6, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=7, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=8, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new block - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=9, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=9, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED and one NEW_VERTEX_ACCEPTED for 10 new blocks - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=10, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8'], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=11, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8'], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=12, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393'], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=13, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393'], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=14, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49'], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=15, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49'], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=16, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3'], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=17, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3'], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=18, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e'], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=19, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e'], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=20, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d'], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=21, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d'], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=22, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6'], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=23, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6'], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=24, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7'], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=25, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7'], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=26, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb'], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=27, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb'], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=28, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=29, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=10, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=11, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=12, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=13, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=14, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=15, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['32fea29451e575e9e001f55878f4df61a2f6cf0212c4b9cbfb8125691d5377a8', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=16, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=17, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['896593a8103553e6f54c46901f8c14e62618efe7f18c5afd48cf26e96db9e393', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=18, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=19, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['0b71c21b8000f05241283a848b99e38f27a94a188def7ef1b93f8b0828caba49', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=20, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=21, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['97b711632054189cbeb1ef4707b7d48c84e6af9a0395a4484030fb3202e691e3', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=22, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=23, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['6b5e6201d81381a49fa7febe15f46d440360d8e7b1a0ddbe42e59889f32af56e', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=24, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=25, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['fdc65dbd3675a01a39343dd0c4a05eea471c3bd7015bb96cea0bde7143e24c5d', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=26, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=27, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['eb3c4684dfad95a5b9d1c88f3463b91fe44bbe7b00e4b810648ca9e9ff5685a6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=28, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=29, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['1eb8f2c848828831c0e50f13b6ea54cac99494031ebad0318c7b142acb5540b7', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new tx (below), and one VERTEX_METADATA_CHANGED for a block, adding the new tx as spending their output # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=30, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.449427506558003, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='', decoded={})], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=18.44942676691887, score=0.0, accumulated_weight_raw="357957", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=31, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[SpentOutput(index=0, tx_ids=['ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d'])], conflict_with=[], voided_by=[], received_by=[], children=['8ab45f3b35f8dc437fb4a246d9b7dd3d3d5cfb7270e516076718a7a94598cf2f'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=30, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.449427506558003, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='', decoded={})], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.44942676691887, score=0.0, accumulated_weight_raw="357957", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=31, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', spent_outputs=[SpentOutput(index=0, tx_ids=['ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new tx - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=32, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.449427506558003, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='', decoded={})], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=18.44942676691887, score=0.0, accumulated_weight_raw="357957", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=32, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.449427506558003, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='', decoded={})], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.44942676691887, score=0.0, accumulated_weight_raw="357957", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new tx (below), and one VERTEX_METADATA_CHANGED for a tx, adding the new tx as spending their output and children # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=33, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=15.990494828748208, inputs=[TxInput(tx_id='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', index=1, spent_output=TxOutput(value=1000, token_data=0, script='', decoded={}))], outputs=[TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=15.990502884098087, score=0.0, accumulated_weight_raw="65106", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=34, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.449427506558003, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='', decoded={})], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', spent_outputs=[SpentOutput(index=1, tx_ids=['3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11'])], conflict_with=[], voided_by=[], received_by=[], children=['3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11'], twins=[], accumulated_weight=18.44942676691887, score=0.0, accumulated_weight_raw="357957", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=33, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=15.990494828748208, inputs=[TxInput(tx_id='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', index=1, spent_output=TxOutput(value=1000, token_data=0, script='', decoded={}))], outputs=[TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=15.990502884098087, score=0.0, accumulated_weight_raw="65106", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=34, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.449427506558003, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='', decoded={})], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', spent_outputs=[SpentOutput(index=1, tx_ids=['3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.44942676691887, score=0.0, accumulated_weight_raw="357957", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new tx - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=35, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=15.990494828748208, inputs=[TxInput(tx_id='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', index=1, spent_output=TxOutput(value=1000, token_data=0, script='', decoded={}))], outputs=[TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=15.990502884098087, score=0.0, accumulated_weight_raw="65106", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=35, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=15.990494828748208, inputs=[TxInput(tx_id='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', index=1, spent_output=TxOutput(value=1000, token_data=0, script='', decoded={}))], outputs=[TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=15.990502884098087, score=0.0, accumulated_weight_raw="65106", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new block (below), and one VERTEX_METADATA_CHANGED for each confirmed transaction (first block changed) # noqa E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=36, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='da38db48836d99beec10aece24c41f6d9f6a55ab5566d7ef5851af2952fb607d', nonce=0, timestamp=1578879090, signal_bits=0, version=0, weight=8.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmkey79Rbhjq4BtHYCm2mT8hDprWIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLatLcoaATFMqECb5fD5rdW2nF9WGyw9os', timelock=None))], parents=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', '3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11', 'ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='da38db48836d99beec10aece24c41f6d9f6a55ab5566d7ef5851af2952fb607d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=8.0, score=18.691576556156242, accumulated_weight_raw="256", score_raw="423375", first_block=None, height=12, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=37, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=15.990494828748208, inputs=[TxInput(tx_id='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', index=1, spent_output=TxOutput(value=1000, token_data=0, script='', decoded={}))], outputs=[TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['da38db48836d99beec10aece24c41f6d9f6a55ab5566d7ef5851af2952fb607d'], twins=[], accumulated_weight=15.990502884098087, score=0.0, accumulated_weight_raw="65106", score_raw="0", first_block='da38db48836d99beec10aece24c41f6d9f6a55ab5566d7ef5851af2952fb607d', height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=38, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.449427506558003, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='', decoded={})], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', spent_outputs=[SpentOutput(index=1, tx_ids=['3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11'])], conflict_with=[], voided_by=[], received_by=[], children=['3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11', 'da38db48836d99beec10aece24c41f6d9f6a55ab5566d7ef5851af2952fb607d'], twins=[], accumulated_weight=18.44942676691887, score=0.0, accumulated_weight_raw="357957", score_raw="0", first_block='da38db48836d99beec10aece24c41f6d9f6a55ab5566d7ef5851af2952fb607d', height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=36, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='da38db48836d99beec10aece24c41f6d9f6a55ab5566d7ef5851af2952fb607d', nonce=0, timestamp=1578879090, signal_bits=0, version=0, weight=8.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmkey79Rbhjq4BtHYCm2mT8hDprWIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLatLcoaATFMqECb5fD5rdW2nF9WGyw9os', timelock=None))], parents=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', '3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11', 'ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='da38db48836d99beec10aece24c41f6d9f6a55ab5566d7ef5851af2952fb607d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=8.0, score=18.691576556156242, accumulated_weight_raw="256", score_raw="423375", first_block=None, height=12, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=37, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=15.990494828748208, inputs=[TxInput(tx_id='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', index=1, spent_output=TxOutput(value=1000, token_data=0, script='', decoded={}))], outputs=[TxOutput(value=1000, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None))], parents=['ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=15.990502884098087, score=0.0, accumulated_weight_raw="65106", score_raw="0", first_block='da38db48836d99beec10aece24c41f6d9f6a55ab5566d7ef5851af2952fb607d', height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=38, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.449427506558003, inputs=[TxInput(tx_id='9b83e5dbc7145a5a161c34da4bec4e1a64dc02a3f2495a2db78457426c9ee6bf', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUPXOcGnrN0ZB2WrnPVcjdCCcacL+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC846khX278aM1utqAgPzkKAxBTfftaRDm', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUutgaVG8W5OnzgAEVUqB4XgmDgm2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPZ4x7a2NXdrMa5ksPfeGMZmjhJHTjDZ9Q', timelock=None)), TxOutput(value=1000, token_data=0, script='', decoded={})], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d', spent_outputs=[SpentOutput(index=1, tx_ids=['3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.44942676691887, score=0.0, accumulated_weight_raw="357957", score_raw="0", first_block='da38db48836d99beec10aece24c41f6d9f6a55ab5566d7ef5851af2952fb607d', height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new block - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=39, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='da38db48836d99beec10aece24c41f6d9f6a55ab5566d7ef5851af2952fb607d', nonce=0, timestamp=1578879090, signal_bits=0, version=0, weight=8.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmkey79Rbhjq4BtHYCm2mT8hDprWIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLatLcoaATFMqECb5fD5rdW2nF9WGyw9os', timelock=None))], parents=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', '3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11', 'ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='da38db48836d99beec10aece24c41f6d9f6a55ab5566d7ef5851af2952fb607d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=8.0, score=18.691576556156242, accumulated_weight_raw="256", score_raw="423375", first_block=None, height=12, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id)] # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=39, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='da38db48836d99beec10aece24c41f6d9f6a55ab5566d7ef5851af2952fb607d', nonce=0, timestamp=1578879090, signal_bits=0, version=0, weight=8.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmkey79Rbhjq4BtHYCm2mT8hDprWIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLatLcoaATFMqECb5fD5rdW2nF9WGyw9os', timelock=None))], parents=['f349fc0f570a636a440ed3853cc533faa2c4616160e1d9eb6f5d656a90da30fb', '3cd0d6caa93fcb179cfcd68c2faca1be2cca20cafa339bac10c57e64b9404f11', 'ea8f1b24846331047e73a33c23210ac2af1d812f14f0225a26337e52aab2435d'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='da38db48836d99beec10aece24c41f6d9f6a55ab5566d7ef5851af2952fb607d', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=8.0, score=18.691576556156242, accumulated_weight_raw="256", score_raw="423375", first_block=None, height=12, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id)] # noqa: E501 self.assert_response_equal(responses, expected) @@ -445,55 +445,55 @@ def test_custom_script(self) -> None: # LOAD_STATED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=0, timestamp=0, type=EventType.LOAD_STARTED, data=EmptyData(), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for each genesis (1 block and 2 txs) - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', nonce=0, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU/QUFm2AGJJVDuC82h2oXxz/SJnuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HVayMofEDh4XGsaQJeRJKhutYxYodYNop6', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', nonce=0, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU/QUFm2AGJJVDuC82h2oXxz/SJnuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HVayMofEDh4XGsaQJeRJKhutYxYodYNop6', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # LOAD_FINISHED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=4, timestamp=0, type=EventType.LOAD_FINISHED, data=EmptyData(), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new block (below), and one VERTEX_METADATA_CHANGED for each genesis tx (2), adding the new block as their first block # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=5, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['8b3f0d414755bf6a071deb83b51c5276e41b076b14307123399b804a022f7b19'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=6, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', '8b3f0d414755bf6a071deb83b51c5276e41b076b14307123399b804a022f7b19', '1aa2c724f1932b04a8358ab41a9bca864c3528b69afcc8df83e104cad3247a62', '3ec4aadfbcd5aa4cbf14f6198b56d30158e865f8e907e494d7a7813ac6b6b5e6', 'ce9cca7b876ea1cfa3b47e3a8d63c054cf974a3aa421c1bc1dba13e9b44a2f2f', '61179abc731d966f722d0d8b06a9d405672065887279bf9a5d13f90e18d3faea', '95f79d8bb3363ea030d209428c11f0a77bb675f42c59892f66eeb0c90f437084', 'c4707e982d6d980b3ec5501b0e2c43eed55439d4b6fb34565694fe58e00cac1a', 'db4d5e585d0c70f69bab6e61405078b6435dac84e7b731a85f97a282b1f3d9c1', '09a4e391189dce39b747ce9e2231e7079cf737a173d9004a68826c52051f2bdc', '8fa74324107529b23223b1639a9c8a37cb8bdbb25aa8c5476a49c1095d152218'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=7, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', '8b3f0d414755bf6a071deb83b51c5276e41b076b14307123399b804a022f7b19', '1aa2c724f1932b04a8358ab41a9bca864c3528b69afcc8df83e104cad3247a62', '3ec4aadfbcd5aa4cbf14f6198b56d30158e865f8e907e494d7a7813ac6b6b5e6', 'ce9cca7b876ea1cfa3b47e3a8d63c054cf974a3aa421c1bc1dba13e9b44a2f2f', '61179abc731d966f722d0d8b06a9d405672065887279bf9a5d13f90e18d3faea', '95f79d8bb3363ea030d209428c11f0a77bb675f42c59892f66eeb0c90f437084', 'c4707e982d6d980b3ec5501b0e2c43eed55439d4b6fb34565694fe58e00cac1a', 'db4d5e585d0c70f69bab6e61405078b6435dac84e7b731a85f97a282b1f3d9c1', '09a4e391189dce39b747ce9e2231e7079cf737a173d9004a68826c52051f2bdc', '8fa74324107529b23223b1639a9c8a37cb8bdbb25aa8c5476a49c1095d152218'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=8, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[''], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=5, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=6, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=7, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=8, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, metadata=TxMetadata(hash='', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw="4", score_raw="4", first_block='', height=0, validation='full'), aux_pow=None), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new block - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=9, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['8b3f0d414755bf6a071deb83b51c5276e41b076b14307123399b804a022f7b19'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=9, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED and one NEW_VERTEX_ACCEPTED for 10 new blocks - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=10, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='8b3f0d414755bf6a071deb83b51c5276e41b076b14307123399b804a022f7b19', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='8b3f0d414755bf6a071deb83b51c5276e41b076b14307123399b804a022f7b19', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['1aa2c724f1932b04a8358ab41a9bca864c3528b69afcc8df83e104cad3247a62'], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=11, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='8b3f0d414755bf6a071deb83b51c5276e41b076b14307123399b804a022f7b19', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='8b3f0d414755bf6a071deb83b51c5276e41b076b14307123399b804a022f7b19', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['1aa2c724f1932b04a8358ab41a9bca864c3528b69afcc8df83e104cad3247a62'], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=12, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='1aa2c724f1932b04a8358ab41a9bca864c3528b69afcc8df83e104cad3247a62', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['8b3f0d414755bf6a071deb83b51c5276e41b076b14307123399b804a022f7b19', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='1aa2c724f1932b04a8358ab41a9bca864c3528b69afcc8df83e104cad3247a62', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['3ec4aadfbcd5aa4cbf14f6198b56d30158e865f8e907e494d7a7813ac6b6b5e6'], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=13, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='1aa2c724f1932b04a8358ab41a9bca864c3528b69afcc8df83e104cad3247a62', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['8b3f0d414755bf6a071deb83b51c5276e41b076b14307123399b804a022f7b19', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='1aa2c724f1932b04a8358ab41a9bca864c3528b69afcc8df83e104cad3247a62', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['3ec4aadfbcd5aa4cbf14f6198b56d30158e865f8e907e494d7a7813ac6b6b5e6'], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=14, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='3ec4aadfbcd5aa4cbf14f6198b56d30158e865f8e907e494d7a7813ac6b6b5e6', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['1aa2c724f1932b04a8358ab41a9bca864c3528b69afcc8df83e104cad3247a62', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='3ec4aadfbcd5aa4cbf14f6198b56d30158e865f8e907e494d7a7813ac6b6b5e6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['ce9cca7b876ea1cfa3b47e3a8d63c054cf974a3aa421c1bc1dba13e9b44a2f2f'], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=15, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='3ec4aadfbcd5aa4cbf14f6198b56d30158e865f8e907e494d7a7813ac6b6b5e6', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['1aa2c724f1932b04a8358ab41a9bca864c3528b69afcc8df83e104cad3247a62', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='3ec4aadfbcd5aa4cbf14f6198b56d30158e865f8e907e494d7a7813ac6b6b5e6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['ce9cca7b876ea1cfa3b47e3a8d63c054cf974a3aa421c1bc1dba13e9b44a2f2f'], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=16, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='ce9cca7b876ea1cfa3b47e3a8d63c054cf974a3aa421c1bc1dba13e9b44a2f2f', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['3ec4aadfbcd5aa4cbf14f6198b56d30158e865f8e907e494d7a7813ac6b6b5e6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='ce9cca7b876ea1cfa3b47e3a8d63c054cf974a3aa421c1bc1dba13e9b44a2f2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['61179abc731d966f722d0d8b06a9d405672065887279bf9a5d13f90e18d3faea'], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=17, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='ce9cca7b876ea1cfa3b47e3a8d63c054cf974a3aa421c1bc1dba13e9b44a2f2f', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['3ec4aadfbcd5aa4cbf14f6198b56d30158e865f8e907e494d7a7813ac6b6b5e6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='ce9cca7b876ea1cfa3b47e3a8d63c054cf974a3aa421c1bc1dba13e9b44a2f2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['61179abc731d966f722d0d8b06a9d405672065887279bf9a5d13f90e18d3faea'], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=18, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='61179abc731d966f722d0d8b06a9d405672065887279bf9a5d13f90e18d3faea', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['ce9cca7b876ea1cfa3b47e3a8d63c054cf974a3aa421c1bc1dba13e9b44a2f2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='61179abc731d966f722d0d8b06a9d405672065887279bf9a5d13f90e18d3faea', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['95f79d8bb3363ea030d209428c11f0a77bb675f42c59892f66eeb0c90f437084'], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=19, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='61179abc731d966f722d0d8b06a9d405672065887279bf9a5d13f90e18d3faea', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['ce9cca7b876ea1cfa3b47e3a8d63c054cf974a3aa421c1bc1dba13e9b44a2f2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='61179abc731d966f722d0d8b06a9d405672065887279bf9a5d13f90e18d3faea', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['95f79d8bb3363ea030d209428c11f0a77bb675f42c59892f66eeb0c90f437084'], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=20, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='95f79d8bb3363ea030d209428c11f0a77bb675f42c59892f66eeb0c90f437084', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['61179abc731d966f722d0d8b06a9d405672065887279bf9a5d13f90e18d3faea', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='95f79d8bb3363ea030d209428c11f0a77bb675f42c59892f66eeb0c90f437084', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['c4707e982d6d980b3ec5501b0e2c43eed55439d4b6fb34565694fe58e00cac1a'], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=21, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='95f79d8bb3363ea030d209428c11f0a77bb675f42c59892f66eeb0c90f437084', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['61179abc731d966f722d0d8b06a9d405672065887279bf9a5d13f90e18d3faea', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='95f79d8bb3363ea030d209428c11f0a77bb675f42c59892f66eeb0c90f437084', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['c4707e982d6d980b3ec5501b0e2c43eed55439d4b6fb34565694fe58e00cac1a'], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=22, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='c4707e982d6d980b3ec5501b0e2c43eed55439d4b6fb34565694fe58e00cac1a', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['95f79d8bb3363ea030d209428c11f0a77bb675f42c59892f66eeb0c90f437084', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='c4707e982d6d980b3ec5501b0e2c43eed55439d4b6fb34565694fe58e00cac1a', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['db4d5e585d0c70f69bab6e61405078b6435dac84e7b731a85f97a282b1f3d9c1'], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=23, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='c4707e982d6d980b3ec5501b0e2c43eed55439d4b6fb34565694fe58e00cac1a', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['95f79d8bb3363ea030d209428c11f0a77bb675f42c59892f66eeb0c90f437084', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='c4707e982d6d980b3ec5501b0e2c43eed55439d4b6fb34565694fe58e00cac1a', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['db4d5e585d0c70f69bab6e61405078b6435dac84e7b731a85f97a282b1f3d9c1'], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=24, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='db4d5e585d0c70f69bab6e61405078b6435dac84e7b731a85f97a282b1f3d9c1', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['c4707e982d6d980b3ec5501b0e2c43eed55439d4b6fb34565694fe58e00cac1a', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='db4d5e585d0c70f69bab6e61405078b6435dac84e7b731a85f97a282b1f3d9c1', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['09a4e391189dce39b747ce9e2231e7079cf737a173d9004a68826c52051f2bdc'], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=25, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='db4d5e585d0c70f69bab6e61405078b6435dac84e7b731a85f97a282b1f3d9c1', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['c4707e982d6d980b3ec5501b0e2c43eed55439d4b6fb34565694fe58e00cac1a', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='db4d5e585d0c70f69bab6e61405078b6435dac84e7b731a85f97a282b1f3d9c1', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['09a4e391189dce39b747ce9e2231e7079cf737a173d9004a68826c52051f2bdc'], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=26, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='09a4e391189dce39b747ce9e2231e7079cf737a173d9004a68826c52051f2bdc', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['db4d5e585d0c70f69bab6e61405078b6435dac84e7b731a85f97a282b1f3d9c1', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='09a4e391189dce39b747ce9e2231e7079cf737a173d9004a68826c52051f2bdc', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['8fa74324107529b23223b1639a9c8a37cb8bdbb25aa8c5476a49c1095d152218'], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=27, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='09a4e391189dce39b747ce9e2231e7079cf737a173d9004a68826c52051f2bdc', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['db4d5e585d0c70f69bab6e61405078b6435dac84e7b731a85f97a282b1f3d9c1', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='09a4e391189dce39b747ce9e2231e7079cf737a173d9004a68826c52051f2bdc', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['8fa74324107529b23223b1639a9c8a37cb8bdbb25aa8c5476a49c1095d152218'], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=28, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='8fa74324107529b23223b1639a9c8a37cb8bdbb25aa8c5476a49c1095d152218', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUBvl1aaAtzoh8a9vaZoqXA6JxK4OIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H7A1HBirZ4EhWtCWLcAy4yw6ybWcKnjdfG', timelock=None))], parents=['09a4e391189dce39b747ce9e2231e7079cf737a173d9004a68826c52051f2bdc', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='8fa74324107529b23223b1639a9c8a37cb8bdbb25aa8c5476a49c1095d152218', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=29, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='8fa74324107529b23223b1639a9c8a37cb8bdbb25aa8c5476a49c1095d152218', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUBvl1aaAtzoh8a9vaZoqXA6JxK4OIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H7A1HBirZ4EhWtCWLcAy4yw6ybWcKnjdfG', timelock=None))], parents=['09a4e391189dce39b747ce9e2231e7079cf737a173d9004a68826c52051f2bdc', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='8fa74324107529b23223b1639a9c8a37cb8bdbb25aa8c5476a49c1095d152218', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=10, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='8b3f0d414755bf6a071deb83b51c5276e41b076b14307123399b804a022f7b19', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='8b3f0d414755bf6a071deb83b51c5276e41b076b14307123399b804a022f7b19', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=11, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='8b3f0d414755bf6a071deb83b51c5276e41b076b14307123399b804a022f7b19', nonce=0, timestamp=1578878911, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUu9S/kjy3HbglEu3bA4JargdORiiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPeHcEFtRZvMBijqFwccicDMkN17hoNq21', timelock=None))], parents=['2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='8b3f0d414755bf6a071deb83b51c5276e41b076b14307123399b804a022f7b19', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.321928094887363, accumulated_weight_raw="4", score_raw="20", first_block=None, height=2, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=12, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='1aa2c724f1932b04a8358ab41a9bca864c3528b69afcc8df83e104cad3247a62', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['8b3f0d414755bf6a071deb83b51c5276e41b076b14307123399b804a022f7b19', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='1aa2c724f1932b04a8358ab41a9bca864c3528b69afcc8df83e104cad3247a62', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=13, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='1aa2c724f1932b04a8358ab41a9bca864c3528b69afcc8df83e104cad3247a62', nonce=0, timestamp=1578878912, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUzskI6jayLvTobJDhpVZiuMu7zt+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRNWR1HpdAiDx7va9VkNUuqqSo2MGW5iE6', timelock=None))], parents=['8b3f0d414755bf6a071deb83b51c5276e41b076b14307123399b804a022f7b19', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='1aa2c724f1932b04a8358ab41a9bca864c3528b69afcc8df83e104cad3247a62', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.584962500721156, accumulated_weight_raw="4", score_raw="24", first_block=None, height=3, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=14, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='3ec4aadfbcd5aa4cbf14f6198b56d30158e865f8e907e494d7a7813ac6b6b5e6', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['1aa2c724f1932b04a8358ab41a9bca864c3528b69afcc8df83e104cad3247a62', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='3ec4aadfbcd5aa4cbf14f6198b56d30158e865f8e907e494d7a7813ac6b6b5e6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=15, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='3ec4aadfbcd5aa4cbf14f6198b56d30158e865f8e907e494d7a7813ac6b6b5e6', nonce=0, timestamp=1578878913, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU7B7Cf/pnj2DglfhnqyiRzxNg+K2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HU3chqobPRBt8pjYXt4WahKERjV8UMCWbd', timelock=None))], parents=['1aa2c724f1932b04a8358ab41a9bca864c3528b69afcc8df83e104cad3247a62', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='3ec4aadfbcd5aa4cbf14f6198b56d30158e865f8e907e494d7a7813ac6b6b5e6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.807354922057604, accumulated_weight_raw="4", score_raw="28", first_block=None, height=4, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=16, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='ce9cca7b876ea1cfa3b47e3a8d63c054cf974a3aa421c1bc1dba13e9b44a2f2f', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['3ec4aadfbcd5aa4cbf14f6198b56d30158e865f8e907e494d7a7813ac6b6b5e6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='ce9cca7b876ea1cfa3b47e3a8d63c054cf974a3aa421c1bc1dba13e9b44a2f2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=17, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='ce9cca7b876ea1cfa3b47e3a8d63c054cf974a3aa421c1bc1dba13e9b44a2f2f', nonce=0, timestamp=1578878914, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUZmTJ0of2Ce9iuycIVpFCVU08WmKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFrY3outhFVXGLEvaVKVFkd2nB1ihumXCr', timelock=None))], parents=['3ec4aadfbcd5aa4cbf14f6198b56d30158e865f8e907e494d7a7813ac6b6b5e6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='ce9cca7b876ea1cfa3b47e3a8d63c054cf974a3aa421c1bc1dba13e9b44a2f2f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.0, accumulated_weight_raw="4", score_raw="32", first_block=None, height=5, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=18, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='61179abc731d966f722d0d8b06a9d405672065887279bf9a5d13f90e18d3faea', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['ce9cca7b876ea1cfa3b47e3a8d63c054cf974a3aa421c1bc1dba13e9b44a2f2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='61179abc731d966f722d0d8b06a9d405672065887279bf9a5d13f90e18d3faea', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=19, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='61179abc731d966f722d0d8b06a9d405672065887279bf9a5d13f90e18d3faea', nonce=0, timestamp=1578878915, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPNN8M/qangqd2wYSzu0u+3OmwDmIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HC4kH6pnYBofzTSFWRpA71Po7geNURh5p2', timelock=None))], parents=['ce9cca7b876ea1cfa3b47e3a8d63c054cf974a3aa421c1bc1dba13e9b44a2f2f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='61179abc731d966f722d0d8b06a9d405672065887279bf9a5d13f90e18d3faea', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.169925001442312, accumulated_weight_raw="4", score_raw="36", first_block=None, height=6, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=20, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='95f79d8bb3363ea030d209428c11f0a77bb675f42c59892f66eeb0c90f437084', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['61179abc731d966f722d0d8b06a9d405672065887279bf9a5d13f90e18d3faea', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='95f79d8bb3363ea030d209428c11f0a77bb675f42c59892f66eeb0c90f437084', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=21, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='95f79d8bb3363ea030d209428c11f0a77bb675f42c59892f66eeb0c90f437084', nonce=0, timestamp=1578878916, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUxbNqvpWbgNtk9km/VuYhzHHMp76IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HQYUSF8ytNmm92GYMCS8XPYkt3JeKkBDyj', timelock=None))], parents=['61179abc731d966f722d0d8b06a9d405672065887279bf9a5d13f90e18d3faea', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='95f79d8bb3363ea030d209428c11f0a77bb675f42c59892f66eeb0c90f437084', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.321928094887363, accumulated_weight_raw="4", score_raw="40", first_block=None, height=7, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=22, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='c4707e982d6d980b3ec5501b0e2c43eed55439d4b6fb34565694fe58e00cac1a', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['95f79d8bb3363ea030d209428c11f0a77bb675f42c59892f66eeb0c90f437084', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='c4707e982d6d980b3ec5501b0e2c43eed55439d4b6fb34565694fe58e00cac1a', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=23, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='c4707e982d6d980b3ec5501b0e2c43eed55439d4b6fb34565694fe58e00cac1a', nonce=0, timestamp=1578878917, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkU48C0XcFpiaWq2gwTICyEVdvJXcCIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HTHNdEhmQeECj5brwUzHK4Sq3fFrFiEvaK', timelock=None))], parents=['95f79d8bb3363ea030d209428c11f0a77bb675f42c59892f66eeb0c90f437084', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='c4707e982d6d980b3ec5501b0e2c43eed55439d4b6fb34565694fe58e00cac1a', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.459431618637297, accumulated_weight_raw="4", score_raw="44", first_block=None, height=8, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=24, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='db4d5e585d0c70f69bab6e61405078b6435dac84e7b731a85f97a282b1f3d9c1', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['c4707e982d6d980b3ec5501b0e2c43eed55439d4b6fb34565694fe58e00cac1a', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='db4d5e585d0c70f69bab6e61405078b6435dac84e7b731a85f97a282b1f3d9c1', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=25, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='db4d5e585d0c70f69bab6e61405078b6435dac84e7b731a85f97a282b1f3d9c1', nonce=0, timestamp=1578878918, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUmQRjqRyxq26raJZnhnpRJsrS9n2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HLUD2fi9udkg3ysPKdGvbWDyHFWdXBY1i1', timelock=None))], parents=['c4707e982d6d980b3ec5501b0e2c43eed55439d4b6fb34565694fe58e00cac1a', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='db4d5e585d0c70f69bab6e61405078b6435dac84e7b731a85f97a282b1f3d9c1', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.584962500721156, accumulated_weight_raw="4", score_raw="48", first_block=None, height=9, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=26, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='09a4e391189dce39b747ce9e2231e7079cf737a173d9004a68826c52051f2bdc', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['db4d5e585d0c70f69bab6e61405078b6435dac84e7b731a85f97a282b1f3d9c1', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='09a4e391189dce39b747ce9e2231e7079cf737a173d9004a68826c52051f2bdc', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=27, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='09a4e391189dce39b747ce9e2231e7079cf737a173d9004a68826c52051f2bdc', nonce=0, timestamp=1578878919, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUYFHjcujZZHs0JWZkriEbn5jTv/aIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HFJRMUG7GTjdqG5f6e5tqnrnquBMFCvvs2', timelock=None))], parents=['db4d5e585d0c70f69bab6e61405078b6435dac84e7b731a85f97a282b1f3d9c1', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='09a4e391189dce39b747ce9e2231e7079cf737a173d9004a68826c52051f2bdc', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.700439718141092, accumulated_weight_raw="4", score_raw="52", first_block=None, height=10, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=28, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='8fa74324107529b23223b1639a9c8a37cb8bdbb25aa8c5476a49c1095d152218', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUBvl1aaAtzoh8a9vaZoqXA6JxK4OIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H7A1HBirZ4EhWtCWLcAy4yw6ybWcKnjdfG', timelock=None))], parents=['09a4e391189dce39b747ce9e2231e7079cf737a173d9004a68826c52051f2bdc', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='8fa74324107529b23223b1639a9c8a37cb8bdbb25aa8c5476a49c1095d152218', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=29, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='8fa74324107529b23223b1639a9c8a37cb8bdbb25aa8c5476a49c1095d152218', nonce=0, timestamp=1578878920, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUBvl1aaAtzoh8a9vaZoqXA6JxK4OIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H7A1HBirZ4EhWtCWLcAy4yw6ybWcKnjdfG', timelock=None))], parents=['09a4e391189dce39b747ce9e2231e7079cf737a173d9004a68826c52051f2bdc', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='8fa74324107529b23223b1639a9c8a37cb8bdbb25aa8c5476a49c1095d152218', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=5.807354922057604, accumulated_weight_raw="4", score_raw="56", first_block=None, height=11, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new tx (below), and one VERTEX_METADATA_CHANGED for a block, adding the new tx as spending their output # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=30, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.55128132611371, inputs=[TxInput(tx_id='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUFgE9a6rVMusN303z18sYfjdpYGqIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H8XUjiUx24WLXUN63da34hX6bEs29GJjSs', timelock=None)), TxOutput(value=1000, token_data=0, script='CXNvbWVfZGF0YYhR', decoded={})], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=18.55128018336992, score=0.0, accumulated_weight_raw="384142", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=31, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', spent_outputs=[SpentOutput(index=0, tx_ids=['cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec'])], conflict_with=[], voided_by=[], received_by=[], children=['8b3f0d414755bf6a071deb83b51c5276e41b076b14307123399b804a022f7b19'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=30, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.55128132611371, inputs=[TxInput(tx_id='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUFgE9a6rVMusN303z18sYfjdpYGqIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H8XUjiUx24WLXUN63da34hX6bEs29GJjSs', timelock=None)), TxOutput(value=1000, token_data=0, script='CXNvbWVfZGF0YYhR', decoded={})], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.55128018336992, score=0.0, accumulated_weight_raw="384142", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=31, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', nonce=0, timestamp=1578878910, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['339f47da87435842b0b1b528ecd9eac2495ce983b3e9c923a37e1befbe12c792', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', spent_outputs=[SpentOutput(index=0, tx_ids=['cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw="4", score_raw="16", first_block=None, height=1, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new tx - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=32, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.55128132611371, inputs=[TxInput(tx_id='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUFgE9a6rVMusN303z18sYfjdpYGqIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H8XUjiUx24WLXUN63da34hX6bEs29GJjSs', timelock=None)), TxOutput(value=1000, token_data=0, script='CXNvbWVfZGF0YYhR', decoded={})], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=18.55128018336992, score=0.0, accumulated_weight_raw="384142", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=32, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.55128132611371, inputs=[TxInput(tx_id='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUFgE9a6rVMusN303z18sYfjdpYGqIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H8XUjiUx24WLXUN63da34hX6bEs29GJjSs', timelock=None)), TxOutput(value=1000, token_data=0, script='CXNvbWVfZGF0YYhR', decoded={})], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.55128018336992, score=0.0, accumulated_weight_raw="384142", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new tx (below), and one VERTEX_METADATA_CHANGED for a tx, adding the new tx as spending their output and children # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=33, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=16.12160141040609, inputs=[TxInput(tx_id='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', index=1, spent_output=TxOutput(value=1000, token_data=0, script='CXNvbWVfZGF0YYhR', decoded={}))], outputs=[TxOutput(value=1000, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=16.12159422192467, score=0.0, accumulated_weight_raw="71299", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=34, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.55128132611371, inputs=[TxInput(tx_id='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUFgE9a6rVMusN303z18sYfjdpYGqIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H8XUjiUx24WLXUN63da34hX6bEs29GJjSs', timelock=None)), TxOutput(value=1000, token_data=0, script='CXNvbWVfZGF0YYhR', decoded={})], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', spent_outputs=[SpentOutput(index=1, tx_ids=['3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3'])], conflict_with=[], voided_by=[], received_by=[], children=['3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3'], twins=[], accumulated_weight=18.55128018336992, score=0.0, accumulated_weight_raw="384142", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=33, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=16.12160141040609, inputs=[TxInput(tx_id='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', index=1, spent_output=TxOutput(value=1000, token_data=0, script='CXNvbWVfZGF0YYhR', decoded={}))], outputs=[TxOutput(value=1000, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=16.12159422192467, score=0.0, accumulated_weight_raw="71299", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=34, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.55128132611371, inputs=[TxInput(tx_id='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUFgE9a6rVMusN303z18sYfjdpYGqIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H8XUjiUx24WLXUN63da34hX6bEs29GJjSs', timelock=None)), TxOutput(value=1000, token_data=0, script='CXNvbWVfZGF0YYhR', decoded={})], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', spent_outputs=[SpentOutput(index=1, tx_ids=['3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.55128018336992, score=0.0, accumulated_weight_raw="384142", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new tx - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=35, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=16.12160141040609, inputs=[TxInput(tx_id='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', index=1, spent_output=TxOutput(value=1000, token_data=0, script='CXNvbWVfZGF0YYhR', decoded={}))], outputs=[TxOutput(value=1000, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=16.12159422192467, score=0.0, accumulated_weight_raw="71299", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=35, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=16.12160141040609, inputs=[TxInput(tx_id='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', index=1, spent_output=TxOutput(value=1000, token_data=0, script='CXNvbWVfZGF0YYhR', decoded={}))], outputs=[TxOutput(value=1000, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=16.12159422192467, score=0.0, accumulated_weight_raw="71299", score_raw="0", first_block=None, height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new block (below), and one VERTEX_METADATA_CHANGED for each confirmed transaction (first block changed) # noqa E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=36, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='99d29ec48a3a088dbd786b411daabbc7111974b97abc271a2e338cf46c081302', nonce=0, timestamp=1578879090, signal_bits=0, version=0, weight=8.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUTisHvpM4sDeINzxF5auK/8bP6UaIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDeSe6qKqjSLwtnjLBV84NddtZQyNb9HUU', timelock=None))], parents=['8fa74324107529b23223b1639a9c8a37cb8bdbb25aa8c5476a49c1095d152218', '3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3', 'cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='99d29ec48a3a088dbd786b411daabbc7111974b97abc271a2e338cf46c081302', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=8.0, score=18.79789262729119, accumulated_weight_raw="256", score_raw="455753", first_block=None, height=12, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=37, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=16.12160141040609, inputs=[TxInput(tx_id='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', index=1, spent_output=TxOutput(value=1000, token_data=0, script='CXNvbWVfZGF0YYhR', decoded={}))], outputs=[TxOutput(value=1000, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['99d29ec48a3a088dbd786b411daabbc7111974b97abc271a2e338cf46c081302'], twins=[], accumulated_weight=16.12159422192467, score=0.0, accumulated_weight_raw="71299", score_raw="0", first_block='99d29ec48a3a088dbd786b411daabbc7111974b97abc271a2e338cf46c081302', height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=38, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.55128132611371, inputs=[TxInput(tx_id='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUFgE9a6rVMusN303z18sYfjdpYGqIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H8XUjiUx24WLXUN63da34hX6bEs29GJjSs', timelock=None)), TxOutput(value=1000, token_data=0, script='CXNvbWVfZGF0YYhR', decoded={})], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', spent_outputs=[SpentOutput(index=1, tx_ids=['3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3'])], conflict_with=[], voided_by=[], received_by=[], children=['3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3', '99d29ec48a3a088dbd786b411daabbc7111974b97abc271a2e338cf46c081302'], twins=[], accumulated_weight=18.55128018336992, score=0.0, accumulated_weight_raw="384142", score_raw="0", first_block='99d29ec48a3a088dbd786b411daabbc7111974b97abc271a2e338cf46c081302', height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=36, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='99d29ec48a3a088dbd786b411daabbc7111974b97abc271a2e338cf46c081302', nonce=0, timestamp=1578879090, signal_bits=0, version=0, weight=8.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUTisHvpM4sDeINzxF5auK/8bP6UaIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDeSe6qKqjSLwtnjLBV84NddtZQyNb9HUU', timelock=None))], parents=['8fa74324107529b23223b1639a9c8a37cb8bdbb25aa8c5476a49c1095d152218', '3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3', 'cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='99d29ec48a3a088dbd786b411daabbc7111974b97abc271a2e338cf46c081302', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=8.0, score=18.79789262729119, accumulated_weight_raw="256", score_raw="455753", first_block=None, height=12, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=37, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3', nonce=0, timestamp=1578879030, signal_bits=0, version=1, weight=16.12160141040609, inputs=[TxInput(tx_id='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', index=1, spent_output=TxOutput(value=1000, token_data=0, script='CXNvbWVfZGF0YYhR', decoded={}))], outputs=[TxOutput(value=1000, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None))], parents=['cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=16.12159422192467, score=0.0, accumulated_weight_raw="71299", score_raw="0", first_block='99d29ec48a3a088dbd786b411daabbc7111974b97abc271a2e338cf46c081302', height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=38, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', nonce=0, timestamp=1578878970, signal_bits=0, version=1, weight=18.55128132611371, inputs=[TxInput(tx_id='2ceb49662c7a9b468a93d2f1bb5849e9412b6e2e6b6bec8df8d6dc65d48ad4e9', index=0, spent_output=TxOutput(value=6400, token_data=0, script='dqkUXRFxfhIYOXURHjiAlx9XPuMh7E2IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HF1E8Aibb17Rha6r1cM1oCp74DRmYqP61V', timelock=None)))], outputs=[TxOutput(value=5400, token_data=0, script='dqkUFgE9a6rVMusN303z18sYfjdpYGqIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H8XUjiUx24WLXUN63da34hX6bEs29GJjSs', timelock=None)), TxOutput(value=1000, token_data=0, script='CXNvbWVfZGF0YYhR', decoded={})], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec', spent_outputs=[SpentOutput(index=1, tx_ids=['3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.55128018336992, score=0.0, accumulated_weight_raw="384142", score_raw="0", first_block='99d29ec48a3a088dbd786b411daabbc7111974b97abc271a2e338cf46c081302', height=0, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for a new block - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=39, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='99d29ec48a3a088dbd786b411daabbc7111974b97abc271a2e338cf46c081302', nonce=0, timestamp=1578879090, signal_bits=0, version=0, weight=8.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUTisHvpM4sDeINzxF5auK/8bP6UaIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDeSe6qKqjSLwtnjLBV84NddtZQyNb9HUU', timelock=None))], parents=['8fa74324107529b23223b1639a9c8a37cb8bdbb25aa8c5476a49c1095d152218', '3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3', 'cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='99d29ec48a3a088dbd786b411daabbc7111974b97abc271a2e338cf46c081302', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=8.0, score=18.79789262729119, accumulated_weight_raw="256", score_raw="455753", first_block=None, height=12, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id) # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=39, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='99d29ec48a3a088dbd786b411daabbc7111974b97abc271a2e338cf46c081302', nonce=0, timestamp=1578879090, signal_bits=0, version=0, weight=8.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUTisHvpM4sDeINzxF5auK/8bP6UaIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDeSe6qKqjSLwtnjLBV84NddtZQyNb9HUU', timelock=None))], parents=['8fa74324107529b23223b1639a9c8a37cb8bdbb25aa8c5476a49c1095d152218', '3fbdad9949edf66d099421003ec68bde17d5240305baecf2432a8e1bc2ff47a3', 'cd2ef92d046cbd5bbcedc60f1bfb412dca1b3e3352a9ac80e9d92679d38715ec'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='99d29ec48a3a088dbd786b411daabbc7111974b97abc271a2e338cf46c081302', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=8.0, score=18.79789262729119, accumulated_weight_raw="256", score_raw="455753", first_block=None, height=12, validation='full')), group_id=None), latest_event_id=39, stream_id=stream_id) # noqa: E501 ] self.assert_response_equal(responses, expected) @@ -519,52 +519,52 @@ def test_nc_events(self) -> None: # LOAD_STATED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=0, timestamp=0, type=EventType.LOAD_STARTED, data=EmptyData(), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 # One NEW_VERTEX_ACCEPTED for each genesis (1 block and 2 txs) - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=self.genesis_block_hash, nonce=5, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=self.genesis_block_hash, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=self.genesis_tx1_hash, nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=self.genesis_tx1_hash, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=self.genesis_tx2_hash, nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=self.genesis_tx2_hash, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=self.genesis_block_hash, nonce=5, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=self.genesis_block_hash, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=self.genesis_tx1_hash, nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=self.genesis_tx1_hash, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=self.genesis_tx2_hash, nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=self.genesis_tx2_hash, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 # LOAD_FINISHED EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=4, timestamp=0, type=EventType.LOAD_FINISHED, data=EmptyData(), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 # One VERTEX_METADATA_CHANGED for a new block (below), and one VERTEX_METADATA_CHANGED for each genesis tx (2), adding the new block as their child # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=5, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=b1.hash_hex, nonce=0, timestamp=1572636376, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPzq5l2BXiW8jWwfbfvsGUb10AyiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HCHTJiEmKp2E21AJdpfWz3NxHMmtNQRroi', timelock=None))], parents=[self.genesis_block_hash, self.genesis_tx2_hash, self.genesis_tx1_hash], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=b1.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[b2.hash_hex], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw='4', score_raw='16', first_block=None, height=1, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=6, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=self.genesis_tx2_hash, nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=self.genesis_tx2_hash, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[b1.hash_hex, dummy.hash_hex, nc1.hash_hex, b2.hash_hex], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=b1.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=7, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=self.genesis_tx1_hash, nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=self.genesis_tx1_hash, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[b1.hash_hex, dummy.hash_hex, nc1.hash_hex], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=b1.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=8, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=self.genesis_block_hash, nonce=5, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=self.genesis_block_hash, spent_outputs=[SpentOutput(index=0, tx_ids=[dummy.hash_hex])], conflict_with=[], voided_by=[], received_by=[], children=[b1.hash_hex], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=9, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=b1.hash_hex, nonce=0, timestamp=1572636376, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPzq5l2BXiW8jWwfbfvsGUb10AyiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HCHTJiEmKp2E21AJdpfWz3NxHMmtNQRroi', timelock=None))], parents=[self.genesis_block_hash, self.genesis_tx2_hash, self.genesis_tx1_hash], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=b1.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[b2.hash_hex], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw='4', score_raw='16', first_block=None, height=1, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=5, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=b1.hash_hex, nonce=0, timestamp=1572636376, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPzq5l2BXiW8jWwfbfvsGUb10AyiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HCHTJiEmKp2E21AJdpfWz3NxHMmtNQRroi', timelock=None))], parents=[self.genesis_block_hash, self.genesis_tx2_hash, self.genesis_tx1_hash], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=b1.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw='4', score_raw='16', first_block=None, height=1, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=6, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=self.genesis_tx2_hash, nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=self.genesis_tx2_hash, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=b1.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=7, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=self.genesis_tx1_hash, nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=self.genesis_tx1_hash, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=b1.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=8, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=self.genesis_block_hash, nonce=5, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=self.genesis_block_hash, spent_outputs=[SpentOutput(index=0, tx_ids=[dummy.hash_hex])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=9, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=b1.hash_hex, nonce=0, timestamp=1572636376, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPzq5l2BXiW8jWwfbfvsGUb10AyiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HCHTJiEmKp2E21AJdpfWz3NxHMmtNQRroi', timelock=None))], parents=[self.genesis_block_hash, self.genesis_tx2_hash, self.genesis_tx1_hash], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=b1.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw='4', score_raw='16', first_block=None, height=1, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 # dummy tx + its spent output being updated - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=10, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=dummy.hash_hex, nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id=self.genesis_block_hash, index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=[self.genesis_tx2_hash, self.genesis_tx1_hash], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=dummy.hash_hex, spent_outputs=[SpentOutput(index=0, tx_ids=[nc1.hash_hex])], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=11, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=self.genesis_block_hash, nonce=5, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=self.genesis_block_hash, spent_outputs=[SpentOutput(index=0, tx_ids=[dummy.hash_hex])], conflict_with=[], voided_by=[], received_by=[], children=[b1.hash_hex], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=12, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=dummy.hash_hex, nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id=self.genesis_block_hash, index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=[self.genesis_tx2_hash, self.genesis_tx1_hash], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=dummy.hash_hex, spent_outputs=[SpentOutput(index=0, tx_ids=[nc1.hash_hex])], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=10, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=dummy.hash_hex, nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id=self.genesis_block_hash, index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=[self.genesis_tx2_hash, self.genesis_tx1_hash], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=dummy.hash_hex, spent_outputs=[SpentOutput(index=0, tx_ids=[nc1.hash_hex])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=11, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=self.genesis_block_hash, nonce=5, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=self.genesis_block_hash, spent_outputs=[SpentOutput(index=0, tx_ids=[dummy.hash_hex])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=12, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=dummy.hash_hex, nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id=self.genesis_block_hash, index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=[self.genesis_tx2_hash, self.genesis_tx1_hash], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=dummy.hash_hex, spent_outputs=[SpentOutput(index=0, tx_ids=[nc1.hash_hex])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 # nc1 + its spent output being updated - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=13, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=nc1.hash_hex, nonce=0, timestamp=1572636378, signal_bits=0, version=4, weight=17.8819312127108, inputs=[TxInput(tx_id=dummy.hash_hex, index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUuREy3ZBqH13akgzR38nfAl3QLryIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPPfzpTiAfyj6gsbHG7FQsYUbVXaSg9MQK', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc1.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[nc2.hash_hex], twins=[], accumulated_weight=17.881932463618046, score=0.0, accumulated_weight_raw='241545', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=14, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=dummy.hash_hex, nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.777639275691804, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None)), TxOutput(value=99999999996, token_data=0, script='dqkUH3DCvvDLG1Vgxw9QKnqEFygPQbKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H9PNR3V6vdzSr7t394NGWB5uabCuhtN1LV', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=dummy.hash_hex, spent_outputs=[SpentOutput(index=0, tx_ids=[nc1.hash_hex]), SpentOutput(index=1, tx_ids=[nc2.hash_hex]), SpentOutput(index=2, tx_ids=[nc3.hash_hex]), SpentOutput(index=3, tx_ids=[nc4.hash_hex])], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=21.777639395103126, score=0.0, accumulated_weight_raw='3595197', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=15, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=nc1.hash_hex, nonce=0, timestamp=1572636378, signal_bits=0, version=4, weight=17.8819312127108, inputs=[TxInput(tx_id=dummy.hash_hex, index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUuREy3ZBqH13akgzR38nfAl3QLryIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPPfzpTiAfyj6gsbHG7FQsYUbVXaSg9MQK', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc1.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[nc2.hash_hex], twins=[], accumulated_weight=17.881932463618046, score=0.0, accumulated_weight_raw='241545', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=13, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=nc1.hash_hex, nonce=0, timestamp=1572636378, signal_bits=0, version=4, weight=17.8819312127108, inputs=[TxInput(tx_id=dummy.hash_hex, index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUuREy3ZBqH13akgzR38nfAl3QLryIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPPfzpTiAfyj6gsbHG7FQsYUbVXaSg9MQK', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc1.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=17.881932463618046, score=0.0, accumulated_weight_raw='241545', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=14, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=dummy.hash_hex, nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.777639275691804, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None)), TxOutput(value=99999999996, token_data=0, script='dqkUH3DCvvDLG1Vgxw9QKnqEFygPQbKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H9PNR3V6vdzSr7t394NGWB5uabCuhtN1LV', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=dummy.hash_hex, spent_outputs=[SpentOutput(index=0, tx_ids=[nc1.hash_hex]), SpentOutput(index=1, tx_ids=[nc2.hash_hex]), SpentOutput(index=2, tx_ids=[nc3.hash_hex]), SpentOutput(index=3, tx_ids=[nc4.hash_hex])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=21.777639395103126, score=0.0, accumulated_weight_raw='3595197', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=15, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=nc1.hash_hex, nonce=0, timestamp=1572636378, signal_bits=0, version=4, weight=17.8819312127108, inputs=[TxInput(tx_id=dummy.hash_hex, index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUuREy3ZBqH13akgzR38nfAl3QLryIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPPfzpTiAfyj6gsbHG7FQsYUbVXaSg9MQK', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc1.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=17.881932463618046, score=0.0, accumulated_weight_raw='241545', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 # nc2 + its spent output being updated - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=16, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=nc2.hash_hex, nonce=0, timestamp=1572636379, signal_bits=0, version=4, weight=17.893191293894695, inputs=[TxInput(tx_id=dummy.hash_hex, index=1, spent_output=TxOutput(value=1, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUoFBWk4Dv5WGbe4jvvVKoLI/iAMeIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HM8nk2q74k3nLh4FnUWfCgyuT165bmHyvu', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nc1.hash_hex], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc2.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[nc3.hash_hex, b2.hash_hex], twins=[], accumulated_weight=17.893188934434693, score=0.0, accumulated_weight_raw='243437', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=17, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=dummy.hash_hex, nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.777639275691804, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None)), TxOutput(value=99999999996, token_data=0, script='dqkUH3DCvvDLG1Vgxw9QKnqEFygPQbKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H9PNR3V6vdzSr7t394NGWB5uabCuhtN1LV', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=dummy.hash_hex, spent_outputs=[SpentOutput(index=0, tx_ids=[nc1.hash_hex]), SpentOutput(index=1, tx_ids=[nc2.hash_hex]), SpentOutput(index=2, tx_ids=[nc3.hash_hex]), SpentOutput(index=3, tx_ids=[nc4.hash_hex])], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=21.777639395103126, score=0.0, accumulated_weight_raw='3595197', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=18, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=nc2.hash_hex, nonce=0, timestamp=1572636379, signal_bits=0, version=4, weight=17.893191293894695, inputs=[TxInput(tx_id=dummy.hash_hex, index=1, spent_output=TxOutput(value=1, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUoFBWk4Dv5WGbe4jvvVKoLI/iAMeIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HM8nk2q74k3nLh4FnUWfCgyuT165bmHyvu', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nc1.hash_hex], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc2.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[nc3.hash_hex, b2.hash_hex], twins=[], accumulated_weight=17.893188934434693, score=0.0, accumulated_weight_raw='243437', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=16, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=nc2.hash_hex, nonce=0, timestamp=1572636379, signal_bits=0, version=4, weight=17.893191293894695, inputs=[TxInput(tx_id=dummy.hash_hex, index=1, spent_output=TxOutput(value=1, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUoFBWk4Dv5WGbe4jvvVKoLI/iAMeIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HM8nk2q74k3nLh4FnUWfCgyuT165bmHyvu', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nc1.hash_hex], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc2.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=17.893188934434693, score=0.0, accumulated_weight_raw='243437', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=17, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=dummy.hash_hex, nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.777639275691804, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None)), TxOutput(value=99999999996, token_data=0, script='dqkUH3DCvvDLG1Vgxw9QKnqEFygPQbKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H9PNR3V6vdzSr7t394NGWB5uabCuhtN1LV', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=dummy.hash_hex, spent_outputs=[SpentOutput(index=0, tx_ids=[nc1.hash_hex]), SpentOutput(index=1, tx_ids=[nc2.hash_hex]), SpentOutput(index=2, tx_ids=[nc3.hash_hex]), SpentOutput(index=3, tx_ids=[nc4.hash_hex])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=21.777639395103126, score=0.0, accumulated_weight_raw='3595197', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=18, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=nc2.hash_hex, nonce=0, timestamp=1572636379, signal_bits=0, version=4, weight=17.893191293894695, inputs=[TxInput(tx_id=dummy.hash_hex, index=1, spent_output=TxOutput(value=1, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUoFBWk4Dv5WGbe4jvvVKoLI/iAMeIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HM8nk2q74k3nLh4FnUWfCgyuT165bmHyvu', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nc1.hash_hex], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc2.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=17.893188934434693, score=0.0, accumulated_weight_raw='243437', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 # nc3 + its spent output being updated - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=19, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=nc3.hash_hex, nonce=0, timestamp=1572636380, signal_bits=0, version=4, weight=18.081839799876487, inputs=[TxInput(tx_id=dummy.hash_hex, index=2, spent_output=TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUp+HdqawCdjC61o+vrDbEpBOVOmuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HMpoopGYaybBqTotndHfdYxcZBgaqBZbuJ', timelock=None))], parents=[nc2.hash_hex, '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc3.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[nc4.hash_hex], twins=[], accumulated_weight=18.081842278001805, score=0.0, accumulated_weight_raw='277445', score_raw='0', first_block=None, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=20, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=dummy.hash_hex, nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.777639275691804, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None)), TxOutput(value=99999999996, token_data=0, script='dqkUH3DCvvDLG1Vgxw9QKnqEFygPQbKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H9PNR3V6vdzSr7t394NGWB5uabCuhtN1LV', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=dummy.hash_hex, spent_outputs=[SpentOutput(index=0, tx_ids=[nc1.hash_hex]), SpentOutput(index=1, tx_ids=[nc2.hash_hex]), SpentOutput(index=2, tx_ids=[nc3.hash_hex]), SpentOutput(index=3, tx_ids=[nc4.hash_hex])], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=21.777639395103126, score=0.0, accumulated_weight_raw='3595197', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=21, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=nc3.hash_hex, nonce=0, timestamp=1572636380, signal_bits=0, version=4, weight=18.081839799876487, inputs=[TxInput(tx_id=dummy.hash_hex, index=2, spent_output=TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUp+HdqawCdjC61o+vrDbEpBOVOmuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HMpoopGYaybBqTotndHfdYxcZBgaqBZbuJ', timelock=None))], parents=[nc2.hash_hex, '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc3.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[nc4.hash_hex], twins=[], accumulated_weight=18.081842278001805, score=0.0, accumulated_weight_raw='277445', score_raw='0', first_block=None, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=19, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=nc3.hash_hex, nonce=0, timestamp=1572636380, signal_bits=0, version=4, weight=18.081839799876487, inputs=[TxInput(tx_id=dummy.hash_hex, index=2, spent_output=TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUp+HdqawCdjC61o+vrDbEpBOVOmuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HMpoopGYaybBqTotndHfdYxcZBgaqBZbuJ', timelock=None))], parents=[nc2.hash_hex, '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc3.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.081842278001805, score=0.0, accumulated_weight_raw='277445', score_raw='0', first_block=None, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=20, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=dummy.hash_hex, nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.777639275691804, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None)), TxOutput(value=99999999996, token_data=0, script='dqkUH3DCvvDLG1Vgxw9QKnqEFygPQbKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H9PNR3V6vdzSr7t394NGWB5uabCuhtN1LV', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=dummy.hash_hex, spent_outputs=[SpentOutput(index=0, tx_ids=[nc1.hash_hex]), SpentOutput(index=1, tx_ids=[nc2.hash_hex]), SpentOutput(index=2, tx_ids=[nc3.hash_hex]), SpentOutput(index=3, tx_ids=[nc4.hash_hex])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=21.777639395103126, score=0.0, accumulated_weight_raw='3595197', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=21, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=nc3.hash_hex, nonce=0, timestamp=1572636380, signal_bits=0, version=4, weight=18.081839799876487, inputs=[TxInput(tx_id=dummy.hash_hex, index=2, spent_output=TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUp+HdqawCdjC61o+vrDbEpBOVOmuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HMpoopGYaybBqTotndHfdYxcZBgaqBZbuJ', timelock=None))], parents=[nc2.hash_hex, '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc3.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.081842278001805, score=0.0, accumulated_weight_raw='277445', score_raw='0', first_block=None, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 # nc4 + its spent output being updated - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=22, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=nc4.hash_hex, nonce=0, timestamp=1572636381, signal_bits=0, version=4, weight=17.853538332406874, inputs=[TxInput(tx_id=dummy.hash_hex, index=3, spent_output=TxOutput(value=1, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUzlvBv/iaHLPIkMzNTBRGei+uvVyIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRLFWEm9bosfc7Z4zZ7YsXACZTmmdA6nZd', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nc3.hash_hex], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc4.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=17.85354105039213, score=0.0, accumulated_weight_raw='236838', score_raw='0', first_block=None, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=23, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=dummy.hash_hex, nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.777639275691804, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None)), TxOutput(value=99999999996, token_data=0, script='dqkUH3DCvvDLG1Vgxw9QKnqEFygPQbKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H9PNR3V6vdzSr7t394NGWB5uabCuhtN1LV', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=dummy.hash_hex, spent_outputs=[SpentOutput(index=0, tx_ids=[nc1.hash_hex]), SpentOutput(index=1, tx_ids=[nc2.hash_hex]), SpentOutput(index=2, tx_ids=[nc3.hash_hex]), SpentOutput(index=3, tx_ids=[nc4.hash_hex])], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=21.777639395103126, score=0.0, accumulated_weight_raw='3595197', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=24, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=nc4.hash_hex, nonce=0, timestamp=1572636381, signal_bits=0, version=4, weight=17.853538332406874, inputs=[TxInput(tx_id=dummy.hash_hex, index=3, spent_output=TxOutput(value=1, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUzlvBv/iaHLPIkMzNTBRGei+uvVyIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRLFWEm9bosfc7Z4zZ7YsXACZTmmdA6nZd', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nc3.hash_hex], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc4.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=17.85354105039213, score=0.0, accumulated_weight_raw='236838', score_raw='0', first_block=None, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=22, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=nc4.hash_hex, nonce=0, timestamp=1572636381, signal_bits=0, version=4, weight=17.853538332406874, inputs=[TxInput(tx_id=dummy.hash_hex, index=3, spent_output=TxOutput(value=1, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUzlvBv/iaHLPIkMzNTBRGei+uvVyIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRLFWEm9bosfc7Z4zZ7YsXACZTmmdA6nZd', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nc3.hash_hex], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc4.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=17.85354105039213, score=0.0, accumulated_weight_raw='236838', score_raw='0', first_block=None, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=23, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=dummy.hash_hex, nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.777639275691804, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None)), TxOutput(value=99999999996, token_data=0, script='dqkUH3DCvvDLG1Vgxw9QKnqEFygPQbKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H9PNR3V6vdzSr7t394NGWB5uabCuhtN1LV', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=dummy.hash_hex, spent_outputs=[SpentOutput(index=0, tx_ids=[nc1.hash_hex]), SpentOutput(index=1, tx_ids=[nc2.hash_hex]), SpentOutput(index=2, tx_ids=[nc3.hash_hex]), SpentOutput(index=3, tx_ids=[nc4.hash_hex])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=21.777639395103126, score=0.0, accumulated_weight_raw='3595197', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=24, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=nc4.hash_hex, nonce=0, timestamp=1572636381, signal_bits=0, version=4, weight=17.853538332406874, inputs=[TxInput(tx_id=dummy.hash_hex, index=3, spent_output=TxOutput(value=1, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUzlvBv/iaHLPIkMzNTBRGei+uvVyIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRLFWEm9bosfc7Z4zZ7YsXACZTmmdA6nZd', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nc3.hash_hex], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc4.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=17.85354105039213, score=0.0, accumulated_weight_raw='236838', score_raw='0', first_block=None, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 # b2 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=25, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=b2.hash_hex, nonce=0, timestamp=1572636410, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUJ06XQc3Dh7A9qUwUwMzxnljQX0eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HA6xtQwPwLUceMNhQe8VVxdc3sT6yx8re6', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', nc2.hash_hex, '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=b2.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=21.960208086548366, accumulated_weight_raw='4', score_raw='4080199', first_block=None, height=2, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=26, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=nc2.hash_hex, nonce=0, timestamp=1572636379, signal_bits=0, version=4, weight=17.893191293894695, inputs=[TxInput(tx_id=dummy.hash_hex, index=1, spent_output=TxOutput(value=1, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUoFBWk4Dv5WGbe4jvvVKoLI/iAMeIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HM8nk2q74k3nLh4FnUWfCgyuT165bmHyvu', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nc1.hash_hex], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc2.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[nc3.hash_hex, b2.hash_hex], twins=[], accumulated_weight=17.893188934434693, score=0.0, accumulated_weight_raw='243437', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=27, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=nc1.hash_hex, nonce=0, timestamp=1572636378, signal_bits=0, version=4, weight=17.8819312127108, inputs=[TxInput(tx_id=dummy.hash_hex, index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUuREy3ZBqH13akgzR38nfAl3QLryIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPPfzpTiAfyj6gsbHG7FQsYUbVXaSg9MQK', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc1.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[nc2.hash_hex], twins=[], accumulated_weight=17.881932463618046, score=0.0, accumulated_weight_raw='241545', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=28, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=dummy.hash_hex, nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.777639275691804, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None)), TxOutput(value=99999999996, token_data=0, script='dqkUH3DCvvDLG1Vgxw9QKnqEFygPQbKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H9PNR3V6vdzSr7t394NGWB5uabCuhtN1LV', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=dummy.hash_hex, spent_outputs=[SpentOutput(index=0, tx_ids=[nc1.hash_hex]), SpentOutput(index=1, tx_ids=[nc2.hash_hex]), SpentOutput(index=2, tx_ids=[nc3.hash_hex]), SpentOutput(index=3, tx_ids=[nc4.hash_hex])], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=21.777639395103126, score=0.0, accumulated_weight_raw='3595197', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=25, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=b2.hash_hex, nonce=0, timestamp=1572636410, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUJ06XQc3Dh7A9qUwUwMzxnljQX0eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HA6xtQwPwLUceMNhQe8VVxdc3sT6yx8re6', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', nc2.hash_hex, '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=b2.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=21.960208086548366, accumulated_weight_raw='4', score_raw='4080199', first_block=None, height=2, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=26, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=nc2.hash_hex, nonce=0, timestamp=1572636379, signal_bits=0, version=4, weight=17.893191293894695, inputs=[TxInput(tx_id=dummy.hash_hex, index=1, spent_output=TxOutput(value=1, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUoFBWk4Dv5WGbe4jvvVKoLI/iAMeIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HM8nk2q74k3nLh4FnUWfCgyuT165bmHyvu', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nc1.hash_hex], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc2.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=17.893188934434693, score=0.0, accumulated_weight_raw='243437', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=27, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=nc1.hash_hex, nonce=0, timestamp=1572636378, signal_bits=0, version=4, weight=17.8819312127108, inputs=[TxInput(tx_id=dummy.hash_hex, index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUuREy3ZBqH13akgzR38nfAl3QLryIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPPfzpTiAfyj6gsbHG7FQsYUbVXaSg9MQK', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc1.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=17.881932463618046, score=0.0, accumulated_weight_raw='241545', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=28, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=dummy.hash_hex, nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.777639275691804, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None)), TxOutput(value=1, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None)), TxOutput(value=99999999996, token_data=0, script='dqkUH3DCvvDLG1Vgxw9QKnqEFygPQbKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H9PNR3V6vdzSr7t394NGWB5uabCuhtN1LV', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=dummy.hash_hex, spent_outputs=[SpentOutput(index=0, tx_ids=[nc1.hash_hex]), SpentOutput(index=1, tx_ids=[nc2.hash_hex]), SpentOutput(index=2, tx_ids=[nc3.hash_hex]), SpentOutput(index=3, tx_ids=[nc4.hash_hex])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=21.777639395103126, score=0.0, accumulated_weight_raw='3595197', score_raw='0', first_block=b2.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=29, timestamp=0, type=EventType.NC_EVENT, data=NCEventData(vertex_id=nc1.hash_hex, nc_id=nc1.hash_hex, nc_execution='success', first_block=b2.hash_hex, data_hex=b'test event on initialize 1'.hex()), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=30, timestamp=0, type=EventType.NC_EVENT, data=NCEventData(vertex_id=nc2.hash_hex, nc_id=nc1.hash_hex, nc_execution='success', first_block=b2.hash_hex, data_hex=b'test event on initialize 2'.hex()), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=31, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=b2.hash_hex, nonce=0, timestamp=1572636410, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUJ06XQc3Dh7A9qUwUwMzxnljQX0eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HA6xtQwPwLUceMNhQe8VVxdc3sT6yx8re6', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', nc2.hash_hex, '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=b2.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=21.960208086548366, accumulated_weight_raw='4', score_raw='4080199', first_block=None, height=2, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=31, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=b2.hash_hex, nonce=0, timestamp=1572636410, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUJ06XQc3Dh7A9qUwUwMzxnljQX0eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HA6xtQwPwLUceMNhQe8VVxdc3sT6yx8re6', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', nc2.hash_hex, '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=b2.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=21.960208086548366, accumulated_weight_raw='4', score_raw='4080199', first_block=None, height=2, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 # b3 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=32, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=nc4.hash_hex, nonce=0, timestamp=1572636381, signal_bits=0, version=4, weight=17.853538332406874, inputs=[TxInput(tx_id=dummy.hash_hex, index=3, spent_output=TxOutput(value=1, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUzlvBv/iaHLPIkMzNTBRGei+uvVyIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRLFWEm9bosfc7Z4zZ7YsXACZTmmdA6nZd', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nc3.hash_hex], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc4.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[nc4.hash_hex, '6e632d6661696c'], received_by=[], children=[b3.hash_hex], twins=[], accumulated_weight=17.85354105039213, score=0.0, accumulated_weight_raw='236838', score_raw='0', first_block=b3.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=33, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=b3.hash_hex, nonce=0, timestamp=1572636441, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUedvINGyDuDTh8tywE28Gba3mgH+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HHdTSHDJni47grVGYs4q3pi81qTEfDHL6S', timelock=None))], parents=[b2.hash_hex, nc2.hash_hex, nc4.hash_hex], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=b3.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=22.131472040908342, accumulated_weight_raw='4', score_raw='4594486', first_block=None, height=3, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=34, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=nc3.hash_hex, nonce=0, timestamp=1572636380, signal_bits=0, version=4, weight=18.081839799876487, inputs=[TxInput(tx_id=dummy.hash_hex, index=2, spent_output=TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUp+HdqawCdjC61o+vrDbEpBOVOmuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HMpoopGYaybBqTotndHfdYxcZBgaqBZbuJ', timelock=None))], parents=[nc2.hash_hex, '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc3.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[nc4.hash_hex], twins=[], accumulated_weight=18.081842278001805, score=0.0, accumulated_weight_raw='277445', score_raw='0', first_block=b3.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=32, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=nc4.hash_hex, nonce=0, timestamp=1572636381, signal_bits=0, version=4, weight=17.853538332406874, inputs=[TxInput(tx_id=dummy.hash_hex, index=3, spent_output=TxOutput(value=1, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUzlvBv/iaHLPIkMzNTBRGei+uvVyIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRLFWEm9bosfc7Z4zZ7YsXACZTmmdA6nZd', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nc3.hash_hex], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc4.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[nc4.hash_hex, '6e632d6661696c'], received_by=[], twins=[], accumulated_weight=17.85354105039213, score=0.0, accumulated_weight_raw='236838', score_raw='0', first_block=b3.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=33, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=b3.hash_hex, nonce=0, timestamp=1572636441, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUedvINGyDuDTh8tywE28Gba3mgH+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HHdTSHDJni47grVGYs4q3pi81qTEfDHL6S', timelock=None))], parents=[b2.hash_hex, nc2.hash_hex, nc4.hash_hex], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=b3.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=22.131472040908342, accumulated_weight_raw='4', score_raw='4594486', first_block=None, height=3, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=34, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash=nc3.hash_hex, nonce=0, timestamp=1572636380, signal_bits=0, version=4, weight=18.081839799876487, inputs=[TxInput(tx_id=dummy.hash_hex, index=2, spent_output=TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUp+HdqawCdjC61o+vrDbEpBOVOmuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HMpoopGYaybBqTotndHfdYxcZBgaqBZbuJ', timelock=None))], parents=[nc2.hash_hex, '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=nc3.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=18.081842278001805, score=0.0, accumulated_weight_raw='277445', score_raw='0', first_block=b3.hash_hex, height=0, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=35, timestamp=0, type=EventType.NC_EVENT, data=NCEventData(vertex_id=nc3.hash_hex, nc_id=nc2.hash_hex, nc_execution='success', first_block=b3.hash_hex, data_hex=b'test event on call_another'.hex()), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=36, timestamp=0, type=EventType.NC_EVENT, data=NCEventData(vertex_id=nc3.hash_hex, nc_id=nc1.hash_hex, nc_execution='success', first_block=b3.hash_hex, data_hex=b'test event on some_method'.hex()), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=37, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=b3.hash_hex, nonce=0, timestamp=1572636441, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUedvINGyDuDTh8tywE28Gba3mgH+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HHdTSHDJni47grVGYs4q3pi81qTEfDHL6S', timelock=None))], parents=[b2.hash_hex, nc2.hash_hex, nc4.hash_hex], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=b3.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=22.131472040908342, accumulated_weight_raw='4', score_raw='4594486', first_block=None, height=3, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=37, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash=b3.hash_hex, nonce=0, timestamp=1572636441, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUedvINGyDuDTh8tywE28Gba3mgH+IrA==', decoded=DecodedTxOutput(type='P2PKH', address='HHdTSHDJni47grVGYs4q3pi81qTEfDHL6S', timelock=None))], parents=[b2.hash_hex, nc2.hash_hex, nc4.hash_hex], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash=b3.hash_hex, spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=22.131472040908342, accumulated_weight_raw='4', score_raw='4594486', first_block=None, height=3, validation='full')), group_id=None), latest_event_id=37, stream_id=stream_id), # noqa: E501 ] self.assert_response_equal(responses, expected) @@ -580,59 +580,59 @@ def test_nc_events_reorg(self) -> None: expected = [ EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=0, timestamp=0, type=EventType.LOAD_STARTED, data=EmptyData(), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', nonce=5, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=1, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', nonce=5, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=2, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=3, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=4, timestamp=0, type=EventType.LOAD_FINISHED, data=EmptyData(), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=5, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', nonce=0, timestamp=1572636376, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPzq5l2BXiW8jWwfbfvsGUb10AyiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HCHTJiEmKp2E21AJdpfWz3NxHMmtNQRroi', timelock=None))], parents=['2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', 'd1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw='4', score_raw='16', first_block=None, height=1, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=6, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', '26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block='76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=7, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', '26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', 'f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', 'd1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', '385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', 'a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', 'be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block='76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=8, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', nonce=5, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', spent_outputs=[SpentOutput(index=0, tx_ids=['26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea'])], conflict_with=[], voided_by=[], received_by=[], children=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=9, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', nonce=0, timestamp=1572636376, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPzq5l2BXiW8jWwfbfvsGUb10AyiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HCHTJiEmKp2E21AJdpfWz3NxHMmtNQRroi', timelock=None))], parents=['2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', 'd1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c'], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw='4', score_raw='16', first_block=None, height=1, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=10, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', spent_outputs=[SpentOutput(index=0, tx_ids=['94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'])], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=11, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', nonce=5, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', spent_outputs=[SpentOutput(index=0, tx_ids=['26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea'])], conflict_with=[], voided_by=[], received_by=[], children=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6'], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=12, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', spent_outputs=[SpentOutput(index=0, tx_ids=['94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'])], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=13, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nonce=0, timestamp=1572636378, signal_bits=0, version=1, weight=17.90997909200292, inputs=[TxInput(tx_id='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', 'd1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', '385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', 'a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', 'be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1'], twins=[], accumulated_weight=17.909980953144554, score=0.0, accumulated_weight_raw='246287', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution='success')), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=14, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', spent_outputs=[SpentOutput(index=0, tx_ids=['94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'])], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=15, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nonce=0, timestamp=1572636378, signal_bits=0, version=1, weight=17.90997909200292, inputs=[TxInput(tx_id='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', 'd1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', '385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', 'a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', 'be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1'], twins=[], accumulated_weight=17.909980953144554, score=0.0, accumulated_weight_raw='246287', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution='success')), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=16, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', nonce=0, timestamp=1572636409, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842'], twins=[], accumulated_weight=2.0, score=21.267581676524166, accumulated_weight_raw='4', score_raw='2524527', first_block=None, height=2, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=17, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nonce=0, timestamp=1572636378, signal_bits=0, version=1, weight=17.90997909200292, inputs=[TxInput(tx_id='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', 'd1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', '385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', 'a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', 'be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1'], twins=[], accumulated_weight=17.909980953144554, score=0.0, accumulated_weight_raw='246287', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution='success')), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=18, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', spent_outputs=[SpentOutput(index=0, tx_ids=['94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'])], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=5, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', nonce=0, timestamp=1572636376, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPzq5l2BXiW8jWwfbfvsGUb10AyiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HCHTJiEmKp2E21AJdpfWz3NxHMmtNQRroi', timelock=None))], parents=['2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw='4', score_raw='16', first_block=None, height=1, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=6, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', nonce=2, timestamp=1572636345, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block='76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=7, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', nonce=6, timestamp=1572636344, signal_bits=0, version=1, weight=2.0, inputs=[], outputs=[], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block='76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=8, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', nonce=5, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', spent_outputs=[SpentOutput(index=0, tx_ids=['26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=9, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', nonce=0, timestamp=1572636376, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUPzq5l2BXiW8jWwfbfvsGUb10AyiIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HCHTJiEmKp2E21AJdpfWz3NxHMmtNQRroi', timelock=None))], parents=['2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=4.0, accumulated_weight_raw='4', score_raw='16', first_block=None, height=1, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=10, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', spent_outputs=[SpentOutput(index=0, tx_ids=['94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=11, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', nonce=5, timestamp=1572636343, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None))], parents=[], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', spent_outputs=[SpentOutput(index=0, tx_ids=['26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=2.0, accumulated_weight_raw='4', score_raw='4', first_block=None, height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=12, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', spent_outputs=[SpentOutput(index=0, tx_ids=['94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=13, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nonce=0, timestamp=1572636378, signal_bits=0, version=1, weight=17.90997909200292, inputs=[TxInput(tx_id='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=17.909980953144554, score=0.0, accumulated_weight_raw='246287', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution='success')), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=14, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', spent_outputs=[SpentOutput(index=0, tx_ids=['94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=15, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nonce=0, timestamp=1572636378, signal_bits=0, version=1, weight=17.90997909200292, inputs=[TxInput(tx_id='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=17.909980953144554, score=0.0, accumulated_weight_raw='246287', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution='success')), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=16, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', nonce=0, timestamp=1572636409, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=21.267581676524166, accumulated_weight_raw='4', score_raw='2524527', first_block=None, height=2, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=17, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nonce=0, timestamp=1572636378, signal_bits=0, version=1, weight=17.90997909200292, inputs=[TxInput(tx_id='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=17.909980953144554, score=0.0, accumulated_weight_raw='246287', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution='success')), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=18, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', spent_outputs=[SpentOutput(index=0, tx_ids=['94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 # nc1 is executed for the first time EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=19, timestamp=0, type=EventType.NC_EVENT, data=NCEventData(vertex_id='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nc_id='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nc_execution='success', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', data_hex=b'test event on initialize 1'.hex()), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=20, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', nonce=0, timestamp=1572636409, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842'], twins=[], accumulated_weight=2.0, score=21.267581676524166, accumulated_weight_raw='4', score_raw='2524527', first_block=None, height=2, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=21, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', nonce=0, timestamp=1572636440, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUH3DCvvDLG1Vgxw9QKnqEFygPQbKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H9PNR3V6vdzSr7t394NGWB5uabCuhtN1LV', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', spent_outputs=[], conflict_with=[], voided_by=['d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c'], received_by=[], children=['385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad'], twins=[], accumulated_weight=2.0, score=21.267581676524166, accumulated_weight_raw='4', score_raw='2524527', first_block=None, height=2, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=22, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', nonce=0, timestamp=1572636409, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842'], twins=[], accumulated_weight=2.0, score=21.267581676524166, accumulated_weight_raw='4', score_raw='2524527', first_block=None, height=2, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=23, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nonce=0, timestamp=1572636378, signal_bits=0, version=1, weight=17.90997909200292, inputs=[TxInput(tx_id='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', 'd1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', '385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', 'a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', 'be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1'], twins=[], accumulated_weight=17.909980953144554, score=0.0, accumulated_weight_raw='246287', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution='success')), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=24, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', spent_outputs=[SpentOutput(index=0, tx_ids=['94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'])], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=25, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', nonce=0, timestamp=1572636440, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUH3DCvvDLG1Vgxw9QKnqEFygPQbKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H9PNR3V6vdzSr7t394NGWB5uabCuhtN1LV', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', spent_outputs=[], conflict_with=[], voided_by=['d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c'], received_by=[], children=['385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad'], twins=[], accumulated_weight=2.0, score=21.267581676524166, accumulated_weight_raw='4', score_raw='2524527', first_block=None, height=2, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=20, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', nonce=0, timestamp=1572636409, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=21.267581676524166, accumulated_weight_raw='4', score_raw='2524527', first_block=None, height=2, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=21, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', nonce=0, timestamp=1572636440, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUH3DCvvDLG1Vgxw9QKnqEFygPQbKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H9PNR3V6vdzSr7t394NGWB5uabCuhtN1LV', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', spent_outputs=[], conflict_with=[], voided_by=['d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c'], received_by=[], twins=[], accumulated_weight=2.0, score=21.267581676524166, accumulated_weight_raw='4', score_raw='2524527', first_block=None, height=2, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=22, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', nonce=0, timestamp=1572636409, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=21.267581676524166, accumulated_weight_raw='4', score_raw='2524527', first_block=None, height=2, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=23, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nonce=0, timestamp=1572636378, signal_bits=0, version=1, weight=17.90997909200292, inputs=[TxInput(tx_id='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=17.909980953144554, score=0.0, accumulated_weight_raw='246287', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution='success')), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=24, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', spent_outputs=[SpentOutput(index=0, tx_ids=['94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=25, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', nonce=0, timestamp=1572636440, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUH3DCvvDLG1Vgxw9QKnqEFygPQbKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H9PNR3V6vdzSr7t394NGWB5uabCuhtN1LV', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', spent_outputs=[], conflict_with=[], voided_by=['d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c'], received_by=[], twins=[], accumulated_weight=2.0, score=21.267581676524166, accumulated_weight_raw='4', score_raw='2524527', first_block=None, height=2, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 # a reorg happens, reexecuting nc1 EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=26, timestamp=0, type=EventType.REORG_STARTED, data=ReorgData(reorg_size=1, previous_best_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', new_best_block='385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', common_block='76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6'), group_id=0), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=27, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', nonce=0, timestamp=1572636471, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUuREy3ZBqH13akgzR38nfAl3QLryIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPPfzpTiAfyj6gsbHG7FQsYUbVXaSg9MQK', timelock=None))], parents=['d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', spent_outputs=[], conflict_with=[], voided_by=['385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad'], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=21.267583962408054, accumulated_weight_raw='4', score_raw='2524531', first_block=None, height=3, validation='full', nc_execution=None)), group_id=0), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=28, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', nonce=0, timestamp=1572636440, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUH3DCvvDLG1Vgxw9QKnqEFygPQbKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H9PNR3V6vdzSr7t394NGWB5uabCuhtN1LV', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', spent_outputs=[], conflict_with=[], voided_by=['d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c'], received_by=[], children=['385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad'], twins=[], accumulated_weight=2.0, score=21.267581676524166, accumulated_weight_raw='4', score_raw='2524527', first_block=None, height=2, validation='full', nc_execution=None)), group_id=0), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=29, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nonce=0, timestamp=1572636378, signal_bits=0, version=1, weight=17.90997909200292, inputs=[TxInput(tx_id='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', 'd1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', '385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', 'a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', 'be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1'], twins=[], accumulated_weight=17.909980953144554, score=0.0, accumulated_weight_raw='246287', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution='success')), group_id=0), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=30, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', spent_outputs=[SpentOutput(index=0, tx_ids=['94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'])], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution=None)), group_id=0), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=27, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', nonce=0, timestamp=1572636471, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUuREy3ZBqH13akgzR38nfAl3QLryIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPPfzpTiAfyj6gsbHG7FQsYUbVXaSg9MQK', timelock=None))], parents=['d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', spent_outputs=[], conflict_with=[], voided_by=['385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad'], received_by=[], twins=[], accumulated_weight=2.0, score=21.267583962408054, accumulated_weight_raw='4', score_raw='2524531', first_block=None, height=3, validation='full', nc_execution=None)), group_id=0), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=28, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', nonce=0, timestamp=1572636440, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUH3DCvvDLG1Vgxw9QKnqEFygPQbKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H9PNR3V6vdzSr7t394NGWB5uabCuhtN1LV', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', spent_outputs=[], conflict_with=[], voided_by=['d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c'], received_by=[], twins=[], accumulated_weight=2.0, score=21.267581676524166, accumulated_weight_raw='4', score_raw='2524527', first_block=None, height=2, validation='full', nc_execution=None)), group_id=0), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=29, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nonce=0, timestamp=1572636378, signal_bits=0, version=1, weight=17.90997909200292, inputs=[TxInput(tx_id='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=17.909980953144554, score=0.0, accumulated_weight_raw='246287', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution='success')), group_id=0), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=30, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', spent_outputs=[SpentOutput(index=0, tx_ids=['94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution=None)), group_id=0), latest_event_id=48, stream_id=stream_id), # noqa: E501 # nc1 is executed for the second time EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=31, timestamp=0, type=EventType.NC_EVENT, data=NCEventData(vertex_id='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nc_id='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nc_execution='success', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', data_hex=b'test event on initialize 1'.hex()), group_id=0), latest_event_id=48, stream_id=stream_id), # noqa: E501 EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=32, timestamp=0, type=EventType.REORG_FINISHED, data=EmptyData(), group_id=0), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=33, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', nonce=0, timestamp=1572636471, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUuREy3ZBqH13akgzR38nfAl3QLryIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPPfzpTiAfyj6gsbHG7FQsYUbVXaSg9MQK', timelock=None))], parents=['d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', spent_outputs=[], conflict_with=[], voided_by=['385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad'], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=21.267583962408054, accumulated_weight_raw='4', score_raw='2524531', first_block=None, height=3, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=34, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', nonce=0, timestamp=1572636502, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUoFBWk4Dv5WGbe4jvvVKoLI/iAMeIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HM8nk2q74k3nLh4FnUWfCgyuT165bmHyvu', timelock=None))], parents=['f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1'], twins=[], accumulated_weight=2.0, score=21.267583962408054, accumulated_weight_raw='4', score_raw='2524531', first_block=None, height=3, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=35, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', nonce=0, timestamp=1572636471, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUuREy3ZBqH13akgzR38nfAl3QLryIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPPfzpTiAfyj6gsbHG7FQsYUbVXaSg9MQK', timelock=None))], parents=['d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', spent_outputs=[], conflict_with=[], voided_by=['385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad'], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=21.267583962408054, accumulated_weight_raw='4', score_raw='2524531', first_block=None, height=3, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=36, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', nonce=0, timestamp=1572636440, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUH3DCvvDLG1Vgxw9QKnqEFygPQbKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H9PNR3V6vdzSr7t394NGWB5uabCuhtN1LV', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', spent_outputs=[], conflict_with=[], voided_by=['d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c'], received_by=[], children=['385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad'], twins=[], accumulated_weight=2.0, score=21.267581676524166, accumulated_weight_raw='4', score_raw='2524527', first_block=None, height=2, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=37, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nonce=0, timestamp=1572636378, signal_bits=0, version=1, weight=17.90997909200292, inputs=[TxInput(tx_id='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', 'd1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', '385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', 'a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', 'be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1'], twins=[], accumulated_weight=17.909980953144554, score=0.0, accumulated_weight_raw='246287', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution='success')), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=38, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', spent_outputs=[SpentOutput(index=0, tx_ids=['94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'])], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=39, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', nonce=0, timestamp=1572636502, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUoFBWk4Dv5WGbe4jvvVKoLI/iAMeIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HM8nk2q74k3nLh4FnUWfCgyuT165bmHyvu', timelock=None))], parents=['f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1'], twins=[], accumulated_weight=2.0, score=21.267583962408054, accumulated_weight_raw='4', score_raw='2524531', first_block=None, height=3, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=33, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', nonce=0, timestamp=1572636471, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUuREy3ZBqH13akgzR38nfAl3QLryIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPPfzpTiAfyj6gsbHG7FQsYUbVXaSg9MQK', timelock=None))], parents=['d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', spent_outputs=[], conflict_with=[], voided_by=['385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad'], received_by=[], twins=[], accumulated_weight=2.0, score=21.267583962408054, accumulated_weight_raw='4', score_raw='2524531', first_block=None, height=3, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=34, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', nonce=0, timestamp=1572636502, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUoFBWk4Dv5WGbe4jvvVKoLI/iAMeIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HM8nk2q74k3nLh4FnUWfCgyuT165bmHyvu', timelock=None))], parents=['f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=21.267583962408054, accumulated_weight_raw='4', score_raw='2524531', first_block=None, height=3, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=35, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', nonce=0, timestamp=1572636471, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUuREy3ZBqH13akgzR38nfAl3QLryIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HPPfzpTiAfyj6gsbHG7FQsYUbVXaSg9MQK', timelock=None))], parents=['d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', spent_outputs=[], conflict_with=[], voided_by=['385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad'], received_by=[], twins=[], accumulated_weight=2.0, score=21.267583962408054, accumulated_weight_raw='4', score_raw='2524531', first_block=None, height=3, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=36, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', nonce=0, timestamp=1572636440, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUH3DCvvDLG1Vgxw9QKnqEFygPQbKIrA==', decoded=DecodedTxOutput(type='P2PKH', address='H9PNR3V6vdzSr7t394NGWB5uabCuhtN1LV', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', spent_outputs=[], conflict_with=[], voided_by=['d1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c'], received_by=[], twins=[], accumulated_weight=2.0, score=21.267581676524166, accumulated_weight_raw='4', score_raw='2524527', first_block=None, height=2, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=37, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nonce=0, timestamp=1572636378, signal_bits=0, version=1, weight=17.90997909200292, inputs=[TxInput(tx_id='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=17.909980953144554, score=0.0, accumulated_weight_raw='246287', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution='success')), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=38, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', spent_outputs=[SpentOutput(index=0, tx_ids=['94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=39, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', nonce=0, timestamp=1572636502, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUoFBWk4Dv5WGbe4jvvVKoLI/iAMeIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HM8nk2q74k3nLh4FnUWfCgyuT165bmHyvu', timelock=None))], parents=['f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=21.267583962408054, accumulated_weight_raw='4', score_raw='2524531', first_block=None, height=3, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id), # noqa: E501 # another reorg happens, reexecuting nc1 again EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=40, timestamp=0, type=EventType.REORG_STARTED, data=ReorgData(reorg_size=2, previous_best_block='385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', new_best_block='be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1', common_block='76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6'), group_id=1), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=41, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1', nonce=0, timestamp=1572636533, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUp+HdqawCdjC61o+vrDbEpBOVOmuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HMpoopGYaybBqTotndHfdYxcZBgaqBZbuJ', timelock=None))], parents=['a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=21.267586248288318, accumulated_weight_raw='4', score_raw='2524535', first_block=None, height=4, validation='full', nc_execution=None)), group_id=1), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=42, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', nonce=0, timestamp=1572636502, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUoFBWk4Dv5WGbe4jvvVKoLI/iAMeIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HM8nk2q74k3nLh4FnUWfCgyuT165bmHyvu', timelock=None))], parents=['f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1'], twins=[], accumulated_weight=2.0, score=21.267583962408054, accumulated_weight_raw='4', score_raw='2524531', first_block=None, height=3, validation='full', nc_execution=None)), group_id=1), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=43, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', nonce=0, timestamp=1572636409, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842'], twins=[], accumulated_weight=2.0, score=21.267581676524166, accumulated_weight_raw='4', score_raw='2524527', first_block=None, height=2, validation='full', nc_execution=None)), group_id=1), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=44, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nonce=0, timestamp=1572636378, signal_bits=0, version=1, weight=17.90997909200292, inputs=[TxInput(tx_id='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=['f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', 'd1fa99db1041855845d4bbf76603b124190aa19fd2e65e689faa4062497f4b7c', '385811b93c2926cc9e599f2ea9f482af98def3e0b394d4e6cb6a151f4a5127ad', 'a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', 'be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1'], twins=[], accumulated_weight=17.909980953144554, score=0.0, accumulated_weight_raw='246287', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution='success')), group_id=1), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=45, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', spent_outputs=[SpentOutput(index=0, tx_ids=['94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'])], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution=None)), group_id=1), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=41, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1', nonce=0, timestamp=1572636533, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUp+HdqawCdjC61o+vrDbEpBOVOmuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HMpoopGYaybBqTotndHfdYxcZBgaqBZbuJ', timelock=None))], parents=['a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=21.267586248288318, accumulated_weight_raw='4', score_raw='2524535', first_block=None, height=4, validation='full', nc_execution=None)), group_id=1), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=42, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', nonce=0, timestamp=1572636502, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUoFBWk4Dv5WGbe4jvvVKoLI/iAMeIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HM8nk2q74k3nLh4FnUWfCgyuT165bmHyvu', timelock=None))], parents=['f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=21.267583962408054, accumulated_weight_raw='4', score_raw='2524531', first_block=None, height=3, validation='full', nc_execution=None)), group_id=1), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=43, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', nonce=0, timestamp=1572636409, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUSs2wh6dehIfZfwWtUCkvVL6mm8eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HDLeo6r8wB8schqaMxrLP1HrrpBVZeRfWY', timelock=None))], parents=['76d8bb18b24173fe72898faf2a09606b09af78a22cb3a087cd88f2faed67c0f6', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=21.267581676524166, accumulated_weight_raw='4', score_raw='2524527', first_block=None, height=2, validation='full', nc_execution=None)), group_id=1), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=44, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nonce=0, timestamp=1572636378, signal_bits=0, version=1, weight=17.90997909200292, inputs=[TxInput(tx_id='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', index=0, spent_output=TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkUywjnDVLCo2DvKimDErqN97qgd+SIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HR2gDr1CEhH8oaBPdjgMddzcxiESgmPdPQ', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=17.909980953144554, score=0.0, accumulated_weight_raw='246287', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution='success')), group_id=1), latest_event_id=48, stream_id=stream_id), # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=45, timestamp=0, type=EventType.VERTEX_METADATA_CHANGED, data=TxData(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', nonce=0, timestamp=1572636377, signal_bits=0, version=1, weight=21.119475351738224, inputs=[TxInput(tx_id='2ebb3b8edcb72a7e46cc0efacfe1b109e2e9dd868a90fe0906968dc8fbbf6488', index=0, spent_output=TxOutput(value=100000000000, token_data=0, script='dqkU0HvILW4NG7EWYUB2ZF6bh8jIO0GIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HRXVDmLVdq8pgok1BCUKpiFWdAVAy4a5AJ', timelock=None)))], outputs=[TxOutput(value=1, token_data=0, script='dqkU80nn8+AtzngP5Dna6XSwXuuCC/eIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HUhX83RJxSmUoffvmTNsLa4kAf33Y7GtuA', timelock=None)), TxOutput(value=99999999999, token_data=0, script='dqkUf5BkCh0suqADvCnN6YjtldkKnueIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HJ9dB9tKwFs8MGvcgdSpZZbVXWxpFZ9tBs', timelock=None))], parents=['16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '33e14cb555a96967841dcbe0f95e9eab5810481d01de8f4f73afb8cce365e869'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='26c218df92c9d6410c9b9a7093a35cb046f959e12dc8727b7cc6671c78177dea', spent_outputs=[SpentOutput(index=0, tx_ids=['94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'])], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=21.11947563927789, score=0.0, accumulated_weight_raw='2278220', score_raw='0', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', height=0, validation='full', nc_execution=None)), group_id=1), latest_event_id=48, stream_id=stream_id), # noqa: E501 # nc1 is reexecuted for the third and final time EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=46, timestamp=0, type=EventType.NC_EVENT, data=NCEventData(vertex_id='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nc_id='94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c', nc_execution='success', first_block='f3201793cb10fb5d3821773f169d33934a4127c5636128bf07c2e266a2ca3e5f', data_hex=b'test event on initialize 1'.hex()), group_id=1), latest_event_id=48, stream_id=stream_id), # noqa: E501 EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=47, timestamp=0, type=EventType.REORG_FINISHED, data=EmptyData(), group_id=1), latest_event_id=48, stream_id=stream_id), # noqa: E501 - EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=48, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1', nonce=0, timestamp=1572636533, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUp+HdqawCdjC61o+vrDbEpBOVOmuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HMpoopGYaybBqTotndHfdYxcZBgaqBZbuJ', timelock=None))], parents=['a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], children=[], twins=[], accumulated_weight=2.0, score=21.267586248288318, accumulated_weight_raw='4', score_raw='2524535', first_block=None, height=4, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id) # noqa: E501 + EventResponse(type='EVENT', peer_id=self.peer_id, network='unittests', event=BaseEvent(id=48, timestamp=0, type=EventType.NEW_VERTEX_ACCEPTED, data=TxData(hash='be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1', nonce=0, timestamp=1572636533, signal_bits=0, version=0, weight=2.0, inputs=[], outputs=[TxOutput(value=6400, token_data=0, script='dqkUp+HdqawCdjC61o+vrDbEpBOVOmuIrA==', decoded=DecodedTxOutput(type='P2PKH', address='HMpoopGYaybBqTotndHfdYxcZBgaqBZbuJ', timelock=None))], parents=['a67ca8b6c423b08d06f61e5aae8b58ae00e028b8ae914b9c7943f27f01749842', '16ba3dbe424c443e571b00840ca54b9ff4cff467e10b6a15536e718e2008f952', '94b6278e7bac5b5ebb0888a0eb742868111b3a04b004cfbaf3b1786504815c8c'], tokens=[], token_name=None, token_symbol=None, aux_pow=None, metadata=TxMetadata(hash='be9f0c15423b88ddb7b0a4ef4c86f252b4d4e179f4e9ae357775766fca7226c1', spent_outputs=[], conflict_with=[], voided_by=[], received_by=[], twins=[], accumulated_weight=2.0, score=21.267586248288318, accumulated_weight_raw='4', score_raw='2524535', first_block=None, height=4, validation='full', nc_execution=None)), group_id=None), latest_event_id=48, stream_id=stream_id) # noqa: E501 ] self.assert_response_equal(responses, expected) diff --git a/tests/event/test_event_storage.py b/hathor_tests/event/test_event_storage.py similarity index 99% rename from tests/event/test_event_storage.py rename to hathor_tests/event/test_event_storage.py index 758602129..9bb3187e9 100644 --- a/tests/event/test_event_storage.py +++ b/hathor_tests/event/test_event_storage.py @@ -1,8 +1,8 @@ from hathor.event.model.base_event import BaseEvent from hathor.event.model.node_state import NodeState from hathor.event.storage.rocksdb_storage import EventRocksDBStorage -from tests import unittest -from tests.utils import EventMocker +from hathor_tests import unittest +from hathor_tests.utils import EventMocker class EventStorageTest(unittest.TestCase): diff --git a/tests/event/test_tx_metadata.py b/hathor_tests/event/test_tx_metadata.py similarity index 99% rename from tests/event/test_tx_metadata.py rename to hathor_tests/event/test_tx_metadata.py index fe3782617..03486287b 100644 --- a/tests/event/test_tx_metadata.py +++ b/hathor_tests/event/test_tx_metadata.py @@ -26,7 +26,6 @@ def test_from_spent_output_instance() -> None: conflict_with=[], voided_by=[], received_by=[], - children=[], twins=[], accumulated_weight=0.0, score=0.0, diff --git a/tests/event/websocket/__init__.py b/hathor_tests/event/websocket/__init__.py similarity index 100% rename from tests/event/websocket/__init__.py rename to hathor_tests/event/websocket/__init__.py diff --git a/tests/event/websocket/test_factory.py b/hathor_tests/event/websocket/test_factory.py similarity index 99% rename from tests/event/websocket/test_factory.py rename to hathor_tests/event/websocket/test_factory.py index 3fbbd6711..03eef0ae5 100644 --- a/tests/event/websocket/test_factory.py +++ b/hathor_tests/event/websocket/test_factory.py @@ -23,7 +23,7 @@ from hathor.event.websocket.response import EventResponse, InvalidRequestType from hathor.simulator.clock import MemoryReactorHeapClock from hathor.storage import RocksDBStorage -from tests.utils import EventMocker +from hathor_tests.utils import EventMocker def test_started_register() -> None: diff --git a/tests/event/websocket/test_protocol.py b/hathor_tests/event/websocket/test_protocol.py similarity index 99% rename from tests/event/websocket/test_protocol.py rename to hathor_tests/event/websocket/test_protocol.py index 2d64f42f8..e7cf786f2 100644 --- a/tests/event/websocket/test_protocol.py +++ b/hathor_tests/event/websocket/test_protocol.py @@ -23,7 +23,7 @@ from hathor.event.websocket import EventWebsocketFactory from hathor.event.websocket.protocol import EventWebsocketProtocol from hathor.event.websocket.response import EventResponse, InvalidRequestType -from tests.utils import EventMocker +from hathor_tests.utils import EventMocker @pytest.fixture @@ -103,7 +103,7 @@ def test_send_event_response() -> None: b'"parents":[],' b'"tokens":[],"token_name":null,"token_symbol":null,"aux_pow":null,"headers":[],' b'"metadata":{"hash":"abc",' - b'"spent_outputs":[],"conflict_with":[],"voided_by":[],"received_by":[],"children":[],' + b'"spent_outputs":[],"conflict_with":[],"voided_by":[],"received_by":[],' b'"twins":[],"accumulated_weight":10.0,"score":20.0,"accumulated_weight_raw":"1024",' b'"score_raw":"1048576","first_block":null,"height":100,' b'"validation":"validation","nc_execution":null}},"group_id":null},"latest_event_id":10,' diff --git a/tests/execution_manager/__init__.py b/hathor_tests/execution_manager/__init__.py similarity index 100% rename from tests/execution_manager/__init__.py rename to hathor_tests/execution_manager/__init__.py diff --git a/tests/execution_manager/test_execution_manager.py b/hathor_tests/execution_manager/test_execution_manager.py similarity index 100% rename from tests/execution_manager/test_execution_manager.py rename to hathor_tests/execution_manager/test_execution_manager.py diff --git a/tests/feature_activation/__init__.py b/hathor_tests/feature_activation/__init__.py similarity index 100% rename from tests/feature_activation/__init__.py rename to hathor_tests/feature_activation/__init__.py diff --git a/tests/feature_activation/test_bit_signaling_service.py b/hathor_tests/feature_activation/test_bit_signaling_service.py similarity index 100% rename from tests/feature_activation/test_bit_signaling_service.py rename to hathor_tests/feature_activation/test_bit_signaling_service.py diff --git a/tests/feature_activation/test_criteria.py b/hathor_tests/feature_activation/test_criteria.py similarity index 100% rename from tests/feature_activation/test_criteria.py rename to hathor_tests/feature_activation/test_criteria.py diff --git a/tests/feature_activation/test_feature_service.py b/hathor_tests/feature_activation/test_feature_service.py similarity index 99% rename from tests/feature_activation/test_feature_service.py rename to hathor_tests/feature_activation/test_feature_service.py index ce0efd871..188e8733a 100644 --- a/tests/feature_activation/test_feature_service.py +++ b/hathor_tests/feature_activation/test_feature_service.py @@ -33,7 +33,7 @@ from hathor.transaction.storage import TransactionStorage from hathor.transaction.validation_state import ValidationState from hathor.util import not_none -from tests.unittest import TestBuilder +from hathor_tests.unittest import TestBuilder def get_storage(settings: HathorSettings, *, up_to_height: int) -> TransactionStorage: diff --git a/tests/feature_activation/test_feature_simulation.py b/hathor_tests/feature_activation/test_feature_simulation.py similarity index 99% rename from tests/feature_activation/test_feature_simulation.py rename to hathor_tests/feature_activation/test_feature_simulation.py index 6aaf0cdb0..f5cd0ddfd 100644 --- a/tests/feature_activation/test_feature_simulation.py +++ b/hathor_tests/feature_activation/test_feature_simulation.py @@ -30,8 +30,8 @@ from hathor.simulator.utils import add_new_blocks, gen_new_tx from hathor.transaction.exceptions import BlockMustSignalError from hathor.util import not_none -from tests.resources.base_resource import StubSite -from tests.simulation.base import SimulatorTestCase +from hathor_tests.resources.base_resource import StubSite +from hathor_tests.simulation.base import SimulatorTestCase class BaseFeatureSimulationTest(SimulatorTestCase): diff --git a/tests/feature_activation/test_mining_simulation.py b/hathor_tests/feature_activation/test_mining_simulation.py similarity index 98% rename from tests/feature_activation/test_mining_simulation.py rename to hathor_tests/feature_activation/test_mining_simulation.py index ff61f9328..734ba70cf 100644 --- a/tests/feature_activation/test_mining_simulation.py +++ b/hathor_tests/feature_activation/test_mining_simulation.py @@ -29,8 +29,8 @@ from hathor.transaction.resources import GetBlockTemplateResource from hathor.transaction.util import unpack, unpack_len from hathor.util import json_loadb -from tests.resources.base_resource import StubSite -from tests.simulation.base import SimulatorTestCase +from hathor_tests.resources.base_resource import StubSite +from hathor_tests.simulation.base import SimulatorTestCase class MiningSimulationTest(SimulatorTestCase): diff --git a/tests/feature_activation/test_settings.py b/hathor_tests/feature_activation/test_settings.py similarity index 100% rename from tests/feature_activation/test_settings.py rename to hathor_tests/feature_activation/test_settings.py diff --git a/tests/nanocontracts/__init__.py b/hathor_tests/nanocontracts/__init__.py similarity index 100% rename from tests/nanocontracts/__init__.py rename to hathor_tests/nanocontracts/__init__.py diff --git a/tests/nanocontracts/blueprints/__init__.py b/hathor_tests/nanocontracts/blueprints/__init__.py similarity index 100% rename from tests/nanocontracts/blueprints/__init__.py rename to hathor_tests/nanocontracts/blueprints/__init__.py diff --git a/tests/nanocontracts/blueprints/test_bet.py b/hathor_tests/nanocontracts/blueprints/test_bet.py similarity index 98% rename from tests/nanocontracts/blueprints/test_bet.py rename to hathor_tests/nanocontracts/blueprints/test_bet.py index 66b07b4a5..9bbc6a441 100644 --- a/tests/nanocontracts/blueprints/test_bet.py +++ b/hathor_tests/nanocontracts/blueprints/test_bet.py @@ -21,8 +21,8 @@ from hathor.transaction.scripts import P2PKH from hathor.util import not_none from hathor.wallet import KeyPair -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase -from tests.nanocontracts.test_blueprints import bet +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.test_blueprints import bet settings = HathorSettings() diff --git a/tests/nanocontracts/blueprints/test_swap_demo.py b/hathor_tests/nanocontracts/blueprints/test_swap_demo.py similarity index 95% rename from tests/nanocontracts/blueprints/test_swap_demo.py rename to hathor_tests/nanocontracts/blueprints/test_swap_demo.py index ec6c8a258..d47cdd85a 100644 --- a/tests/nanocontracts/blueprints/test_swap_demo.py +++ b/hathor_tests/nanocontracts/blueprints/test_swap_demo.py @@ -1,8 +1,8 @@ from hathor.nanocontracts.nc_types import make_nc_type_for_arg_type as make_nc_type from hathor.nanocontracts.storage.contract_storage import Balance from hathor.nanocontracts.types import NCDepositAction, NCWithdrawalAction, TokenUid -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase -from tests.nanocontracts.test_blueprints.swap_demo import InvalidActions, InvalidRatio, InvalidTokens, SwapDemo +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.test_blueprints.swap_demo import InvalidActions, InvalidRatio, InvalidTokens, SwapDemo SWAP_NC_TYPE = make_nc_type(int) diff --git a/tests/nanocontracts/blueprints/unittest.py b/hathor_tests/nanocontracts/blueprints/unittest.py similarity index 98% rename from tests/nanocontracts/blueprints/unittest.py rename to hathor_tests/nanocontracts/blueprints/unittest.py index 3f64eae7b..034c4d5b9 100644 --- a/tests/nanocontracts/blueprints/unittest.py +++ b/hathor_tests/nanocontracts/blueprints/unittest.py @@ -15,8 +15,8 @@ from hathor.util import not_none from hathor.verification.on_chain_blueprint_verifier import OnChainBlueprintVerifier from hathor.wallet import KeyPair -from tests import unittest -from tests.nanocontracts.utils import TestRunner +from hathor_tests import unittest +from hathor_tests.nanocontracts.utils import TestRunner class BlueprintTestCase(unittest.TestCase): diff --git a/tests/nanocontracts/fields/__init__.py b/hathor_tests/nanocontracts/fields/__init__.py similarity index 100% rename from tests/nanocontracts/fields/__init__.py rename to hathor_tests/nanocontracts/fields/__init__.py diff --git a/tests/nanocontracts/fields/test_compound_field.py b/hathor_tests/nanocontracts/fields/test_compound_field.py similarity index 97% rename from tests/nanocontracts/fields/test_compound_field.py rename to hathor_tests/nanocontracts/fields/test_compound_field.py index c41c3e392..802dc8e05 100644 --- a/tests/nanocontracts/fields/test_compound_field.py +++ b/hathor_tests/nanocontracts/fields/test_compound_field.py @@ -4,8 +4,8 @@ from hathor.nanocontracts.fields.deque_container import _METADATA_NC_TYPE as METADATA_NC_TYPE from hathor.nanocontracts.nc_types import VarInt32NCType from hathor.transaction import Block, Transaction -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder INT_NC_TYPE = VarInt32NCType() diff --git a/tests/nanocontracts/fields/test_deque_field.py b/hathor_tests/nanocontracts/fields/test_deque_field.py similarity index 98% rename from tests/nanocontracts/fields/test_deque_field.py rename to hathor_tests/nanocontracts/fields/test_deque_field.py index 03a59dd39..3d077f063 100644 --- a/tests/nanocontracts/fields/test_deque_field.py +++ b/hathor_tests/nanocontracts/fields/test_deque_field.py @@ -19,8 +19,8 @@ from hathor.nanocontracts.catalog import NCBlueprintCatalog from hathor.nanocontracts.nc_types import VarInt32NCType from hathor.transaction import Block, Transaction -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder INT_NC_TYPE = VarInt32NCType() diff --git a/tests/nanocontracts/fields/test_nested_containers.py b/hathor_tests/nanocontracts/fields/test_nested_containers.py similarity index 98% rename from tests/nanocontracts/fields/test_nested_containers.py rename to hathor_tests/nanocontracts/fields/test_nested_containers.py index c5f294737..ede1b7c0e 100644 --- a/tests/nanocontracts/fields/test_nested_containers.py +++ b/hathor_tests/nanocontracts/fields/test_nested_containers.py @@ -4,8 +4,8 @@ from hathor.nanocontracts.fields.deque_container import _METADATA_NC_TYPE as METADATA_NC_TYPE from hathor.nanocontracts.nc_types import StrNCType, VarInt32NCType from hathor.transaction import Block, Transaction -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder INT_NC_TYPE = VarInt32NCType() STR_NC_TYPE = StrNCType() diff --git a/tests/nanocontracts/fields/test_set_field.py b/hathor_tests/nanocontracts/fields/test_set_field.py similarity index 97% rename from tests/nanocontracts/fields/test_set_field.py rename to hathor_tests/nanocontracts/fields/test_set_field.py index 9320d07a6..608fae1d5 100644 --- a/tests/nanocontracts/fields/test_set_field.py +++ b/hathor_tests/nanocontracts/fields/test_set_field.py @@ -16,8 +16,8 @@ from hathor.nanocontracts.catalog import NCBlueprintCatalog from hathor.nanocontracts.nc_types import VarInt32NCType from hathor.transaction import Block, Transaction -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder INT_NC_TYPE = VarInt32NCType() diff --git a/tests/nanocontracts/fields/test_storage_deque.py b/hathor_tests/nanocontracts/fields/test_storage_deque.py similarity index 99% rename from tests/nanocontracts/fields/test_storage_deque.py rename to hathor_tests/nanocontracts/fields/test_storage_deque.py index 9fb59d94d..5d69fe5c6 100644 --- a/tests/nanocontracts/fields/test_storage_deque.py +++ b/hathor_tests/nanocontracts/fields/test_storage_deque.py @@ -19,7 +19,7 @@ from hathor.nanocontracts.fields.container import ContainerLeaf from hathor.nanocontracts.fields.deque_container import DequeContainer, _DequeMetadata from hathor.nanocontracts.nc_types import Int32NCType, StrNCType -from tests.nanocontracts.fields.utils import MockNCStorage +from hathor_tests.nanocontracts.fields.utils import MockNCStorage INT_NC_TYPE = Int32NCType() STR_NC_TYPE = StrNCType() diff --git a/tests/nanocontracts/fields/test_storage_set.py b/hathor_tests/nanocontracts/fields/test_storage_set.py similarity index 98% rename from tests/nanocontracts/fields/test_storage_set.py rename to hathor_tests/nanocontracts/fields/test_storage_set.py index b1c1d8b61..5c5554457 100644 --- a/tests/nanocontracts/fields/test_storage_set.py +++ b/hathor_tests/nanocontracts/fields/test_storage_set.py @@ -19,7 +19,7 @@ from hathor.nanocontracts.fields.container import ContainerLeaf from hathor.nanocontracts.fields.set_container import SetContainer from hathor.nanocontracts.nc_types import Int32NCType -from tests.nanocontracts.fields.utils import MockNCStorage +from hathor_tests.nanocontracts.fields.utils import MockNCStorage INT_NC_TYPE = Int32NCType() diff --git a/tests/nanocontracts/fields/utils.py b/hathor_tests/nanocontracts/fields/utils.py similarity index 100% rename from tests/nanocontracts/fields/utils.py rename to hathor_tests/nanocontracts/fields/utils.py diff --git a/tests/nanocontracts/on_chain_blueprints/__init__.py b/hathor_tests/nanocontracts/on_chain_blueprints/__init__.py similarity index 100% rename from tests/nanocontracts/on_chain_blueprints/__init__.py rename to hathor_tests/nanocontracts/on_chain_blueprints/__init__.py diff --git a/tests/nanocontracts/on_chain_blueprints/bomb.zlib b/hathor_tests/nanocontracts/on_chain_blueprints/bomb.zlib similarity index 100% rename from tests/nanocontracts/on_chain_blueprints/bomb.zlib rename to hathor_tests/nanocontracts/on_chain_blueprints/bomb.zlib diff --git a/tests/nanocontracts/on_chain_blueprints/test_bet.py b/hathor_tests/nanocontracts/on_chain_blueprints/test_bet.py similarity index 100% rename from tests/nanocontracts/on_chain_blueprints/test_bet.py rename to hathor_tests/nanocontracts/on_chain_blueprints/test_bet.py diff --git a/tests/nanocontracts/on_chain_blueprints/test_custom_builtins.py b/hathor_tests/nanocontracts/on_chain_blueprints/test_custom_builtins.py similarity index 100% rename from tests/nanocontracts/on_chain_blueprints/test_custom_builtins.py rename to hathor_tests/nanocontracts/on_chain_blueprints/test_custom_builtins.py diff --git a/tests/nanocontracts/on_chain_blueprints/test_script_restrictions.py b/hathor_tests/nanocontracts/on_chain_blueprints/test_script_restrictions.py similarity index 99% rename from tests/nanocontracts/on_chain_blueprints/test_script_restrictions.py rename to hathor_tests/nanocontracts/on_chain_blueprints/test_script_restrictions.py index 63de0dc27..8c4eb2910 100644 --- a/tests/nanocontracts/on_chain_blueprints/test_script_restrictions.py +++ b/hathor_tests/nanocontracts/on_chain_blueprints/test_script_restrictions.py @@ -4,8 +4,8 @@ from hathor.exception import InvalidNewTransaction from hathor.nanocontracts import OnChainBlueprint from hathor.nanocontracts.exception import OCBInvalidScript -from tests import unittest -from tests.nanocontracts.on_chain_blueprints.utils import get_ocb_private_key +from hathor_tests import unittest +from hathor_tests.nanocontracts.on_chain_blueprints.utils import get_ocb_private_key def _load_file(filename: str) -> bytes: diff --git a/tests/nanocontracts/on_chain_blueprints/test_structure.py b/hathor_tests/nanocontracts/on_chain_blueprints/test_structure.py similarity index 100% rename from tests/nanocontracts/on_chain_blueprints/test_structure.py rename to hathor_tests/nanocontracts/on_chain_blueprints/test_structure.py diff --git a/tests/nanocontracts/on_chain_blueprints/utils.py b/hathor_tests/nanocontracts/on_chain_blueprints/utils.py similarity index 90% rename from tests/nanocontracts/on_chain_blueprints/utils.py rename to hathor_tests/nanocontracts/on_chain_blueprints/utils.py index 38072582b..4657461dc 100644 --- a/tests/nanocontracts/on_chain_blueprints/utils.py +++ b/hathor_tests/nanocontracts/on_chain_blueprints/utils.py @@ -1,7 +1,7 @@ from cryptography.hazmat.primitives.asymmetric import ec from hathor.wallet import KeyPair -from tests import unittest +from hathor_tests import unittest def get_ocb_private_key() -> ec.EllipticCurvePrivateKey: diff --git a/tests/nanocontracts/test_actions.py b/hathor_tests/nanocontracts/test_actions.py similarity index 99% rename from tests/nanocontracts/test_actions.py rename to hathor_tests/nanocontracts/test_actions.py index f74ccb5c1..485beabe5 100644 --- a/tests/nanocontracts/test_actions.py +++ b/hathor_tests/nanocontracts/test_actions.py @@ -32,9 +32,9 @@ from hathor.verification.nano_header_verifier import MAX_ACTIONS_LEN from hathor.verification.verification_params import VerificationParams from hathor.wallet import HDWallet -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder -from tests.nanocontracts.utils import assert_nc_failure_reason, set_nano_header +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.nanocontracts.utils import assert_nc_failure_reason, set_nano_header class MyBlueprint(Blueprint): diff --git a/tests/nanocontracts/test_actions_fee.py b/hathor_tests/nanocontracts/test_actions_fee.py similarity index 99% rename from tests/nanocontracts/test_actions_fee.py rename to hathor_tests/nanocontracts/test_actions_fee.py index 628d17549..033e35acc 100644 --- a/tests/nanocontracts/test_actions_fee.py +++ b/hathor_tests/nanocontracts/test_actions_fee.py @@ -8,9 +8,9 @@ from hathor.nanocontracts.types import ContractId, NCDepositAction, NCFee, NCWithdrawalAction, TokenUid, public from hathor.nanocontracts.utils import derive_child_token_id from hathor.transaction import Transaction -from tests.dag_builder.builder import TestDAGBuilder -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase -from tests.nanocontracts.test_reentrancy import HTR_TOKEN_UID +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.test_reentrancy import HTR_TOKEN_UID class MyBlueprint(Blueprint): diff --git a/tests/nanocontracts/test_address_example.py b/hathor_tests/nanocontracts/test_address_example.py similarity index 96% rename from tests/nanocontracts/test_address_example.py rename to hathor_tests/nanocontracts/test_address_example.py index a62568900..0eff88bc5 100644 --- a/tests/nanocontracts/test_address_example.py +++ b/hathor_tests/nanocontracts/test_address_example.py @@ -16,8 +16,8 @@ from hathor.nanocontracts import OnChainBlueprint from hathor.transaction import Block, Transaction from hathor.transaction.nc_execution_state import NCExecutionState -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder class TestAllFields(unittest.TestCase): diff --git a/tests/nanocontracts/test_all_fields.py b/hathor_tests/nanocontracts/test_all_fields.py similarity index 59% rename from tests/nanocontracts/test_all_fields.py rename to hathor_tests/nanocontracts/test_all_fields.py index ecafd2a96..7d22324e5 100644 --- a/tests/nanocontracts/test_all_fields.py +++ b/hathor_tests/nanocontracts/test_all_fields.py @@ -19,9 +19,9 @@ from hathor.nanocontracts.types import BlueprintId, VertexId, public from hathor.transaction import Block, Transaction from hathor.transaction.nc_execution_state import NCExecutionState -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder -from tests.nanocontracts.test_blueprints.all_fields import AllFieldsBlueprint +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.nanocontracts.test_blueprints.all_fields import AllFieldsBlueprint class TestAllFields(unittest.TestCase): @@ -156,3 +156,102 @@ def initialize(self, ctx: Context) -> None: context_exception = cm.exception.__context__ assert isinstance(context_exception, TypeError) assert context_exception.args[0] == r"type None is not supported by any NCType class" + + def test_no_dict_inside_tuple(self) -> None: + with self.assertRaises(BlueprintSyntaxError) as cm: + class MyInvalidBlueprint(Blueprint): + invalid_attribute: tuple[dict[str, int]] + + @public + def initialize(self, ctx: Context) -> None: + pass + + assert cm.exception.args[0] == 'unsupported field type: `invalid_attribute: tuple[dict[str, int]]`' + context_exception = cm.exception.__context__ + assert isinstance(context_exception, TypeError) + assert context_exception.args[0] == r"type dict[str, int] is not supported by any NCType class" + + def test_no_dict_inside_namedtuple(self) -> None: + from typing import NamedTuple + + class Inner(NamedTuple): + data: dict[str, int] + + with self.assertRaises(BlueprintSyntaxError) as cm: + class MyInvalidBlueprint(Blueprint): + invalid_attribute: Inner + + @public + def initialize(self, ctx: Context) -> None: + pass + + assert cm.exception.args[0] == 'unsupported field type: `invalid_attribute: Inner`' + context_exception = cm.exception.__context__ + assert isinstance(context_exception, TypeError) + assert context_exception.args[0] == r"type dict[str, int] is not supported by any NCType class" + + def test_no_list_inside_tuple(self) -> None: + with self.assertRaises(BlueprintSyntaxError) as cm: + class MyInvalidBlueprint(Blueprint): + invalid_attribute: tuple[list[int]] + + @public + def initialize(self, ctx: Context) -> None: + pass + + assert cm.exception.args[0] == 'unsupported field type: `invalid_attribute: tuple[list[int]]`' + context_exception = cm.exception.__context__ + assert isinstance(context_exception, TypeError) + assert context_exception.args[0] == r"type list[int] is not supported by any NCType class" + + def test_no_set_inside_tuple(self) -> None: + with self.assertRaises(BlueprintSyntaxError) as cm: + class MyInvalidBlueprint(Blueprint): + invalid_attribute: tuple[set[int]] + + @public + def initialize(self, ctx: Context) -> None: + pass + + assert cm.exception.args[0] == 'unsupported field type: `invalid_attribute: tuple[set[int]]`' + context_exception = cm.exception.__context__ + assert isinstance(context_exception, TypeError) + assert context_exception.args[0] == r"type set[int] is not supported by any NCType class" + + def test_no_list_inside_namedtuple(self) -> None: + from typing import NamedTuple + + class Inner(NamedTuple): + data: list[int] + + with self.assertRaises(BlueprintSyntaxError) as cm: + class MyInvalidBlueprint(Blueprint): + invalid_attribute: Inner + + @public + def initialize(self, ctx: Context) -> None: + pass + + assert cm.exception.args[0] == 'unsupported field type: `invalid_attribute: Inner`' + context_exception = cm.exception.__context__ + assert isinstance(context_exception, TypeError) + assert context_exception.args[0] == r"type list[int] is not supported by any NCType class" + + def test_no_set_inside_namedtuple(self) -> None: + from typing import NamedTuple + + class Inner(NamedTuple): + data: set[int] + + with self.assertRaises(BlueprintSyntaxError) as cm: + class MyInvalidBlueprint(Blueprint): + invalid_attribute: Inner + + @public + def initialize(self, ctx: Context) -> None: + pass + + assert cm.exception.args[0] == 'unsupported field type: `invalid_attribute: Inner`' + context_exception = cm.exception.__context__ + assert isinstance(context_exception, TypeError) + assert context_exception.args[0] == r"type set[int] is not supported by any NCType class" diff --git a/tests/nanocontracts/test_allowed_actions.py b/hathor_tests/nanocontracts/test_allowed_actions.py similarity index 98% rename from tests/nanocontracts/test_allowed_actions.py rename to hathor_tests/nanocontracts/test_allowed_actions.py index e726bf533..01d414522 100644 --- a/tests/nanocontracts/test_allowed_actions.py +++ b/hathor_tests/nanocontracts/test_allowed_actions.py @@ -28,7 +28,7 @@ NCWithdrawalAction, fallback, ) -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class MyBlueprint(Blueprint): diff --git a/tests/nanocontracts/test_authorities_call_another.py b/hathor_tests/nanocontracts/test_authorities_call_another.py similarity index 99% rename from tests/nanocontracts/test_authorities_call_another.py rename to hathor_tests/nanocontracts/test_authorities_call_another.py index f78fab524..0e075da2a 100644 --- a/tests/nanocontracts/test_authorities_call_another.py +++ b/hathor_tests/nanocontracts/test_authorities_call_another.py @@ -19,7 +19,7 @@ from hathor.nanocontracts.storage.contract_storage import Balance from hathor.nanocontracts.types import ContractId, NCAcquireAuthorityAction, NCAction, NCGrantAuthorityAction, TokenUid from hathor.transaction.token_info import TokenVersion -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class CalleeBlueprint(Blueprint): diff --git a/tests/nanocontracts/test_authorities_index.py b/hathor_tests/nanocontracts/test_authorities_index.py similarity index 98% rename from tests/nanocontracts/test_authorities_index.py rename to hathor_tests/nanocontracts/test_authorities_index.py index 9154b862e..8ce574ed9 100644 --- a/tests/nanocontracts/test_authorities_index.py +++ b/hathor_tests/nanocontracts/test_authorities_index.py @@ -23,9 +23,9 @@ from hathor.transaction.headers.nano_header import NanoHeaderAction from hathor.transaction.nc_execution_state import NCExecutionState from hathor.wallet import HDWallet -from tests.dag_builder.builder import TestDAGBuilder -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase -from tests.nanocontracts.utils import set_nano_header +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.utils import set_nano_header class MyBlueprint(Blueprint): diff --git a/tests/nanocontracts/test_balance_syscalls.py b/hathor_tests/nanocontracts/test_balance_syscalls.py similarity index 97% rename from tests/nanocontracts/test_balance_syscalls.py rename to hathor_tests/nanocontracts/test_balance_syscalls.py index 5aaaf52d0..e1d84bebe 100644 --- a/tests/nanocontracts/test_balance_syscalls.py +++ b/hathor_tests/nanocontracts/test_balance_syscalls.py @@ -13,7 +13,7 @@ # limitations under the License. from hathor import Blueprint, Context, ContractId, TokenUid, public -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class MyBlueprint(Blueprint): diff --git a/tests/nanocontracts/test_blueprint.py b/hathor_tests/nanocontracts/test_blueprint.py similarity index 99% rename from tests/nanocontracts/test_blueprint.py rename to hathor_tests/nanocontracts/test_blueprint.py index 2d02f968b..f340deb0f 100644 --- a/tests/nanocontracts/test_blueprint.py +++ b/hathor_tests/nanocontracts/test_blueprint.py @@ -4,7 +4,7 @@ from hathor.nanocontracts.nc_types import make_nc_type_for_arg_type as make_nc_type from hathor.nanocontracts.storage.contract_storage import Balance, BalanceKey from hathor.nanocontracts.types import Address, NCDepositAction, NCWithdrawalAction, TokenUid, public, view -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase STR_NC_TYPE = make_nc_type(str) BYTES_NC_TYPE = make_nc_type(bytes) diff --git a/tests/nanocontracts/test_blueprint_syntax.py b/hathor_tests/nanocontracts/test_blueprint_syntax.py similarity index 99% rename from tests/nanocontracts/test_blueprint_syntax.py rename to hathor_tests/nanocontracts/test_blueprint_syntax.py index 47870c3e6..d8ab62090 100644 --- a/tests/nanocontracts/test_blueprint_syntax.py +++ b/hathor_tests/nanocontracts/test_blueprint_syntax.py @@ -19,7 +19,7 @@ from hathor.nanocontracts import Blueprint, Context, public, view from hathor.nanocontracts.exception import BlueprintSyntaxError from hathor.nanocontracts.types import Address, NCArgs, fallback -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class TestBlueprintSyntax(BlueprintTestCase): diff --git a/tests/nanocontracts/test_blueprints/__init__.py b/hathor_tests/nanocontracts/test_blueprints/__init__.py similarity index 100% rename from tests/nanocontracts/test_blueprints/__init__.py rename to hathor_tests/nanocontracts/test_blueprints/__init__.py diff --git a/tests/nanocontracts/test_blueprints/address_example.py b/hathor_tests/nanocontracts/test_blueprints/address_example.py similarity index 100% rename from tests/nanocontracts/test_blueprints/address_example.py rename to hathor_tests/nanocontracts/test_blueprints/address_example.py diff --git a/tests/nanocontracts/test_blueprints/all_fields.py b/hathor_tests/nanocontracts/test_blueprints/all_fields.py similarity index 100% rename from tests/nanocontracts/test_blueprints/all_fields.py rename to hathor_tests/nanocontracts/test_blueprints/all_fields.py diff --git a/tests/nanocontracts/test_blueprints/bet.py b/hathor_tests/nanocontracts/test_blueprints/bet.py similarity index 100% rename from tests/nanocontracts/test_blueprints/bet.py rename to hathor_tests/nanocontracts/test_blueprints/bet.py diff --git a/tests/nanocontracts/test_blueprints/contract_accessor_blueprint.py b/hathor_tests/nanocontracts/test_blueprints/contract_accessor_blueprint.py similarity index 100% rename from tests/nanocontracts/test_blueprints/contract_accessor_blueprint.py rename to hathor_tests/nanocontracts/test_blueprints/contract_accessor_blueprint.py diff --git a/tests/nanocontracts/test_blueprints/swap_demo.py b/hathor_tests/nanocontracts/test_blueprints/swap_demo.py similarity index 100% rename from tests/nanocontracts/test_blueprints/swap_demo.py rename to hathor_tests/nanocontracts/test_blueprints/swap_demo.py diff --git a/tests/nanocontracts/test_blueprints/test_blueprint1.py b/hathor_tests/nanocontracts/test_blueprints/test_blueprint1.py similarity index 100% rename from tests/nanocontracts/test_blueprints/test_blueprint1.py rename to hathor_tests/nanocontracts/test_blueprints/test_blueprint1.py diff --git a/tests/nanocontracts/test_call_other_contract.py b/hathor_tests/nanocontracts/test_call_other_contract.py similarity index 99% rename from tests/nanocontracts/test_call_other_contract.py rename to hathor_tests/nanocontracts/test_call_other_contract.py index 9f1144a90..50f1c5d46 100644 --- a/tests/nanocontracts/test_call_other_contract.py +++ b/hathor_tests/nanocontracts/test_call_other_contract.py @@ -24,7 +24,7 @@ VertexId, ) from hathor.transaction.token_info import TokenVersion -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase COUNTER_NC_TYPE = make_nc_type(int) CONTRACT_NC_TYPE: NCType[ContractId | None] = make_nc_type(ContractId | None) # type: ignore[arg-type] diff --git a/tests/nanocontracts/test_caller_id.py b/hathor_tests/nanocontracts/test_caller_id.py similarity index 97% rename from tests/nanocontracts/test_caller_id.py rename to hathor_tests/nanocontracts/test_caller_id.py index 0d701434c..71c16ef89 100644 --- a/tests/nanocontracts/test_caller_id.py +++ b/hathor_tests/nanocontracts/test_caller_id.py @@ -14,7 +14,7 @@ from hathor.nanocontracts import Blueprint, Context, public from hathor.nanocontracts.types import Address, BlueprintId, CallerId, ContractId -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class MyBlueprint(Blueprint): diff --git a/tests/nanocontracts/test_consensus.py b/hathor_tests/nanocontracts/test_consensus.py similarity index 99% rename from tests/nanocontracts/test_consensus.py rename to hathor_tests/nanocontracts/test_consensus.py index a5007f9d1..82485ebfb 100644 --- a/tests/nanocontracts/test_consensus.py +++ b/hathor_tests/nanocontracts/test_consensus.py @@ -19,9 +19,9 @@ from hathor.transaction.nc_execution_state import NCExecutionState from hathor.types import VertexId from hathor.wallet.base_wallet import WalletOutputInfo -from tests.dag_builder.builder import TestDAGBuilder -from tests.simulation.base import SimulatorTestCase -from tests.utils import add_blocks_unlock_reward, add_custom_tx, create_tokens, gen_custom_base_tx +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.simulation.base import SimulatorTestCase +from hathor_tests.utils import add_blocks_unlock_reward, add_custom_tx, create_tokens, gen_custom_base_tx settings = HathorSettings() diff --git a/tests/nanocontracts/test_context.py b/hathor_tests/nanocontracts/test_context.py similarity index 96% rename from tests/nanocontracts/test_context.py rename to hathor_tests/nanocontracts/test_context.py index df1ec8d60..b5d9a4434 100644 --- a/tests/nanocontracts/test_context.py +++ b/hathor_tests/nanocontracts/test_context.py @@ -8,8 +8,8 @@ from hathor.transaction.base_transaction import TxVersion from hathor.transaction.scripts import parse_address_script from hathor.util import not_none -from tests.dag_builder.builder import TestDAGBuilder -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase GLOBAL_CTX_DATA: tuple[VertexData, BlockData] | None = None diff --git a/tests/nanocontracts/test_contract_accessor.py b/hathor_tests/nanocontracts/test_contract_accessor.py similarity index 98% rename from tests/nanocontracts/test_contract_accessor.py rename to hathor_tests/nanocontracts/test_contract_accessor.py index 3a8b9602a..cff5db9b1 100644 --- a/tests/nanocontracts/test_contract_accessor.py +++ b/hathor_tests/nanocontracts/test_contract_accessor.py @@ -20,8 +20,8 @@ from hathor.nanocontracts import HATHOR_TOKEN_UID, NCFail from hathor.nanocontracts.exception import NCInvalidMethodCall, NCViewMethodError from hathor.nanocontracts.types import NCDepositAction -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase -from tests.nanocontracts.test_blueprints import contract_accessor_blueprint +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.test_blueprints import contract_accessor_blueprint class TestContractAccessor(BlueprintTestCase): diff --git a/tests/nanocontracts/test_contract_create_contract.py b/hathor_tests/nanocontracts/test_contract_create_contract.py similarity index 99% rename from tests/nanocontracts/test_contract_create_contract.py rename to hathor_tests/nanocontracts/test_contract_create_contract.py index 18d7bc96f..1cd79b191 100644 --- a/tests/nanocontracts/test_contract_create_contract.py +++ b/hathor_tests/nanocontracts/test_contract_create_contract.py @@ -18,8 +18,8 @@ from hathor.transaction.headers.nano_header import NanoHeaderAction from hathor.transaction.nc_execution_state import NCExecutionState from hathor.transaction.token_creation_tx import TokenCreationTransaction -from tests.dag_builder.builder import TestDAGBuilder -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase INT_NC_TYPE = make_nc_type(int) CONTRACT_NC_TYPE: NCType[ContractId | None] = make_nc_type(ContractId | None) # type: ignore[arg-type] diff --git a/tests/nanocontracts/test_contract_upgrade.py b/hathor_tests/nanocontracts/test_contract_upgrade.py similarity index 99% rename from tests/nanocontracts/test_contract_upgrade.py rename to hathor_tests/nanocontracts/test_contract_upgrade.py index ea839e98d..966210cc4 100644 --- a/tests/nanocontracts/test_contract_upgrade.py +++ b/hathor_tests/nanocontracts/test_contract_upgrade.py @@ -3,7 +3,7 @@ from hathor.nanocontracts import Blueprint, Context, fallback, public from hathor.nanocontracts.exception import BlueprintDoesNotExist, NCFail, NCInvalidSyscall, NCMethodNotFound from hathor.nanocontracts.types import BlueprintId, ContractId, NCArgs -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class ProxyBlueprint(Blueprint): diff --git a/tests/nanocontracts/test_crypto_functions.py b/hathor_tests/nanocontracts/test_crypto_functions.py similarity index 97% rename from tests/nanocontracts/test_crypto_functions.py rename to hathor_tests/nanocontracts/test_crypto_functions.py index b5c44f993..b961cb137 100644 --- a/tests/nanocontracts/test_crypto_functions.py +++ b/hathor_tests/nanocontracts/test_crypto_functions.py @@ -21,7 +21,7 @@ from hathor.crypto.util import get_public_key_bytes_compressed from hathor.nanocontracts import Blueprint, Context, NCFail, public, utils as nc_utils, view -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class MyBlueprint(Blueprint): diff --git a/tests/nanocontracts/test_custom_import.py b/hathor_tests/nanocontracts/test_custom_import.py similarity index 98% rename from tests/nanocontracts/test_custom_import.py rename to hathor_tests/nanocontracts/test_custom_import.py index 9c41082b4..63c4f9610 100644 --- a/tests/nanocontracts/test_custom_import.py +++ b/hathor_tests/nanocontracts/test_custom_import.py @@ -18,7 +18,7 @@ from unittest.mock import ANY, Mock, call, patch from hathor.nanocontracts.custom_builtins import EXEC_BUILTINS -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class TestCustomImport(BlueprintTestCase): diff --git a/tests/nanocontracts/test_exceptions.py b/hathor_tests/nanocontracts/test_exceptions.py similarity index 100% rename from tests/nanocontracts/test_exceptions.py rename to hathor_tests/nanocontracts/test_exceptions.py diff --git a/tests/nanocontracts/test_execution_order.py b/hathor_tests/nanocontracts/test_execution_order.py similarity index 99% rename from tests/nanocontracts/test_execution_order.py rename to hathor_tests/nanocontracts/test_execution_order.py index 8374498a6..7e0bd0fa3 100644 --- a/tests/nanocontracts/test_execution_order.py +++ b/hathor_tests/nanocontracts/test_execution_order.py @@ -22,7 +22,7 @@ TokenUid, ) from hathor.transaction.token_info import TokenVersion -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class MyBlueprint(Blueprint): diff --git a/tests/nanocontracts/test_execution_verification.py b/hathor_tests/nanocontracts/test_execution_verification.py similarity index 97% rename from tests/nanocontracts/test_execution_verification.py rename to hathor_tests/nanocontracts/test_execution_verification.py index 506f6d418..d08a8ce37 100644 --- a/tests/nanocontracts/test_execution_verification.py +++ b/hathor_tests/nanocontracts/test_execution_verification.py @@ -25,7 +25,7 @@ ) from hathor.nanocontracts.method import ArgsOnly from hathor.nanocontracts.types import NCRawArgs -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class MyBlueprint(Blueprint): diff --git a/tests/nanocontracts/test_exposed_properties.py b/hathor_tests/nanocontracts/test_exposed_properties.py similarity index 99% rename from tests/nanocontracts/test_exposed_properties.py rename to hathor_tests/nanocontracts/test_exposed_properties.py index f9dbb6974..9e4764cfd 100644 --- a/tests/nanocontracts/test_exposed_properties.py +++ b/hathor_tests/nanocontracts/test_exposed_properties.py @@ -6,7 +6,7 @@ from hathor.nanocontracts import Blueprint, Context, public from hathor.nanocontracts.allowed_imports import ALLOWED_IMPORTS from hathor.nanocontracts.custom_builtins import EXEC_BUILTINS -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase MAX_DEPTH = 20 NEW_PROP_NAME = 'some_new_attribute' diff --git a/tests/nanocontracts/test_fallback_method.py b/hathor_tests/nanocontracts/test_fallback_method.py similarity index 97% rename from tests/nanocontracts/test_fallback_method.py rename to hathor_tests/nanocontracts/test_fallback_method.py index 31989bbf9..0a7d6deb9 100644 --- a/tests/nanocontracts/test_fallback_method.py +++ b/hathor_tests/nanocontracts/test_fallback_method.py @@ -24,9 +24,9 @@ from hathor.nanocontracts.runner.call_info import CallType from hathor.nanocontracts.types import ContractId, NCArgs, NCDepositAction, NCParsedArgs, NCRawArgs, TokenUid, fallback from hathor.transaction import Block, Transaction -from tests.dag_builder.builder import TestDAGBuilder -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase -from tests.nanocontracts.utils import assert_nc_failure_reason +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.utils import assert_nc_failure_reason # TODO: Test support for container args/kwargs such as list[int] after Jan's PR diff --git a/tests/nanocontracts/test_faux_immutability.py b/hathor_tests/nanocontracts/test_faux_immutability.py similarity index 100% rename from tests/nanocontracts/test_faux_immutability.py rename to hathor_tests/nanocontracts/test_faux_immutability.py diff --git a/tests/nanocontracts/test_fee_tokens.py b/hathor_tests/nanocontracts/test_fee_tokens.py similarity index 98% rename from tests/nanocontracts/test_fee_tokens.py rename to hathor_tests/nanocontracts/test_fee_tokens.py index b14161b85..b3ac950b7 100644 --- a/tests/nanocontracts/test_fee_tokens.py +++ b/hathor_tests/nanocontracts/test_fee_tokens.py @@ -24,9 +24,9 @@ from hathor.transaction.headers.nano_header import NanoHeaderAction from hathor.transaction.nc_execution_state import NCExecutionState from hathor.transaction.scripts import Opcode -from tests.dag_builder.builder import TestDAGBuilder -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase -from tests.nanocontracts.utils import assert_nc_failure_reason +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.utils import assert_nc_failure_reason class MyBlueprint(Blueprint): diff --git a/tests/nanocontracts/test_follow_up_call.py b/hathor_tests/nanocontracts/test_follow_up_call.py similarity index 98% rename from tests/nanocontracts/test_follow_up_call.py rename to hathor_tests/nanocontracts/test_follow_up_call.py index 67cfaaf35..830cded6a 100644 --- a/tests/nanocontracts/test_follow_up_call.py +++ b/hathor_tests/nanocontracts/test_follow_up_call.py @@ -16,7 +16,7 @@ from hathor.nanocontracts import Blueprint, Context, NCFail, public, view from hathor.nanocontracts.types import ContractId -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class MyBlueprint1(Blueprint): diff --git a/tests/nanocontracts/test_get_contract.py b/hathor_tests/nanocontracts/test_get_contract.py similarity index 98% rename from tests/nanocontracts/test_get_contract.py rename to hathor_tests/nanocontracts/test_get_contract.py index 3adb2f6d1..f2cbde38c 100644 --- a/tests/nanocontracts/test_get_contract.py +++ b/hathor_tests/nanocontracts/test_get_contract.py @@ -8,7 +8,7 @@ from hathor.transaction import BaseTransaction from hathor.util import not_none from hathor.wallet import KeyPair -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase settings = HathorSettings() diff --git a/tests/nanocontracts/test_indexes.py b/hathor_tests/nanocontracts/test_indexes.py similarity index 97% rename from tests/nanocontracts/test_indexes.py rename to hathor_tests/nanocontracts/test_indexes.py index 0e54c0eb0..4db47dc6e 100644 --- a/tests/nanocontracts/test_indexes.py +++ b/hathor_tests/nanocontracts/test_indexes.py @@ -12,9 +12,9 @@ from hathor.transaction import BaseTransaction, Transaction, TxOutput from hathor.transaction.headers.nano_header import NanoHeaderAction from hathor.types import AddressB58 -from tests.dag_builder.builder import TestDAGBuilder -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase -from tests.simulation.base import SimulatorTestCase +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.simulation.base import SimulatorTestCase settings = HathorSettings() diff --git a/tests/nanocontracts/test_indexes2.py b/hathor_tests/nanocontracts/test_indexes2.py similarity index 95% rename from tests/nanocontracts/test_indexes2.py rename to hathor_tests/nanocontracts/test_indexes2.py index 0d4b35db7..f12aeaaac 100644 --- a/tests/nanocontracts/test_indexes2.py +++ b/hathor_tests/nanocontracts/test_indexes2.py @@ -18,8 +18,8 @@ from hathor.transaction import Transaction from hathor.transaction.nc_execution_state import NCExecutionState from hathor.transaction.util import get_deposit_token_deposit_amount -from tests.dag_builder.builder import TestDAGBuilder -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class MyBlueprint(Blueprint): diff --git a/tests/nanocontracts/test_initialize_method_accessor.py b/hathor_tests/nanocontracts/test_initialize_method_accessor.py similarity index 98% rename from tests/nanocontracts/test_initialize_method_accessor.py rename to hathor_tests/nanocontracts/test_initialize_method_accessor.py index 82f118650..885318b32 100644 --- a/tests/nanocontracts/test_initialize_method_accessor.py +++ b/hathor_tests/nanocontracts/test_initialize_method_accessor.py @@ -18,7 +18,7 @@ from hathor import HATHOR_TOKEN_UID, Blueprint, BlueprintId, Context, NCDepositAction, NCFail, public, view from hathor.nanocontracts.exception import NCViewMethodError -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class MyBlueprint1(Blueprint): diff --git a/tests/nanocontracts/test_invalid_value_assignment.py b/hathor_tests/nanocontracts/test_invalid_value_assignment.py similarity index 95% rename from tests/nanocontracts/test_invalid_value_assignment.py rename to hathor_tests/nanocontracts/test_invalid_value_assignment.py index 9de4c2165..3bf3a12a0 100644 --- a/tests/nanocontracts/test_invalid_value_assignment.py +++ b/hathor_tests/nanocontracts/test_invalid_value_assignment.py @@ -3,7 +3,7 @@ from hathor.nanocontracts.exception import NCFail from hathor.nanocontracts.nc_types import make_nc_type_for_arg_type as make_nc_type from hathor.nanocontracts.types import ContractId, TokenUid, VertexId -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase settings = HathorSettings() diff --git a/tests/nanocontracts/test_method_parser.py b/hathor_tests/nanocontracts/test_method_parser.py similarity index 99% rename from tests/nanocontracts/test_method_parser.py rename to hathor_tests/nanocontracts/test_method_parser.py index 752832cbf..f3cd76d4a 100644 --- a/tests/nanocontracts/test_method_parser.py +++ b/hathor_tests/nanocontracts/test_method_parser.py @@ -8,7 +8,7 @@ from hathor.nanocontracts.exception import NCFail, NCSerializationArgTooLong from hathor.nanocontracts.method import MAX_BYTES_SERIALIZED_ARG, Method from hathor.nanocontracts.types import SignedData, public -from tests import unittest +from hathor_tests import unittest T = TypeVar('T') diff --git a/tests/nanocontracts/test_nano_feature_activation.py b/hathor_tests/nanocontracts/test_nano_feature_activation.py similarity index 95% rename from tests/nanocontracts/test_nano_feature_activation.py rename to hathor_tests/nanocontracts/test_nano_feature_activation.py index 075daedb3..1687c0630 100644 --- a/tests/nanocontracts/test_nano_feature_activation.py +++ b/hathor_tests/nanocontracts/test_nano_feature_activation.py @@ -23,10 +23,10 @@ from hathor.feature_activation.settings import Settings as FeatureSettings from hathor.nanocontracts import Blueprint, Context, public from hathor.nanocontracts.types import BlueprintId -from hathor.transaction import Block, Transaction +from hathor.transaction import Block, Transaction, Vertex from hathor.transaction.nc_execution_state import NCExecutionState -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder class MyBluprint(Blueprint): @@ -228,28 +228,28 @@ def test_activation(self) -> None: assert a11.get_metadata().nc_block_root_id == self.empty_root_id assert a12.get_metadata().nc_block_root_id == self.empty_root_id - nc1._metadata = None + self._reset_vertex(nc1) self.vertex_handler.on_new_relayed_vertex(nc1) assert nc1.get_metadata().validation.is_valid() assert nc1.get_metadata().voided_by is None assert self.manager.tx_storage.transaction_exists(nc1.hash) assert nc1 in list(self.manager.tx_storage.iter_mempool_tips_from_best_index()) - ocb1._metadata = None + self._reset_vertex(ocb1) self.vertex_handler.on_new_relayed_vertex(ocb1) assert ocb1.get_metadata().validation.is_valid() assert ocb1.get_metadata().voided_by is None assert self.manager.tx_storage.transaction_exists(ocb1.hash) assert ocb1 in list(self.manager.tx_storage.iter_mempool_tips_from_best_index()) - fbt._metadata = None + self._reset_vertex(fbt) self.vertex_handler.on_new_relayed_vertex(fbt) assert fbt.get_metadata().validation.is_valid() assert fbt.get_metadata().voided_by is None assert self.manager.tx_storage.transaction_exists(fbt.hash) assert fbt in list(self.manager.tx_storage.iter_mempool_tips_from_best_index()) - tx1._metadata = None + self._reset_vertex(tx1) self.vertex_handler.on_new_relayed_vertex(tx1) assert tx1.get_metadata().validation.is_valid() assert tx1.get_metadata().voided_by is None @@ -264,3 +264,9 @@ def test_activation(self) -> None: assert a11.get_metadata().nc_block_root_id == self.empty_root_id assert a12.get_metadata().nc_block_root_id == self.empty_root_id assert a13.get_metadata().nc_block_root_id not in (self.empty_root_id, None) + + def _reset_vertex(self, vertex: Vertex) -> None: + assert vertex.storage is not None + vertex._metadata = None + for child in vertex.get_children(): + vertex.storage.vertex_children.remove_child(vertex, child) diff --git a/tests/nanocontracts/test_nanocontract.py b/hathor_tests/nanocontracts/test_nanocontract.py similarity index 99% rename from tests/nanocontracts/test_nanocontract.py rename to hathor_tests/nanocontracts/test_nanocontract.py index 51560fec0..2ca8c3271 100644 --- a/tests/nanocontracts/test_nanocontract.py +++ b/hathor_tests/nanocontracts/test_nanocontract.py @@ -40,7 +40,7 @@ from hathor.transaction.validation_state import ValidationState from hathor.verification.nano_header_verifier import MAX_NC_SCRIPT_SIGOPS_COUNT, MAX_NC_SCRIPT_SIZE from hathor.wallet import KeyPair -from tests import unittest +from hathor_tests import unittest STR_NC_TYPE = make_nc_type(str) INT_NC_TYPE = make_nc_type(int) diff --git a/tests/nanocontracts/test_nc_exec_logs.py b/hathor_tests/nanocontracts/test_nc_exec_logs.py similarity index 99% rename from tests/nanocontracts/test_nc_exec_logs.py rename to hathor_tests/nanocontracts/test_nc_exec_logs.py index 876bc27b1..f5972a3f8 100644 --- a/tests/nanocontracts/test_nc_exec_logs.py +++ b/hathor_tests/nanocontracts/test_nc_exec_logs.py @@ -28,8 +28,8 @@ from hathor.nanocontracts.types import ContractId, NCDepositAction, TokenUid, view from hathor.transaction import Block, Transaction from hathor.util import not_none -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder MY_BLUEPRINT1_ID: bytes = b'\x11' * 32 MY_BLUEPRINT2_ID: bytes = b'\x22' * 32 diff --git a/tests/nanocontracts/test_patricia_trie.py b/hathor_tests/nanocontracts/test_patricia_trie.py similarity index 99% rename from tests/nanocontracts/test_patricia_trie.py rename to hathor_tests/nanocontracts/test_patricia_trie.py index b5f61079d..25599f091 100644 --- a/tests/nanocontracts/test_patricia_trie.py +++ b/hathor_tests/nanocontracts/test_patricia_trie.py @@ -6,7 +6,7 @@ from hathor.nanocontracts.storage.backends import RocksDBNodeTrieStore from hathor.nanocontracts.storage.patricia_trie import Node, PatriciaTrie from hathor.storage.rocksdb_storage import RocksDBStorage -from tests import unittest +from hathor_tests import unittest def export_trie_outline(trie: PatriciaTrie, *, node: Optional[Node] = None) -> tuple[bytes, Optional[bytes], dict]: diff --git a/tests/nanocontracts/test_proxy_accessor.py b/hathor_tests/nanocontracts/test_proxy_accessor.py similarity index 99% rename from tests/nanocontracts/test_proxy_accessor.py rename to hathor_tests/nanocontracts/test_proxy_accessor.py index 3c347def0..b75c32e44 100644 --- a/tests/nanocontracts/test_proxy_accessor.py +++ b/hathor_tests/nanocontracts/test_proxy_accessor.py @@ -30,7 +30,7 @@ view, ) from hathor.nanocontracts.exception import NCInvalidMethodCall, NCInvalidSyscall, NCViewMethodError -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class MyBlueprint1(Blueprint): diff --git a/tests/nanocontracts/test_reentrancy.py b/hathor_tests/nanocontracts/test_reentrancy.py similarity index 99% rename from tests/nanocontracts/test_reentrancy.py rename to hathor_tests/nanocontracts/test_reentrancy.py index 8d68ca43a..f1cc2dcdb 100644 --- a/tests/nanocontracts/test_reentrancy.py +++ b/hathor_tests/nanocontracts/test_reentrancy.py @@ -1,7 +1,7 @@ from hathor.nanocontracts import Blueprint, Context, NCFail, public from hathor.nanocontracts.exception import NCForbiddenReentrancy from hathor.nanocontracts.types import Amount, CallerId, ContractId, NCAction, NCDepositAction, TokenUid -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase HTR_TOKEN_UID = TokenUid(b'\0') diff --git a/tests/nanocontracts/test_restricted_ocb.py b/hathor_tests/nanocontracts/test_restricted_ocb.py similarity index 98% rename from tests/nanocontracts/test_restricted_ocb.py rename to hathor_tests/nanocontracts/test_restricted_ocb.py index 05d63a215..cd167238a 100644 --- a/tests/nanocontracts/test_restricted_ocb.py +++ b/hathor_tests/nanocontracts/test_restricted_ocb.py @@ -22,8 +22,8 @@ from hathor.transaction import Transaction from hathor.util import not_none from hathor.wallet import KeyPair -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder class TestRestrictedOCB(unittest.TestCase): diff --git a/tests/nanocontracts/test_rng.py b/hathor_tests/nanocontracts/test_rng.py similarity index 99% rename from tests/nanocontracts/test_rng.py rename to hathor_tests/nanocontracts/test_rng.py index 6e067afd6..59e4a6785 100644 --- a/tests/nanocontracts/test_rng.py +++ b/hathor_tests/nanocontracts/test_rng.py @@ -10,8 +10,8 @@ from hathor.nanocontracts.rng import NanoRNG from hathor.nanocontracts.types import ContractId from hathor.transaction import Transaction -from tests.dag_builder.builder import TestDAGBuilder -from tests.simulation.base import SimulatorTestCase +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.simulation.base import SimulatorTestCase settings = HathorSettings() diff --git a/tests/nanocontracts/test_seqnum.py b/hathor_tests/nanocontracts/test_seqnum.py similarity index 98% rename from tests/nanocontracts/test_seqnum.py rename to hathor_tests/nanocontracts/test_seqnum.py index 5d58c3230..880350bc0 100644 --- a/tests/nanocontracts/test_seqnum.py +++ b/hathor_tests/nanocontracts/test_seqnum.py @@ -2,9 +2,9 @@ from hathor.nanocontracts.exception import NCFail from hathor.transaction import Block, Transaction from hathor.transaction.nc_execution_state import NCExecutionState -from tests.dag_builder.builder import TestDAGBuilder -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase -from tests.nanocontracts.utils import assert_nc_failure_reason +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.utils import assert_nc_failure_reason class MyBlueprint1(Blueprint): diff --git a/tests/nanocontracts/test_serializer.py b/hathor_tests/nanocontracts/test_serializer.py similarity index 99% rename from tests/nanocontracts/test_serializer.py rename to hathor_tests/nanocontracts/test_serializer.py index 35975f3c9..b5dd3451b 100644 --- a/tests/nanocontracts/test_serializer.py +++ b/hathor_tests/nanocontracts/test_serializer.py @@ -2,7 +2,7 @@ from hathor.nanocontracts.nc_types import NCType, make_nc_type_for_arg_type as make_nc_type from hathor.nanocontracts.types import SignedData -from tests import unittest +from hathor_tests import unittest T = TypeVar('T') diff --git a/tests/nanocontracts/test_sorter.py b/hathor_tests/nanocontracts/test_sorter.py similarity index 98% rename from tests/nanocontracts/test_sorter.py rename to hathor_tests/nanocontracts/test_sorter.py index c51d79fab..d8a5ec274 100644 --- a/tests/nanocontracts/test_sorter.py +++ b/hathor_tests/nanocontracts/test_sorter.py @@ -1,8 +1,8 @@ from hathor.nanocontracts.sorter.random_sorter import NCBlockSorter from hathor.transaction import Transaction from hathor.types import VertexId -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder class NCBlockSorterTestCase(unittest.TestCase): diff --git a/tests/nanocontracts/test_storage.py b/hathor_tests/nanocontracts/test_storage.py similarity index 99% rename from tests/nanocontracts/test_storage.py rename to hathor_tests/nanocontracts/test_storage.py index c2b0e546f..390c9fc57 100644 --- a/tests/nanocontracts/test_storage.py +++ b/hathor_tests/nanocontracts/test_storage.py @@ -4,7 +4,7 @@ from hathor.nanocontracts.nc_types import NCType, NullNCType, make_nc_type_for_arg_type as make_nc_type from hathor.nanocontracts.storage import NCChangesTracker from hathor.nanocontracts.types import Amount, ContractId, Timestamp, VertexId -from tests import unittest +from hathor_tests import unittest T = TypeVar('T') diff --git a/tests/nanocontracts/test_syscalls.py b/hathor_tests/nanocontracts/test_syscalls.py similarity index 99% rename from tests/nanocontracts/test_syscalls.py rename to hathor_tests/nanocontracts/test_syscalls.py index 0a3e90f97..67323af04 100644 --- a/tests/nanocontracts/test_syscalls.py +++ b/hathor_tests/nanocontracts/test_syscalls.py @@ -20,7 +20,7 @@ public, ) from hathor.transaction.token_info import TokenVersion -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase CONTRACT_NC_TYPE = make_nc_type(ContractId) BLUEPRINT_NC_TYPE = make_nc_type(BlueprintId) diff --git a/tests/nanocontracts/test_syscalls_in_view.py b/hathor_tests/nanocontracts/test_syscalls_in_view.py similarity index 99% rename from tests/nanocontracts/test_syscalls_in_view.py rename to hathor_tests/nanocontracts/test_syscalls_in_view.py index 71a90ad5e..440ecf29c 100644 --- a/tests/nanocontracts/test_syscalls_in_view.py +++ b/hathor_tests/nanocontracts/test_syscalls_in_view.py @@ -18,7 +18,7 @@ from hathor.nanocontracts.blueprint_env import BlueprintEnvironment from hathor.nanocontracts.exception import NCViewMethodError from hathor.nanocontracts.types import BlueprintId, ContractId, TokenUid, VertexId -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class DirectSyscalls(Blueprint): diff --git a/tests/nanocontracts/test_token_creation.py b/hathor_tests/nanocontracts/test_token_creation.py similarity index 97% rename from tests/nanocontracts/test_token_creation.py rename to hathor_tests/nanocontracts/test_token_creation.py index 969b01006..f7cdfa4b8 100644 --- a/tests/nanocontracts/test_token_creation.py +++ b/hathor_tests/nanocontracts/test_token_creation.py @@ -12,9 +12,9 @@ from hathor.transaction import Block, Transaction from hathor.transaction.nc_execution_state import NCExecutionState from hathor.transaction.token_info import TokenDescription, TokenVersion -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder -from tests.nanocontracts.utils import assert_nc_failure_reason +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.nanocontracts.utils import assert_nc_failure_reason settings = HathorSettings() @@ -211,7 +211,7 @@ def test_token_creation_by_contract(self) -> None: b31, b32 = vertices.get_typed_vertices(['b31', 'b32'], Block) # Uncomment for debugging: - # from tests.nanocontracts.utils import get_nc_failure_entry + # from hathor_tests.nanocontracts.utils import get_nc_failure_entry # failure_entry = get_nc_failure_entry(manager=self.manager, tx_id=tx2.hash, block_id=b31.hash) # print(failure_entry.error_traceback) diff --git a/tests/nanocontracts/test_token_creation2.py b/hathor_tests/nanocontracts/test_token_creation2.py similarity index 98% rename from tests/nanocontracts/test_token_creation2.py rename to hathor_tests/nanocontracts/test_token_creation2.py index f50ece200..1b18ab0ee 100644 --- a/tests/nanocontracts/test_token_creation2.py +++ b/hathor_tests/nanocontracts/test_token_creation2.py @@ -17,8 +17,8 @@ from hathor.transaction import Block, Transaction, TxOutput from hathor.transaction.headers.nano_header import NanoHeaderAction from hathor.transaction.nc_execution_state import NCExecutionState -from tests.dag_builder.builder import TestDAGBuilder -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class MyBlueprint(Blueprint): diff --git a/tests/nanocontracts/test_types.py b/hathor_tests/nanocontracts/test_types.py similarity index 98% rename from tests/nanocontracts/test_types.py rename to hathor_tests/nanocontracts/test_types.py index 3bbea685e..403e09a0e 100644 --- a/tests/nanocontracts/test_types.py +++ b/hathor_tests/nanocontracts/test_types.py @@ -1,6 +1,6 @@ from hathor.nanocontracts.types import ContractId, SignedData, VertexId from hathor.transaction.scripts import P2PKH -from tests import unittest +from hathor_tests import unittest class BaseNanoContractTestCase(unittest.TestCase): diff --git a/tests/nanocontracts/test_types_across_contracts.py b/hathor_tests/nanocontracts/test_types_across_contracts.py similarity index 98% rename from tests/nanocontracts/test_types_across_contracts.py rename to hathor_tests/nanocontracts/test_types_across_contracts.py index 865ea3770..353131401 100644 --- a/tests/nanocontracts/test_types_across_contracts.py +++ b/hathor_tests/nanocontracts/test_types_across_contracts.py @@ -16,7 +16,7 @@ from hathor.nanocontracts import Blueprint, Context, NCFail, public from hathor.nanocontracts.types import ContractId, NCArgs, fallback, view -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class MyBlueprint(Blueprint): diff --git a/tests/nanocontracts/test_violations.py b/hathor_tests/nanocontracts/test_violations.py similarity index 97% rename from tests/nanocontracts/test_violations.py rename to hathor_tests/nanocontracts/test_violations.py index 7cc094656..58cf34b1d 100644 --- a/tests/nanocontracts/test_violations.py +++ b/hathor_tests/nanocontracts/test_violations.py @@ -2,7 +2,7 @@ from hathor.nanocontracts.context import Context from hathor.nanocontracts.exception import NCFail from hathor.nanocontracts.types import NCDepositAction -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class MyBlueprint(Blueprint): diff --git a/tests/nanocontracts/test_voided_contract_serialization.py b/hathor_tests/nanocontracts/test_voided_contract_serialization.py similarity index 95% rename from tests/nanocontracts/test_voided_contract_serialization.py rename to hathor_tests/nanocontracts/test_voided_contract_serialization.py index 5d5974af4..692aa19f1 100644 --- a/tests/nanocontracts/test_voided_contract_serialization.py +++ b/hathor_tests/nanocontracts/test_voided_contract_serialization.py @@ -2,8 +2,8 @@ from hathor.nanocontracts.exception import NCFail from hathor.transaction import Block, Transaction from hathor.transaction.nc_execution_state import NCExecutionState -from tests.dag_builder.builder import TestDAGBuilder -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class FailingInitializeBlueprint(Blueprint): diff --git a/tests/nanocontracts/utils.py b/hathor_tests/nanocontracts/utils.py similarity index 100% rename from tests/nanocontracts/utils.py rename to hathor_tests/nanocontracts/utils.py diff --git a/tests/others/__init__.py b/hathor_tests/others/__init__.py similarity index 100% rename from tests/others/__init__.py rename to hathor_tests/others/__init__.py diff --git a/tests/others/fixtures/invalid_byte_hathor_settings_fixture.yml b/hathor_tests/others/fixtures/invalid_byte_hathor_settings_fixture.yml similarity index 100% rename from tests/others/fixtures/invalid_byte_hathor_settings_fixture.yml rename to hathor_tests/others/fixtures/invalid_byte_hathor_settings_fixture.yml diff --git a/tests/others/fixtures/invalid_features_hathor_settings_fixture.yml b/hathor_tests/others/fixtures/invalid_features_hathor_settings_fixture.yml similarity index 100% rename from tests/others/fixtures/invalid_features_hathor_settings_fixture.yml rename to hathor_tests/others/fixtures/invalid_features_hathor_settings_fixture.yml diff --git a/tests/others/fixtures/missing_hathor_settings_fixture.yml b/hathor_tests/others/fixtures/missing_hathor_settings_fixture.yml similarity index 100% rename from tests/others/fixtures/missing_hathor_settings_fixture.yml rename to hathor_tests/others/fixtures/missing_hathor_settings_fixture.yml diff --git a/tests/others/fixtures/valid_hathor_settings_fixture.yml b/hathor_tests/others/fixtures/valid_hathor_settings_fixture.yml similarity index 100% rename from tests/others/fixtures/valid_hathor_settings_fixture.yml rename to hathor_tests/others/fixtures/valid_hathor_settings_fixture.yml diff --git a/tests/others/test_api_utils.py b/hathor_tests/others/test_api_utils.py similarity index 100% rename from tests/others/test_api_utils.py rename to hathor_tests/others/test_api_utils.py diff --git a/tests/others/test_bfs_regression.py b/hathor_tests/others/test_bfs_regression.py similarity index 98% rename from tests/others/test_bfs_regression.py rename to hathor_tests/others/test_bfs_regression.py index 80979e7bc..971724859 100644 --- a/tests/others/test_bfs_regression.py +++ b/hathor_tests/others/test_bfs_regression.py @@ -14,8 +14,8 @@ from hathor.daa import DifficultyAdjustmentAlgorithm, TestMode from hathor.transaction import Block, Transaction -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder class TestBfsRegression(unittest.TestCase): diff --git a/tests/others/test_builder.py b/hathor_tests/others/test_builder.py similarity index 85% rename from tests/others/test_builder.py rename to hathor_tests/others/test_builder.py index 91f274d12..0dad5bf4f 100644 --- a/tests/others/test_builder.py +++ b/hathor_tests/others/test_builder.py @@ -1,5 +1,5 @@ -from tests import unittest -from tests.unittest import TestBuilder +from hathor_tests import unittest +from hathor_tests.unittest import TestBuilder class BuilderTestCase(unittest.TestCase): diff --git a/tests/others/test_cli_builder.py b/hathor_tests/others/test_cli_builder.py similarity index 96% rename from tests/others/test_cli_builder.py rename to hathor_tests/others/test_cli_builder.py index 29d4e65b6..b6e236d75 100644 --- a/tests/others/test_cli_builder.py +++ b/hathor_tests/others/test_cli_builder.py @@ -1,7 +1,6 @@ from unittest.mock import Mock -from hathor.builder import CliBuilder, ResourcesBuilder -from hathor.cli.run_node_args import RunNodeArgs +from hathor.builder import ResourcesBuilder from hathor.event import EventManager from hathor.event.storage import EventRocksDBStorage from hathor.event.websocket import EventWebsocketFactory @@ -11,7 +10,9 @@ from hathor.p2p.sync_version import SyncVersion from hathor.transaction.storage import TransactionCacheStorage, TransactionRocksDBStorage from hathor.wallet import HDWallet, Wallet -from tests import unittest +from hathor_cli.builder import CliBuilder +from hathor_cli.run_node_args import RunNodeArgs +from hathor_tests import unittest class BuilderTestCase(unittest.TestCase): @@ -20,7 +21,7 @@ def setUp(self): self.reactor = self.clock - from hathor.cli.run_node import RunNode + from hathor_cli.run_node import RunNode self.parser = RunNode.create_parser() def _build_with_error(self, cmd_args: list[str], err_msg: str) -> None: diff --git a/tests/others/test_hathor_settings.py b/hathor_tests/others/test_hathor_settings.py similarity index 100% rename from tests/others/test_hathor_settings.py rename to hathor_tests/others/test_hathor_settings.py diff --git a/tests/others/test_init_manager.py b/hathor_tests/others/test_init_manager.py similarity index 96% rename from tests/others/test_init_manager.py rename to hathor_tests/others/test_init_manager.py index 2e315964f..762c812d3 100644 --- a/tests/others/test_init_manager.py +++ b/hathor_tests/others/test_init_manager.py @@ -6,10 +6,11 @@ from hathor.storage import RocksDBStorage from hathor.transaction import BaseTransaction from hathor.transaction.storage import TransactionRocksDBStorage +from hathor.transaction.vertex_children import RocksDBVertexChildrenService from hathor.transaction.vertex_parser import VertexParser -from tests import unittest -from tests.unittest import TestBuilder -from tests.utils import add_blocks_unlock_reward, add_new_double_spending, add_new_transactions +from hathor_tests import unittest +from hathor_tests.unittest import TestBuilder +from hathor_tests.utils import add_blocks_unlock_reward, add_new_double_spending, add_new_transactions class ModifiedTransactionRocksDBStorage(TransactionRocksDBStorage): @@ -22,6 +23,7 @@ def __init__(self, path: str, settings: HathorSettings): settings=settings, vertex_parser=VertexParser(settings=settings), nc_storage_factory=nc_storage_factory, + vertex_children_service=RocksDBVertexChildrenService(rocksdb_storage), ) self._first_tx: BaseTransaction | None = None diff --git a/tests/others/test_metrics.py b/hathor_tests/others/test_metrics.py similarity index 96% rename from tests/others/test_metrics.py rename to hathor_tests/others/test_metrics.py index e4c6decd2..639cdb26b 100644 --- a/tests/others/test_metrics.py +++ b/hathor_tests/others/test_metrics.py @@ -9,9 +9,10 @@ from hathor.pubsub import HathorEvents from hathor.simulator.utils import add_new_blocks from hathor.transaction.storage import TransactionCacheStorage, TransactionRocksDBStorage +from hathor.transaction.vertex_children import RocksDBVertexChildrenService from hathor.transaction.vertex_parser import VertexParser from hathor.wallet import Wallet -from tests import unittest +from hathor_tests import unittest class MetricsTest(unittest.TestCase): @@ -117,6 +118,7 @@ def _init_manager(path: tempfile.TemporaryDirectory | None = None) -> HathorMana b'timestamp-sorted-blocks': 0.0, b'timestamp-sorted-txs': 0.0, b'nc-state': 0.0, + b'vertex-children': 0.0, }) manager.tx_storage.pre_init() @@ -177,6 +179,7 @@ def _init_manager(path: tempfile.TemporaryDirectory | None = None) -> HathorMana b'timestamp-sorted-blocks': 0.0, b'timestamp-sorted-txs': 0.0, b'nc-state': 0.0, + b'vertex-children': 0.0, }) manager.tx_storage.pre_init() @@ -260,11 +263,13 @@ def test_cache_data_collection(self): # Preparation rocksdb_storage = self.create_rocksdb_storage() nc_storage_factory = NCRocksDBStorageFactory(rocksdb_storage) + vertex_children_service = RocksDBVertexChildrenService(rocksdb_storage) base_storage = TransactionRocksDBStorage( rocksdb_storage=rocksdb_storage, settings=self._settings, vertex_parser=VertexParser(settings=self._settings), nc_storage_factory=nc_storage_factory, + vertex_children_service=vertex_children_service, ) tx_storage = TransactionCacheStorage( base_storage, @@ -272,6 +277,7 @@ def test_cache_data_collection(self): indexes=None, settings=self._settings, nc_storage_factory=nc_storage_factory, + vertex_children_service=vertex_children_service, ) manager = self.create_peer('testnet', tx_storage=tx_storage) diff --git a/tests/others/test_util.py b/hathor_tests/others/test_util.py similarity index 100% rename from tests/others/test_util.py rename to hathor_tests/others/test_util.py diff --git a/tests/p2p/__init__.py b/hathor_tests/p2p/__init__.py similarity index 100% rename from tests/p2p/__init__.py rename to hathor_tests/p2p/__init__.py diff --git a/tests/p2p/netfilter/__init__.py b/hathor_tests/p2p/netfilter/__init__.py similarity index 100% rename from tests/p2p/netfilter/__init__.py rename to hathor_tests/p2p/netfilter/__init__.py diff --git a/tests/p2p/netfilter/test_factory.py b/hathor_tests/p2p/netfilter/test_factory.py similarity index 93% rename from tests/p2p/netfilter/test_factory.py rename to hathor_tests/p2p/netfilter/test_factory.py index 53ca409c8..3d5629c94 100644 --- a/tests/p2p/netfilter/test_factory.py +++ b/hathor_tests/p2p/netfilter/test_factory.py @@ -7,8 +7,8 @@ from hathor.p2p.netfilter.matches import NetfilterMatchIPAddress from hathor.p2p.netfilter.rule import NetfilterRule from hathor.p2p.netfilter.targets import NetfilterReject -from tests import unittest -from tests.unittest import TestBuilder +from hathor_tests import unittest +from hathor_tests.unittest import TestBuilder class NetfilterFactoryTest(unittest.TestCase): diff --git a/tests/p2p/netfilter/test_match.py b/hathor_tests/p2p/netfilter/test_match.py similarity index 99% rename from tests/p2p/netfilter/test_match.py rename to hathor_tests/p2p/netfilter/test_match.py index f0aca9342..f6b31ce61 100644 --- a/tests/p2p/netfilter/test_match.py +++ b/hathor_tests/p2p/netfilter/test_match.py @@ -13,7 +13,7 @@ ) from hathor.p2p.peer import PrivatePeer from hathor.simulator import FakeConnection -from tests import unittest +from hathor_tests import unittest class NetfilterNeverMatch(NetfilterMatch): diff --git a/tests/p2p/netfilter/test_match_remote.py b/hathor_tests/p2p/netfilter/test_match_remote.py similarity index 96% rename from tests/p2p/netfilter/test_match_remote.py rename to hathor_tests/p2p/netfilter/test_match_remote.py index 1947f39be..d37183f52 100644 --- a/tests/p2p/netfilter/test_match_remote.py +++ b/hathor_tests/p2p/netfilter/test_match_remote.py @@ -2,7 +2,7 @@ from hathor.p2p.netfilter.context import NetfilterContext from hathor.p2p.netfilter.matches_remote import NetfilterMatchIPAddressRemoteURL -from tests import unittest +from hathor_tests import unittest class NetfilterMatchRemoteTest(unittest.TestCase): diff --git a/tests/p2p/netfilter/test_tables.py b/hathor_tests/p2p/netfilter/test_tables.py similarity index 96% rename from tests/p2p/netfilter/test_tables.py rename to hathor_tests/p2p/netfilter/test_tables.py index a3505aa01..c1cedbfaa 100644 --- a/tests/p2p/netfilter/test_tables.py +++ b/hathor_tests/p2p/netfilter/test_tables.py @@ -2,7 +2,7 @@ from hathor.p2p.netfilter.chain import NetfilterChain from hathor.p2p.netfilter.table import NetfilterTable from hathor.p2p.netfilter.targets import NetfilterAccept -from tests import unittest +from hathor_tests import unittest class NetfilterTableTest(unittest.TestCase): diff --git a/tests/p2p/netfilter/test_utils.py b/hathor_tests/p2p/netfilter/test_utils.py similarity index 96% rename from tests/p2p/netfilter/test_utils.py rename to hathor_tests/p2p/netfilter/test_utils.py index 127cf9b0d..c8901a454 100644 --- a/tests/p2p/netfilter/test_utils.py +++ b/hathor_tests/p2p/netfilter/test_utils.py @@ -1,6 +1,6 @@ from hathor.p2p.netfilter import get_table from hathor.p2p.netfilter.utils import add_peer_id_blacklist -from tests import unittest +from hathor_tests import unittest class NetfilterUtilsTest(unittest.TestCase): diff --git a/tests/p2p/test_bootstrap.py b/hathor_tests/p2p/test_bootstrap.py similarity index 97% rename from tests/p2p/test_bootstrap.py rename to hathor_tests/p2p/test_bootstrap.py index 7ae668057..55a9865bb 100644 --- a/tests/p2p/test_bootstrap.py +++ b/hathor_tests/p2p/test_bootstrap.py @@ -10,8 +10,8 @@ from hathor.p2p.peer_discovery.dns import LookupResult from hathor.p2p.peer_endpoint import PeerAddress, PeerEndpoint, Protocol from hathor.pubsub import PubSubManager -from tests import unittest -from tests.test_memory_reactor_clock import TestMemoryReactorClock +from hathor_tests import unittest +from hathor_tests.test_memory_reactor_clock import TestMemoryReactorClock class MockPeerDiscovery(PeerDiscovery): diff --git a/tests/p2p/test_capabilities.py b/hathor_tests/p2p/test_capabilities.py similarity index 98% rename from tests/p2p/test_capabilities.py rename to hathor_tests/p2p/test_capabilities.py index 0d200a131..e6957edcf 100644 --- a/tests/p2p/test_capabilities.py +++ b/hathor_tests/p2p/test_capabilities.py @@ -1,7 +1,7 @@ from hathor.p2p.states import ReadyState from hathor.p2p.sync_v2.agent import NodeBlockSync from hathor.simulator import FakeConnection -from tests import unittest +from hathor_tests import unittest class CapabilitiesTestCase(unittest.TestCase): diff --git a/tests/p2p/test_connections.py b/hathor_tests/p2p/test_connections.py similarity index 97% rename from tests/p2p/test_connections.py rename to hathor_tests/p2p/test_connections.py index 1d07f3e91..474ce5296 100644 --- a/tests/p2p/test_connections.py +++ b/hathor_tests/p2p/test_connections.py @@ -1,7 +1,7 @@ from hathor.manager import HathorManager from hathor.p2p.peer_endpoint import PeerEndpoint -from tests import unittest -from tests.utils import run_server +from hathor_tests import unittest +from hathor_tests.utils import run_server class ConnectionsTest(unittest.TestCase): diff --git a/tests/p2p/test_connectivity.py b/hathor_tests/p2p/test_connectivity.py similarity index 98% rename from tests/p2p/test_connectivity.py rename to hathor_tests/p2p/test_connectivity.py index 328a17050..d31120e20 100644 --- a/tests/p2p/test_connectivity.py +++ b/hathor_tests/p2p/test_connectivity.py @@ -5,7 +5,7 @@ import requests -from tests.utils import run_server +from hathor_tests.utils import run_server @contextmanager diff --git a/tests/p2p/test_double_spending.py b/hathor_tests/p2p/test_double_spending.py similarity index 99% rename from tests/p2p/test_double_spending.py rename to hathor_tests/p2p/test_double_spending.py index abfa4e202..d45c1d9df 100644 --- a/tests/p2p/test_double_spending.py +++ b/hathor_tests/p2p/test_double_spending.py @@ -5,8 +5,8 @@ from hathor.simulator.utils import add_new_blocks from hathor.transaction import Transaction from hathor.util import not_none -from tests import unittest -from tests.utils import add_blocks_unlock_reward, add_new_tx +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward, add_new_tx class SyncMethodsTestCase(unittest.TestCase): diff --git a/tests/p2p/test_entrypoint.py b/hathor_tests/p2p/test_entrypoint.py similarity index 97% rename from tests/p2p/test_entrypoint.py rename to hathor_tests/p2p/test_entrypoint.py index 718ca4bdc..aa8d8269a 100644 --- a/tests/p2p/test_entrypoint.py +++ b/hathor_tests/p2p/test_entrypoint.py @@ -1,5 +1,5 @@ from hathor.p2p.peer_endpoint import PeerAddress, PeerEndpoint, Protocol -from tests import unittest +from hathor_tests import unittest class EntrypointTestCase(unittest.TestCase): diff --git a/tests/p2p/test_get_best_blockchain.py b/hathor_tests/p2p/test_get_best_blockchain.py similarity index 99% rename from tests/p2p/test_get_best_blockchain.py rename to hathor_tests/p2p/test_get_best_blockchain.py index 72fe42b81..d2c4fcddf 100644 --- a/tests/p2p/test_get_best_blockchain.py +++ b/hathor_tests/p2p/test_get_best_blockchain.py @@ -8,8 +8,8 @@ from hathor.simulator import FakeConnection from hathor.simulator.trigger import StopAfterNMinedBlocks from hathor.util import json_dumps -from tests.resources.base_resource import StubSite -from tests.simulation.base import SimulatorTestCase +from hathor_tests.resources.base_resource import StubSite +from hathor_tests.simulation.base import SimulatorTestCase def check_decreasing_monotonicity(sequence: list[int]) -> bool: diff --git a/tests/p2p/test_nc_state.py b/hathor_tests/p2p/test_nc_state.py similarity index 98% rename from tests/p2p/test_nc_state.py rename to hathor_tests/p2p/test_nc_state.py index 538192e40..20a52bc7d 100644 --- a/tests/p2p/test_nc_state.py +++ b/hathor_tests/p2p/test_nc_state.py @@ -2,7 +2,7 @@ from hathor.p2p.states import ReadyState from hathor.simulator import FakeConnection from hathor.simulator.trigger import StopAfterNMinedBlocks -from tests.simulation.base import SimulatorTestCase +from hathor_tests.simulation.base import SimulatorTestCase class NCStateTestCase(SimulatorTestCase): diff --git a/tests/p2p/test_peer_id.py b/hathor_tests/p2p/test_peer_id.py similarity index 99% rename from tests/p2p/test_peer_id.py rename to hathor_tests/p2p/test_peer_id.py index 110688de4..d7cc2f215 100644 --- a/tests/p2p/test_peer_id.py +++ b/hathor_tests/p2p/test_peer_id.py @@ -11,8 +11,8 @@ from hathor.p2p.peer_endpoint import PeerAddress, PeerEndpoint from hathor.p2p.peer_id import PeerId from hathor.p2p.peer_storage import VerifiedPeerStorage -from tests import unittest -from tests.unittest import TestBuilder +from hathor_tests import unittest +from hathor_tests.unittest import TestBuilder class PeerIdTest(unittest.TestCase): diff --git a/tests/p2p/test_peer_storage.py b/hathor_tests/p2p/test_peer_storage.py similarity index 94% rename from tests/p2p/test_peer_storage.py rename to hathor_tests/p2p/test_peer_storage.py index 8fbbad4f6..09ef94a84 100644 --- a/tests/p2p/test_peer_storage.py +++ b/hathor_tests/p2p/test_peer_storage.py @@ -2,7 +2,7 @@ from hathor.p2p.peer_storage import UnverifiedPeerStorage, VerifiedPeerStorage from hathor.util import Random -from tests.unittest import PEER_ID_POOL +from hathor_tests.unittest import PEER_ID_POOL @pytest.fixture diff --git a/tests/p2p/test_protocol.py b/hathor_tests/p2p/test_protocol.py similarity index 99% rename from tests/p2p/test_protocol.py rename to hathor_tests/p2p/test_protocol.py index ac3c9b95a..9c338af77 100644 --- a/tests/p2p/test_protocol.py +++ b/hathor_tests/p2p/test_protocol.py @@ -15,7 +15,7 @@ from hathor.p2p.protocol import HathorLineReceiver, HathorProtocol from hathor.simulator import FakeConnection from hathor.util import json_dumps, json_loadb -from tests import unittest +from hathor_tests import unittest class HathorProtocolTestCase(unittest.TestCase): diff --git a/tests/p2p/test_rate_limiter.py b/hathor_tests/p2p/test_rate_limiter.py similarity index 97% rename from tests/p2p/test_rate_limiter.py rename to hathor_tests/p2p/test_rate_limiter.py index 3eace5471..05e1928b3 100644 --- a/tests/p2p/test_rate_limiter.py +++ b/hathor_tests/p2p/test_rate_limiter.py @@ -1,6 +1,6 @@ from hathor.p2p.rate_limiter import RateLimiter from hathor.util import not_none -from tests import unittest +from hathor_tests import unittest class RateLimiterTestCase(unittest.TestCase): diff --git a/tests/p2p/test_split_brain.py b/hathor_tests/p2p/test_split_brain.py similarity index 99% rename from tests/p2p/test_split_brain.py rename to hathor_tests/p2p/test_split_brain.py index f5d2f00f1..397b5ccc2 100644 --- a/tests/p2p/test_split_brain.py +++ b/hathor_tests/p2p/test_split_brain.py @@ -8,8 +8,8 @@ from hathor.simulator.utils import add_new_block from hathor.util import not_none from hathor.wallet import HDWallet -from tests import unittest -from tests.utils import add_blocks_unlock_reward, add_new_double_spending, add_new_transactions +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward, add_new_double_spending, add_new_transactions class SyncMethodsTestCase(unittest.TestCase): diff --git a/tests/p2p/test_split_brain2.py b/hathor_tests/p2p/test_split_brain2.py similarity index 97% rename from tests/p2p/test_split_brain2.py rename to hathor_tests/p2p/test_split_brain2.py index 7b3e5fc2b..4fe65a9bd 100644 --- a/tests/p2p/test_split_brain2.py +++ b/hathor_tests/p2p/test_split_brain2.py @@ -2,7 +2,7 @@ from hathor.graphviz import GraphvizVisualizer from hathor.simulator import FakeConnection -from tests.simulation.base import SimulatorTestCase +from hathor_tests.simulation.base import SimulatorTestCase class SyncMethodsTestCase(SimulatorTestCase): diff --git a/tests/p2p/test_sync.py b/hathor_tests/p2p/test_sync.py similarity index 98% rename from tests/p2p/test_sync.py rename to hathor_tests/p2p/test_sync.py index 38439ed29..73ad924a3 100644 --- a/tests/p2p/test_sync.py +++ b/hathor_tests/p2p/test_sync.py @@ -4,8 +4,8 @@ from hathor.transaction import Block, Transaction from hathor.transaction.storage.exceptions import TransactionIsNotABlock from hathor.util import not_none -from tests import unittest -from tests.utils import add_blocks_unlock_reward +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward class SyncMethodsTestCase(unittest.TestCase): @@ -208,7 +208,9 @@ def test_sync_metadata(self) -> None: for tx in self.manager1.tx_storage.topological_iterator(): meta1 = tx.get_metadata() meta2 = manager2.tx_storage.get_metadata(tx.hash) - self.assertCountEqual(meta1.children or [], meta2.children or []) + children1 = list(self.manager1.tx_storage.vertex_children.get_children(tx)) + children2 = list(manager2.tx_storage.vertex_children.get_children(tx)) + self.assertCountEqual(children1, children2) self.assertCountEqual(meta1.voided_by or [], meta2.voided_by or []) self.assertCountEqual(meta1.conflict_with or [], meta2.conflict_with or []) self.assertCountEqual(meta1.twins or [], meta2.twins or []) diff --git a/tests/p2p/test_sync_enabled.py b/hathor_tests/p2p/test_sync_enabled.py similarity index 97% rename from tests/p2p/test_sync_enabled.py rename to hathor_tests/p2p/test_sync_enabled.py index 1e3bfd46f..e90a5caf5 100644 --- a/tests/p2p/test_sync_enabled.py +++ b/hathor_tests/p2p/test_sync_enabled.py @@ -1,6 +1,6 @@ from hathor.simulator import FakeConnection from hathor.simulator.trigger import StopAfterNMinedBlocks -from tests.simulation.base import SimulatorTestCase +from hathor_tests.simulation.base import SimulatorTestCase class RandomSimulatorTestCase(SimulatorTestCase): diff --git a/tests/p2p/test_sync_mempool.py b/hathor_tests/p2p/test_sync_mempool.py similarity index 98% rename from tests/p2p/test_sync_mempool.py rename to hathor_tests/p2p/test_sync_mempool.py index f8680f417..6df1c7569 100644 --- a/tests/p2p/test_sync_mempool.py +++ b/hathor_tests/p2p/test_sync_mempool.py @@ -6,8 +6,8 @@ from hathor.simulator import FakeConnection from hathor.transaction import Block, Transaction from hathor.util import json_loadb, not_none -from tests import unittest -from tests.utils import add_blocks_unlock_reward +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward class SyncMempoolTestCase(unittest.TestCase): diff --git a/tests/p2p/test_sync_v2.py b/hathor_tests/p2p/test_sync_v2.py similarity index 99% rename from tests/p2p/test_sync_v2.py rename to hathor_tests/p2p/test_sync_v2.py index bbaf30d0d..fef2918a8 100644 --- a/tests/p2p/test_sync_v2.py +++ b/hathor_tests/p2p/test_sync_v2.py @@ -22,8 +22,8 @@ from hathor.transaction.storage.traversal import DFSWalk from hathor.types import VertexId from hathor.util import not_none -from tests.dag_builder.builder import TestDAGBuilder -from tests.simulation.base import SimulatorTestCase +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.simulation.base import SimulatorTestCase class RandomSimulatorTestCase(SimulatorTestCase): diff --git a/tests/p2p/test_twin_tx.py b/hathor_tests/p2p/test_twin_tx.py similarity index 96% rename from tests/p2p/test_twin_tx.py rename to hathor_tests/p2p/test_twin_tx.py index 3c62e7c22..881e4dde3 100644 --- a/tests/p2p/test_twin_tx.py +++ b/hathor_tests/p2p/test_twin_tx.py @@ -3,8 +3,8 @@ from hathor.transaction import Transaction from hathor.util import not_none from hathor.wallet.base_wallet import WalletOutputInfo -from tests import unittest -from tests.utils import add_blocks_unlock_reward, add_new_double_spending +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward, add_new_double_spending class TwinTransactionTestCase(unittest.TestCase): diff --git a/tests/p2p/test_whitelist.py b/hathor_tests/p2p/test_whitelist.py similarity index 99% rename from tests/p2p/test_whitelist.py rename to hathor_tests/p2p/test_whitelist.py index 29fb10e7d..b7619025c 100644 --- a/tests/p2p/test_whitelist.py +++ b/hathor_tests/p2p/test_whitelist.py @@ -10,7 +10,7 @@ from hathor.p2p.manager import WHITELIST_REQUEST_TIMEOUT from hathor.p2p.sync_version import SyncVersion from hathor.simulator import FakeConnection -from tests import unittest +from hathor_tests import unittest class WhitelistTestCase(unittest.TestCase): diff --git a/tests/peer_id_pool.json b/hathor_tests/peer_id_pool.json similarity index 100% rename from tests/peer_id_pool.json rename to hathor_tests/peer_id_pool.json diff --git a/tests/poa/__init__.py b/hathor_tests/poa/__init__.py similarity index 100% rename from tests/poa/__init__.py rename to hathor_tests/poa/__init__.py diff --git a/tests/poa/test_poa.py b/hathor_tests/poa/test_poa.py similarity index 100% rename from tests/poa/test_poa.py rename to hathor_tests/poa/test_poa.py diff --git a/tests/poa/test_poa_block_producer.py b/hathor_tests/poa/test_poa_block_producer.py similarity index 97% rename from tests/poa/test_poa_block_producer.py rename to hathor_tests/poa/test_poa_block_producer.py index 3be849470..cc0a7c48c 100644 --- a/tests/poa/test_poa_block_producer.py +++ b/hathor_tests/poa/test_poa_block_producer.py @@ -23,9 +23,9 @@ from hathor.crypto.util import get_public_key_bytes_compressed from hathor.manager import HathorManager from hathor.transaction.poa import PoaBlock -from tests.poa.utils import get_settings, get_signer -from tests.test_memory_reactor_clock import TestMemoryReactorClock -from tests.unittest import TestBuilder +from hathor_tests.poa.utils import get_settings, get_signer +from hathor_tests.test_memory_reactor_clock import TestMemoryReactorClock +from hathor_tests.unittest import TestBuilder def _get_manager(settings: HathorSettings) -> HathorManager: diff --git a/tests/poa/test_poa_simulation.py b/hathor_tests/poa/test_poa_simulation.py similarity index 99% rename from tests/poa/test_poa_simulation.py rename to hathor_tests/poa/test_poa_simulation.py index 73776f32a..7e86d02ae 100644 --- a/tests/poa/test_poa_simulation.py +++ b/hathor_tests/poa/test_poa_simulation.py @@ -36,8 +36,8 @@ from hathor.transaction.scripts import P2PKH from hathor.transaction.token_creation_tx import TokenCreationTransaction from hathor.util import not_none -from tests.poa.utils import get_settings, get_signer -from tests.simulation.base import SimulatorTestCase +from hathor_tests.poa.utils import get_settings, get_signer +from hathor_tests.simulation.base import SimulatorTestCase def _get_blocks_by_height(manager: HathorManager) -> defaultdict[int, list[PoaBlock]]: diff --git a/tests/poa/test_poa_verification.py b/hathor_tests/poa/test_poa_verification.py similarity index 99% rename from tests/poa/test_poa_verification.py rename to hathor_tests/poa/test_poa_verification.py index ca05103e4..d931ef8a7 100644 --- a/tests/poa/test_poa_verification.py +++ b/hathor_tests/poa/test_poa_verification.py @@ -24,7 +24,7 @@ from hathor.verification.block_verifier import BlockVerifier from hathor.verification.poa_block_verifier import PoaBlockVerifier from hathor.verification.vertex_verifier import VertexVerifier -from tests import unittest +from hathor_tests import unittest class PoaVerificationTest(unittest.TestCase): diff --git a/tests/poa/utils.py b/hathor_tests/poa/utils.py similarity index 100% rename from tests/poa/utils.py rename to hathor_tests/poa/utils.py diff --git a/tests/pubsub/__init__.py b/hathor_tests/pubsub/__init__.py similarity index 100% rename from tests/pubsub/__init__.py rename to hathor_tests/pubsub/__init__.py diff --git a/tests/pubsub/test_pubsub.py b/hathor_tests/pubsub/test_pubsub.py similarity index 92% rename from tests/pubsub/test_pubsub.py rename to hathor_tests/pubsub/test_pubsub.py index b2e76e646..f1ce397e0 100644 --- a/tests/pubsub/test_pubsub.py +++ b/hathor_tests/pubsub/test_pubsub.py @@ -1,5 +1,5 @@ from hathor.pubsub import EventArguments, HathorEvents, PubSubManager -from tests.unittest import TestCase +from hathor_tests.unittest import TestCase class PubSubTestCase(TestCase): diff --git a/tests/pubsub/test_pubsub2.py b/hathor_tests/pubsub/test_pubsub2.py similarity index 100% rename from tests/pubsub/test_pubsub2.py rename to hathor_tests/pubsub/test_pubsub2.py diff --git a/tests/resources/__init__.py b/hathor_tests/resources/__init__.py similarity index 100% rename from tests/resources/__init__.py rename to hathor_tests/resources/__init__.py diff --git a/tests/resources/base_resource.py b/hathor_tests/resources/base_resource.py similarity index 99% rename from tests/resources/base_resource.py rename to hathor_tests/resources/base_resource.py index a43bd3dd3..1cc72ac19 100644 --- a/tests/resources/base_resource.py +++ b/hathor_tests/resources/base_resource.py @@ -4,7 +4,7 @@ from hathor.daa import TestMode from hathor.util import json_dumpb, json_loadb -from tests import unittest +from hathor_tests import unittest class _BaseResourceTest: diff --git a/tests/resources/event/__init__.py b/hathor_tests/resources/event/__init__.py similarity index 100% rename from tests/resources/event/__init__.py rename to hathor_tests/resources/event/__init__.py diff --git a/tests/resources/event/test_event.py b/hathor_tests/resources/event/test_event.py similarity index 96% rename from tests/resources/event/test_event.py rename to hathor_tests/resources/event/test_event.py index c1e2cd0ec..ebc670750 100644 --- a/tests/resources/event/test_event.py +++ b/hathor_tests/resources/event/test_event.py @@ -20,8 +20,8 @@ from hathor.event.resources.event import EventResource from hathor.event.storage import EventRocksDBStorage from hathor.storage import RocksDBStorage -from tests.resources.base_resource import StubSite -from tests.utils import EventMocker +from hathor_tests.resources.base_resource import StubSite +from hathor_tests.utils import EventMocker @pytest.fixture diff --git a/tests/resources/feature/__init__.py b/hathor_tests/resources/feature/__init__.py similarity index 100% rename from tests/resources/feature/__init__.py rename to hathor_tests/resources/feature/__init__.py diff --git a/tests/resources/feature/test_feature.py b/hathor_tests/resources/feature/test_feature.py similarity index 98% rename from tests/resources/feature/test_feature.py rename to hathor_tests/resources/feature/test_feature.py index e3633b2b4..2752e8e78 100644 --- a/tests/resources/feature/test_feature.py +++ b/hathor_tests/resources/feature/test_feature.py @@ -27,7 +27,7 @@ from hathor.transaction import Block from hathor.transaction.static_metadata import BlockStaticMetadata from hathor.transaction.storage import TransactionStorage -from tests.resources.base_resource import StubSite +from hathor_tests.resources.base_resource import StubSite @pytest.fixture diff --git a/tests/resources/healthcheck/test_healthcheck.py b/hathor_tests/resources/healthcheck/test_healthcheck.py similarity index 98% rename from tests/resources/healthcheck/test_healthcheck.py rename to hathor_tests/resources/healthcheck/test_healthcheck.py index 969d99899..19198003c 100644 --- a/tests/resources/healthcheck/test_healthcheck.py +++ b/hathor_tests/resources/healthcheck/test_healthcheck.py @@ -7,7 +7,7 @@ from hathor.manager import HathorManager from hathor.simulator import FakeConnection from hathor.simulator.utils import add_new_blocks -from tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest class HealthcheckReadinessTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/nanocontracts/__init__.py b/hathor_tests/resources/nanocontracts/__init__.py similarity index 100% rename from tests/resources/nanocontracts/__init__.py rename to hathor_tests/resources/nanocontracts/__init__.py diff --git a/tests/resources/nanocontracts/base_resource.py b/hathor_tests/resources/nanocontracts/base_resource.py similarity index 89% rename from tests/resources/nanocontracts/base_resource.py rename to hathor_tests/resources/nanocontracts/base_resource.py index 8921c4a73..edc23378e 100644 --- a/tests/resources/nanocontracts/base_resource.py +++ b/hathor_tests/resources/nanocontracts/base_resource.py @@ -2,7 +2,7 @@ from hathor.nanocontracts import Blueprint, OnChainBlueprint from hathor.nanocontracts.catalog import NCBlueprintCatalog from hathor.nanocontracts.types import BlueprintId -from tests.resources.base_resource import _BaseResourceTest +from hathor_tests.resources.base_resource import _BaseResourceTest class GenericNanoResourceTest(_BaseResourceTest._ResourceTest): @@ -20,7 +20,7 @@ def create_builtin_blueprint( def create_on_chain_blueprint(self, manager: HathorManager, nc_code: str) -> OnChainBlueprint: from hathor.nanocontracts.on_chain_blueprint import Code - from tests.nanocontracts.on_chain_blueprints.utils import get_ocb_private_key + from hathor_tests.nanocontracts.on_chain_blueprints.utils import get_ocb_private_key code = Code.from_python_code(nc_code, self._settings) timestamp = manager.tx_storage.latest_timestamp + 1 parents = manager.get_new_tx_parents(timestamp) diff --git a/tests/resources/nanocontracts/dummy_blueprint.py b/hathor_tests/resources/nanocontracts/dummy_blueprint.py similarity index 100% rename from tests/resources/nanocontracts/dummy_blueprint.py rename to hathor_tests/resources/nanocontracts/dummy_blueprint.py diff --git a/tests/resources/nanocontracts/my_blueprint.py b/hathor_tests/resources/nanocontracts/my_blueprint.py similarity index 100% rename from tests/resources/nanocontracts/my_blueprint.py rename to hathor_tests/resources/nanocontracts/my_blueprint.py diff --git a/tests/resources/nanocontracts/test_blueprint.py b/hathor_tests/resources/nanocontracts/test_blueprint.py similarity index 95% rename from tests/resources/nanocontracts/test_blueprint.py rename to hathor_tests/resources/nanocontracts/test_blueprint.py index 2960bb724..7ed434c9c 100644 --- a/tests/resources/nanocontracts/test_blueprint.py +++ b/hathor_tests/resources/nanocontracts/test_blueprint.py @@ -7,8 +7,8 @@ from hathor.nanocontracts.types import BlueprintId, VertexId from hathor.nanocontracts.utils import load_builtin_blueprint_for_ocb from hathor.simulator.utils import add_new_blocks -from tests.resources.base_resource import StubSite -from tests.resources.nanocontracts.base_resource import GenericNanoResourceTest +from hathor_tests.resources.base_resource import StubSite +from hathor_tests.resources.nanocontracts.base_resource import GenericNanoResourceTest class BaseBlueprintInfoTest(GenericNanoResourceTest): @@ -141,7 +141,7 @@ class BuiltinBlueprintInfoTest(BaseBlueprintInfoTest): def setUp(self): super().setUp() - from tests.resources.nanocontracts import my_blueprint + from hathor_tests.resources.nanocontracts import my_blueprint self.blueprint_id = BlueprintId(VertexId(b'3cb032600bdf7db784800e4ea911b10676fa2f67591f82bb62628c234e771595')) self.create_builtin_blueprint(self.manager, self.blueprint_id, my_blueprint.MyBlueprint) @@ -151,7 +151,7 @@ class OCBBlueprintInfoTest(BaseBlueprintInfoTest): def setUp(self): super().setUp() - from tests.resources import nanocontracts + from hathor_tests.resources import nanocontracts nc_code = load_builtin_blueprint_for_ocb('my_blueprint.py', 'MyBlueprint', nanocontracts) blueprint = self.create_on_chain_blueprint(self.manager, nc_code) self.manager.vertex_handler.on_new_relayed_vertex(blueprint) diff --git a/tests/resources/nanocontracts/test_blueprint_source_code.py b/hathor_tests/resources/nanocontracts/test_blueprint_source_code.py similarity index 92% rename from tests/resources/nanocontracts/test_blueprint_source_code.py rename to hathor_tests/resources/nanocontracts/test_blueprint_source_code.py index 72c070c7d..4a5ef636e 100644 --- a/tests/resources/nanocontracts/test_blueprint_source_code.py +++ b/hathor_tests/resources/nanocontracts/test_blueprint_source_code.py @@ -4,8 +4,8 @@ from hathor.nanocontracts.types import BlueprintId from hathor.nanocontracts.utils import load_builtin_blueprint_for_ocb from hathor.simulator.utils import add_new_blocks -from tests.resources.base_resource import StubSite -from tests.resources.nanocontracts.base_resource import GenericNanoResourceTest +from hathor_tests.resources.base_resource import StubSite +from hathor_tests.resources.nanocontracts.base_resource import GenericNanoResourceTest class BaseBlueprintSourceCodeTest(GenericNanoResourceTest): @@ -81,7 +81,7 @@ def sum(self, ctx: Context, arg1: int) -> None: def setUp(self): super().setUp() - from tests.resources.nanocontracts import dummy_blueprint + from hathor_tests.resources.nanocontracts import dummy_blueprint self.blueprint_id = BlueprintId(b'3cb032600bdf7db784800e4ea911b10676fa2f67591f82bb62628c234e771595') self.create_builtin_blueprint(self.manager, self.blueprint_id, dummy_blueprint.TestBlueprint) @@ -110,7 +110,7 @@ def sum(self, ctx: Context, arg1: int) -> None: def setUp(self): super().setUp() - from tests.resources import nanocontracts + from hathor_tests.resources import nanocontracts nc_code = load_builtin_blueprint_for_ocb('dummy_blueprint.py', 'TestBlueprint', nanocontracts) blueprint = self.create_on_chain_blueprint(self.manager, nc_code) self.manager.vertex_handler.on_new_relayed_vertex(blueprint) diff --git a/tests/resources/nanocontracts/test_builtin.py b/hathor_tests/resources/nanocontracts/test_builtin.py similarity index 99% rename from tests/resources/nanocontracts/test_builtin.py rename to hathor_tests/resources/nanocontracts/test_builtin.py index 4f1a7b22c..14d1b2ba0 100644 --- a/tests/resources/nanocontracts/test_builtin.py +++ b/hathor_tests/resources/nanocontracts/test_builtin.py @@ -15,7 +15,7 @@ from hathor.nanocontracts import Blueprint, Context, public from hathor.nanocontracts.catalog import NCBlueprintCatalog from hathor.nanocontracts.resources.builtin import BlueprintBuiltinResource -from tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest class MyBlueprint1(Blueprint): diff --git a/tests/resources/nanocontracts/test_history.py b/hathor_tests/resources/nanocontracts/test_history.py similarity index 98% rename from tests/resources/nanocontracts/test_history.py rename to hathor_tests/resources/nanocontracts/test_history.py index b6acf1ede..b4e8f022d 100644 --- a/tests/resources/nanocontracts/test_history.py +++ b/hathor_tests/resources/nanocontracts/test_history.py @@ -12,8 +12,8 @@ from hathor.simulator.utils import add_new_block from hathor.transaction import Transaction from hathor.transaction.headers import NanoHeader -from tests.resources.base_resource import StubSite, _BaseResourceTest -from tests.utils import add_blocks_unlock_reward, get_genesis_key +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.utils import add_blocks_unlock_reward, get_genesis_key settings = HathorSettings() diff --git a/hathor_tests/resources/nanocontracts/test_history2.py b/hathor_tests/resources/nanocontracts/test_history2.py new file mode 100644 index 000000000..d5687323a --- /dev/null +++ b/hathor_tests/resources/nanocontracts/test_history2.py @@ -0,0 +1,149 @@ +from twisted.internet.defer import inlineCallbacks + +from hathor.conf import HathorSettings +from hathor.nanocontracts import Blueprint, Context, public +from hathor.nanocontracts.catalog import NCBlueprintCatalog +from hathor.nanocontracts.nc_exec_logs import NCLogConfig +from hathor.nanocontracts.resources import NanoContractHistoryResource +from hathor.transaction import Transaction +from hathor.transaction.resources import TransactionResource +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest + +settings = HathorSettings() + + +class TestBlueprint(Blueprint): + value: int + + @public + def initialize(self, ctx: Context, value: int) -> None: + self.value = value + + @public + def log_and_emit(self, ctx: Context, message: str) -> None: + self.log.info(f'Log: {message}') + self.syscall.emit_event(message.encode('utf-8')) + + +class TransactionNanoContractTest(_BaseResourceTest._ResourceTest): + def setUp(self): + super().setUp() + + self.blueprint_id = b'x' * 32 + self.catalog = NCBlueprintCatalog({ + self.blueprint_id: TestBlueprint + }) + + self.manager = self.create_peer( + 'unittests', + unlock_wallet=True, + wallet_index=True, + nc_indexes=True, + nc_log_config=NCLogConfig.ALL, + ) + self.manager.tx_storage.nc_catalog = self.catalog + self.web_transaction = StubSite(TransactionResource(self.manager)) + self.web_history = StubSite(NanoContractHistoryResource(self.manager)) + + @inlineCallbacks + def test_include_nc_logs_and_events(self): + """Test include_nc_logs and include_nc_events parameters for both TransactionResource + and NanoContractHistoryResource.""" + dag_builder = TestDAGBuilder.from_manager(self.manager) + + # nc1: initialize (no logs, no events) + # nc2: log_and_emit (logs and events) + artifacts = dag_builder.build_from_str(f''' + blockchain genesis b[1..33] + b30 < dummy + + nc1.nc_id = "{self.blueprint_id.hex()}" + nc1.nc_method = initialize(42) + + nc2.nc_id = nc1 + nc2.nc_method = log_and_emit("combined test") + + b31 --> nc1 + b32 --> nc2 + ''') + + artifacts.propagate_with(self.manager) + + nc1, nc2 = artifacts.get_typed_vertices(['nc1', 'nc2'], Transaction) + + # Test TransactionResource API + # Test nc1 (initialize - no logs, no events) + response = yield self.web_transaction.get('transaction', { + b'id': nc1.hash.hex().encode('ascii'), + b'include_nc_logs': b'true', + b'include_nc_events': b'true', + }) + data = response.json_value() + self.assertTrue(data['success']) + self.assertEqual(data['nc_args_decoded'], [42]) + self.assertIn('nc_logs', data) + self.assertIn('nc_events', data) + # Should have empty events list for initialize method + self.assertEqual(data['nc_events'], []) + + # Test nc2 (log_and_emit - has logs and events) + response = yield self.web_transaction.get('transaction', { + b'id': nc2.hash.hex().encode('ascii'), + b'include_nc_logs': b'true', + b'include_nc_events': b'true', + }) + data = response.json_value() + self.assertTrue(data['success']) + self.assertEqual(data['nc_args_decoded'], ["combined test"]) + # Should have both logs and events + self.assertIn('nc_logs', data) + self.assertIsInstance(data['nc_logs'], dict) + self.assertGreater(len(data['nc_logs']), 0) + self.assertIn('nc_events', data) + self.assertIsInstance(data['nc_events'], list) + self.assertEqual(len(data['nc_events']), 1) + event = data['nc_events'][0] + self.assertEqual(bytes.fromhex(event['data']), b'combined test') + + # Test NanoContractHistoryResource API + # Test history for nc1 + response = yield self.web_history.get('history', { + b'id': nc1.hash.hex().encode('ascii'), + b'include_nc_logs': b'true', + b'include_nc_events': b'true', + }) + data = response.json_value() + self.assertTrue(data['success']) + self.assertGreater(len(data['history']), 0) + + # Find nc1 in history (it should be the initialize transaction) + nc1_in_history = None + for tx_data in data['history']: + if tx_data['hash'] == nc1.hash_hex: + nc1_in_history = tx_data + break + + self.assertIsNotNone(nc1_in_history) + self.assertEqual(nc1_in_history['nc_args_decoded'], [42]) + self.assertIn('nc_logs', nc1_in_history) + self.assertIn('nc_events', nc1_in_history) + self.assertEqual(nc1_in_history['nc_events'], []) + + # Find nc2 in history (log_and_emit transaction) + nc2_in_history = None + for tx_data in data['history']: + if tx_data['hash'] == nc2.hash_hex: + nc2_in_history = tx_data + break + + self.assertIsNotNone(nc2_in_history) + self.assertEqual(nc2_in_history['nc_args_decoded'], ["combined test"]) + self.assertIn('nc_logs', nc2_in_history) + self.assertIsInstance(nc2_in_history['nc_logs'], dict) + self.assertGreater(len(nc2_in_history['nc_logs']), 0) + self.assertIn('nc_events', nc2_in_history) + self.assertIsInstance(nc2_in_history['nc_events'], list) + self.assertEqual(len(nc2_in_history['nc_events']), 1) + event = nc2_in_history['nc_events'][0] + self.assertEqual(bytes.fromhex(event['data']), b'combined test') diff --git a/tests/resources/nanocontracts/test_nc_creation.py b/hathor_tests/resources/nanocontracts/test_nc_creation.py similarity index 87% rename from tests/resources/nanocontracts/test_nc_creation.py rename to hathor_tests/resources/nanocontracts/test_nc_creation.py index 3d00b7d77..59982f53a 100644 --- a/tests/resources/nanocontracts/test_nc_creation.py +++ b/hathor_tests/resources/nanocontracts/test_nc_creation.py @@ -14,16 +14,28 @@ from typing import Any +from hathor import Blueprint, Context, public from hathor.nanocontracts.resources.nc_creation import NCCreationResource from hathor.nanocontracts.types import BlueprintId, VertexId from hathor.nanocontracts.utils import load_builtin_blueprint_for_ocb -from hathor.transaction import Transaction -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder -from tests.nanocontracts import test_blueprints -from tests.nanocontracts.test_blueprints.bet import Bet -from tests.resources.base_resource import StubSite, _BaseResourceTest -from tests.utils import get_genesis_key +from hathor.transaction import Block, Transaction +from hathor.transaction.nc_execution_state import NCExecutionState +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.nanocontracts import test_blueprints +from hathor_tests.nanocontracts.test_blueprints.bet import Bet +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.utils import get_genesis_key + + +class MyBlueprint(Blueprint): + @public + def initialize(self, ctx: Context) -> None: + pass + + @public + def create_child(self, ctx: Context) -> None: + self.syscall.setup_new_contract(self.syscall.get_blueprint_id(), salt=b'1').initialize() class NCCreationResourceTest(_BaseResourceTest._ResourceTest): @@ -568,3 +580,52 @@ async def test_non_hex_pagination(self) -> None: success=False, error='Invalid "before" or "after": abc' ) + + async def test_contract_create_contract(self) -> None: + blueprint_id = BlueprintId(self.rng.randbytes(32)) + self.manager.tx_storage.nc_catalog.blueprints[blueprint_id] = MyBlueprint + + dag_builder = TestDAGBuilder.from_manager(self.manager) + artifacts = dag_builder.build_from_str(f''' + blockchain genesis b[1..12] + b10 < dummy + + nc1.nc_id = "{blueprint_id.hex()}" + nc1.nc_method = initialize() + nc1 <-- b11 + + nc2.nc_id = nc1 + nc2.nc_method = create_child() + nc2 <-- b12 + ''') + + artifacts.propagate_with(self.manager) + b11, b12 = artifacts.get_typed_vertices(('b11', 'b12'), Block) + nc1, nc2, = artifacts.get_typed_vertices(('nc1', 'nc2'), Transaction) + + assert nc1.get_metadata().first_block == b11.hash + assert nc1.get_metadata().nc_execution == NCExecutionState.SUCCESS + assert nc2.get_metadata().first_block == b12.hash + assert nc2.get_metadata().nc_execution == NCExecutionState.SUCCESS + + response = await self.web.get('creation') + data = response.json_value() + + # Contracts created by contracts are currently not supported by the API and are simply omitted. + assert data == dict( + success=True, + before=None, + after=None, + count=10, + has_more=False, + nc_creation_txs=[ + dict( + nano_contract_id=nc1.hash_hex, + blueprint_id=blueprint_id.hex(), + blueprint_name='MyBlueprint', + last_tx_timestamp=nc2.timestamp, + total_txs=2, + created_at=nc1.timestamp, + ), + ], + ) diff --git a/tests/resources/nanocontracts/test_nc_exec_logs.py b/hathor_tests/resources/nanocontracts/test_nc_exec_logs.py similarity index 97% rename from tests/resources/nanocontracts/test_nc_exec_logs.py rename to hathor_tests/resources/nanocontracts/test_nc_exec_logs.py index e36b1f0cd..8a5702ba2 100644 --- a/tests/resources/nanocontracts/test_nc_exec_logs.py +++ b/hathor_tests/resources/nanocontracts/test_nc_exec_logs.py @@ -16,8 +16,8 @@ from hathor.nanocontracts.resources.nc_exec_logs import NCExecLogsResource from hathor.transaction import Block, Transaction -from tests.nanocontracts.test_nc_exec_logs import MY_BLUEPRINT1_ID, BaseNCExecLogs -from tests.resources.base_resource import StubSite +from hathor_tests.nanocontracts.test_nc_exec_logs import MY_BLUEPRINT1_ID, BaseNCExecLogs +from hathor_tests.resources.base_resource import StubSite class NCExecLogsResourceTest(BaseNCExecLogs): diff --git a/tests/resources/nanocontracts/test_on_chain.py b/hathor_tests/resources/nanocontracts/test_on_chain.py similarity index 98% rename from tests/resources/nanocontracts/test_on_chain.py rename to hathor_tests/resources/nanocontracts/test_on_chain.py index 0a1f59265..c731bcb61 100644 --- a/tests/resources/nanocontracts/test_on_chain.py +++ b/hathor_tests/resources/nanocontracts/test_on_chain.py @@ -17,10 +17,10 @@ from hathor.nanocontracts import OnChainBlueprint from hathor.nanocontracts.resources.on_chain import BlueprintOnChainResource from hathor.nanocontracts.utils import load_builtin_blueprint_for_ocb -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder -from tests.nanocontracts import test_blueprints -from tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.nanocontracts import test_blueprints +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest class BlueprintOnChainResourceTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/nanocontracts/test_state.py b/hathor_tests/resources/nanocontracts/test_state.py similarity index 96% rename from tests/resources/nanocontracts/test_state.py rename to hathor_tests/resources/nanocontracts/test_state.py index fd35e7bcf..987208617 100644 --- a/tests/resources/nanocontracts/test_state.py +++ b/hathor_tests/resources/nanocontracts/test_state.py @@ -28,8 +28,8 @@ from hathor.transaction.headers import NanoHeader from hathor.transaction.headers.nano_header import NanoHeaderAction from hathor.transaction.scripts import P2PKH -from tests.resources.base_resource import StubSite, _BaseResourceTest -from tests.utils import add_blocks_unlock_reward, get_genesis_key +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.utils import add_blocks_unlock_reward, get_genesis_key settings = HathorSettings() @@ -42,6 +42,11 @@ class MyNamedTuple(NamedTuple): address: Optional[Address] +class ReturnTuple(NamedTuple): + foo: str + token: TokenUid + + class MyBlueprint(Blueprint): token_uid: TokenUid total: Amount @@ -118,6 +123,13 @@ def conditional_multiply_bytes(self, t: tuple[int, Optional[bytes]]) -> Optional return multiplier * data + @view + def get_return_tuple(self) -> ReturnTuple: + return ReturnTuple( + foo='bar', + token=TokenUid(b'\x11' * 32), + ) + class BaseNanoContractStateTest(_BaseResourceTest._ResourceTest): def setUp(self): @@ -231,7 +243,7 @@ def test_success(self): 'state', [ (b'id', nc.hash.hex().encode('ascii')), (b'fields[]', b'token_uid'), - ] + ] ) self.assertEqual(404, response0.responseCode) # Execute the nano contract @@ -252,7 +264,7 @@ def test_success(self): (b'calls[]', b'multiply([2, 5, 8, 10])'), (b'calls[]', b'conditional_multiply_bytes([5, "01"])'), (b'calls[]', b'conditional_multiply_bytes([3, null])'), - ] + ] ) data1 = response1.json_value() fields1 = data1['fields'] @@ -509,7 +521,7 @@ def test_success(self): (b'fields[]', b'token_uid'), (b'block_height', str(block1.static_metadata.height).encode('ascii')), (b'block_hash', block1.hash.hex().encode('ascii')), - ] + ] ) self.assertEqual(400, response8.responseCode) @@ -519,7 +531,7 @@ def test_success(self): (b'id', nc.hash.hex().encode('ascii')), (b'fields[]', b'token_uid'), (b'block_height', str(block1.static_metadata.height + 5).encode('ascii')), - ] + ] ) self.assertEqual(400, response9.responseCode) @@ -529,7 +541,7 @@ def test_success(self): (b'id', nc.hash.hex().encode('ascii')), (b'fields[]', b'token_uid'), (b'block_hash', '123'.encode('ascii')), - ] + ] ) self.assertEqual(400, response10.responseCode) @@ -539,6 +551,16 @@ def test_success(self): (b'id', nc.hash.hex().encode('ascii')), (b'fields[]', b'token_uid'), (b'block_hash', nc_bet.hash.hex().encode('ascii')), - ] + ] ) self.assertEqual(400, response11.responseCode) + + response12 = yield self.web.get( + 'state', [ + (b'id', nc.hash.hex().encode('ascii')), + (b'calls[]', b'get_return_tuple()'), + ] + ) + assert response12.json_value()['calls']['get_return_tuple()'] == { + 'value': ['bar', '1' * 64] + } diff --git a/tests/resources/p2p/__init__.py b/hathor_tests/resources/p2p/__init__.py similarity index 100% rename from tests/resources/p2p/__init__.py rename to hathor_tests/resources/p2p/__init__.py diff --git a/tests/resources/p2p/test_add_peer.py b/hathor_tests/resources/p2p/test_add_peer.py similarity index 94% rename from tests/resources/p2p/test_add_peer.py rename to hathor_tests/resources/p2p/test_add_peer.py index cae3a4bae..f3c87d820 100644 --- a/tests/resources/p2p/test_add_peer.py +++ b/hathor_tests/resources/p2p/test_add_peer.py @@ -3,7 +3,7 @@ from hathor.p2p.peer import PrivatePeer from hathor.p2p.peer_endpoint import PeerAddress from hathor.p2p.resources import AddPeersResource -from tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest class AddPeerTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/p2p/test_mining.py b/hathor_tests/resources/p2p/test_mining.py similarity index 97% rename from tests/resources/p2p/test_mining.py rename to hathor_tests/resources/p2p/test_mining.py index ae3ae605f..13ebfd15c 100644 --- a/tests/resources/p2p/test_mining.py +++ b/hathor_tests/resources/p2p/test_mining.py @@ -4,7 +4,7 @@ from hathor.p2p.resources import MiningResource from hathor.transaction import Block -from tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest class MiningTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/p2p/test_netfilter.py b/hathor_tests/resources/p2p/test_netfilter.py similarity index 98% rename from tests/resources/p2p/test_netfilter.py rename to hathor_tests/resources/p2p/test_netfilter.py index 27dc73f77..15ad2175c 100644 --- a/tests/resources/p2p/test_netfilter.py +++ b/hathor_tests/resources/p2p/test_netfilter.py @@ -2,7 +2,7 @@ from hathor.p2p.netfilter import get_table from hathor.p2p.resources import NetfilterRuleResource -from tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest class NetfilterTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/p2p/test_status.py b/hathor_tests/resources/p2p/test_status.py similarity index 98% rename from tests/resources/p2p/test_status.py rename to hathor_tests/resources/p2p/test_status.py index 0d21c0665..a01b9a7db 100644 --- a/tests/resources/p2p/test_status.py +++ b/hathor_tests/resources/p2p/test_status.py @@ -6,7 +6,7 @@ from hathor.p2p.peer_endpoint import PeerAddress from hathor.p2p.resources import StatusResource from hathor.simulator import FakeConnection -from tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest class StatusTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/test_mining_info.py b/hathor_tests/resources/test_mining_info.py similarity index 96% rename from tests/resources/test_mining_info.py rename to hathor_tests/resources/test_mining_info.py index 4eb51bbba..15e58404e 100644 --- a/tests/resources/test_mining_info.py +++ b/hathor_tests/resources/test_mining_info.py @@ -2,7 +2,7 @@ from hathor.p2p.resources import MiningInfoResource from hathor.simulator.utils import add_new_blocks -from tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest class GetMiningInfoTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/test_profiler.py b/hathor_tests/resources/test_profiler.py similarity index 96% rename from tests/resources/test_profiler.py rename to hathor_tests/resources/test_profiler.py index f961705aa..27b24686f 100644 --- a/tests/resources/test_profiler.py +++ b/hathor_tests/resources/test_profiler.py @@ -6,7 +6,7 @@ from twisted.internet.defer import inlineCallbacks from hathor.profiler.resources import ProfilerResource -from tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest class ProfilerTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/test_stratum.py b/hathor_tests/resources/test_stratum.py similarity index 97% rename from tests/resources/test_stratum.py rename to hathor_tests/resources/test_stratum.py index e73056a55..eb56a6f38 100644 --- a/tests/resources/test_stratum.py +++ b/hathor_tests/resources/test_stratum.py @@ -6,7 +6,7 @@ from hathor.stratum import JSONRPC from hathor.stratum.resources import MiningStatsResource from hathor.util import json_dumpb, json_loads -from tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest class StratumResourceTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/test_version.py b/hathor_tests/resources/test_version.py similarity index 97% rename from tests/resources/test_version.py rename to hathor_tests/resources/test_version.py index fd6be2eb9..9d20d97b9 100644 --- a/tests/resources/test_version.py +++ b/hathor_tests/resources/test_version.py @@ -8,7 +8,7 @@ import hathor from hathor.version import BASE_VERSION, DEFAULT_VERSION_SUFFIX, _get_version from hathor.version_resource import VersionResource -from tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest class VersionTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/transaction/__init__.py b/hathor_tests/resources/transaction/__init__.py similarity index 100% rename from tests/resources/transaction/__init__.py rename to hathor_tests/resources/transaction/__init__.py diff --git a/tests/resources/transaction/test_block_at_height.py b/hathor_tests/resources/transaction/test_block_at_height.py similarity index 96% rename from tests/resources/transaction/test_block_at_height.py rename to hathor_tests/resources/transaction/test_block_at_height.py index 71856bb39..7a19967ba 100644 --- a/tests/resources/transaction/test_block_at_height.py +++ b/hathor_tests/resources/transaction/test_block_at_height.py @@ -2,8 +2,8 @@ from hathor.simulator.utils import add_new_block, add_new_blocks from hathor.transaction.resources import BlockAtHeightResource -from tests.resources.base_resource import StubSite, _BaseResourceTest -from tests.utils import add_blocks_unlock_reward, add_new_tx +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.utils import add_blocks_unlock_reward, add_new_tx class BlockAtHeightTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/transaction/test_create_tx.py b/hathor_tests/resources/transaction/test_create_tx.py similarity index 98% rename from tests/resources/transaction/test_create_tx.py rename to hathor_tests/resources/transaction/test_create_tx.py index 62bda2f24..8f190a222 100644 --- a/tests/resources/transaction/test_create_tx.py +++ b/hathor_tests/resources/transaction/test_create_tx.py @@ -7,8 +7,8 @@ from hathor.transaction import Transaction from hathor.transaction.resources import CreateTxResource from hathor.transaction.scripts import P2PKH, create_base_script -from tests.resources.base_resource import StubSite, _BaseResourceTest -from tests.utils import add_blocks_unlock_reward, add_new_tx +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.utils import add_blocks_unlock_reward, add_new_tx class TransactionTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/transaction/test_dashboard.py b/hathor_tests/resources/transaction/test_dashboard.py similarity index 97% rename from tests/resources/transaction/test_dashboard.py rename to hathor_tests/resources/transaction/test_dashboard.py index 7775f7f95..fa431689c 100644 --- a/tests/resources/transaction/test_dashboard.py +++ b/hathor_tests/resources/transaction/test_dashboard.py @@ -1,7 +1,7 @@ from twisted.internet.defer import inlineCallbacks from hathor.transaction.resources import DashboardTransactionResource -from tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest class DashboardTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/transaction/test_decodetx.py b/hathor_tests/resources/transaction/test_decodetx.py similarity index 93% rename from tests/resources/transaction/test_decodetx.py rename to hathor_tests/resources/transaction/test_decodetx.py index 9cdeedb29..81daed56b 100644 --- a/tests/resources/transaction/test_decodetx.py +++ b/hathor_tests/resources/transaction/test_decodetx.py @@ -2,8 +2,8 @@ from hathor.transaction.resources import DecodeTxResource from hathor.transaction.scripts import parse_address_script -from tests.resources.base_resource import StubSite, _BaseResourceTest -from tests.utils import add_blocks_unlock_reward, create_tokens +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.utils import add_blocks_unlock_reward, create_tokens class DecodeTxTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/transaction/test_get_tx_parents.py b/hathor_tests/resources/transaction/test_get_tx_parents.py similarity index 90% rename from tests/resources/transaction/test_get_tx_parents.py rename to hathor_tests/resources/transaction/test_get_tx_parents.py index fc1502e1a..5ecb0bf84 100644 --- a/tests/resources/transaction/test_get_tx_parents.py +++ b/hathor_tests/resources/transaction/test_get_tx_parents.py @@ -1,7 +1,7 @@ from twisted.internet.defer import inlineCallbacks from hathor.transaction.resources import TxParentsResource -from tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest class DecodeTxTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/transaction/test_graphviz.py b/hathor_tests/resources/transaction/test_graphviz.py similarity index 95% rename from tests/resources/transaction/test_graphviz.py rename to hathor_tests/resources/transaction/test_graphviz.py index 5f29bc07f..b307ab2eb 100644 --- a/tests/resources/transaction/test_graphviz.py +++ b/hathor_tests/resources/transaction/test_graphviz.py @@ -3,8 +3,8 @@ from hathor.simulator.utils import add_new_blocks from hathor.transaction import Transaction from hathor.transaction.resources import GraphvizFullResource, GraphvizNeighboursResource -from tests.resources.base_resource import StubSite, TestDummyRequest, _BaseResourceTest -from tests.utils import add_blocks_unlock_reward, add_new_transactions +from hathor_tests.resources.base_resource import StubSite, TestDummyRequest, _BaseResourceTest +from hathor_tests.utils import add_blocks_unlock_reward, add_new_transactions class BaseGraphvizTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/transaction/test_mempool.py b/hathor_tests/resources/transaction/test_mempool.py similarity index 93% rename from tests/resources/transaction/test_mempool.py rename to hathor_tests/resources/transaction/test_mempool.py index b9d54ca2e..edfadc777 100644 --- a/tests/resources/transaction/test_mempool.py +++ b/hathor_tests/resources/transaction/test_mempool.py @@ -2,8 +2,8 @@ from hathor.simulator.utils import add_new_blocks from hathor.transaction.resources import MempoolResource -from tests.resources.base_resource import StubSite, _BaseResourceTest -from tests.utils import add_blocks_unlock_reward, add_new_transactions +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.utils import add_blocks_unlock_reward, add_new_transactions class MempoolTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/transaction/test_mining.py b/hathor_tests/resources/transaction/test_mining.py similarity index 94% rename from tests/resources/transaction/test_mining.py rename to hathor_tests/resources/transaction/test_mining.py index 0550751eb..5f8fc2f56 100644 --- a/tests/resources/transaction/test_mining.py +++ b/hathor_tests/resources/transaction/test_mining.py @@ -2,7 +2,7 @@ from hathor.mining.cpu_mining_service import CpuMiningService from hathor.transaction.resources import mining -from tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest class MiningApiTest(_BaseResourceTest._ResourceTest): @@ -28,6 +28,7 @@ def test_get_block_template_with_address(self): 'spent_outputs': [], 'received_by': [], 'children': [], + 'has_more_children': False, 'conflict_with': [], 'voided_by': [], 'twins': [], @@ -43,6 +44,7 @@ def test_get_block_template_with_address(self): 'nc_block_root_id': None, 'nc_execution': None, 'nc_calls': None, + 'nc_events': None, }, 'tokens': [], 'data': '', @@ -66,6 +68,7 @@ def test_get_block_template_without_address(self): 'spent_outputs': [], 'received_by': [], 'children': [], + 'has_more_children': False, 'conflict_with': [], 'voided_by': [], 'twins': [], @@ -81,6 +84,7 @@ def test_get_block_template_without_address(self): 'nc_block_root_id': None, 'nc_execution': None, 'nc_calls': None, + 'nc_events': None, }, 'tokens': [], 'data': '', diff --git a/tests/resources/transaction/test_pushtx.py b/hathor_tests/resources/transaction/test_pushtx.py similarity index 98% rename from tests/resources/transaction/test_pushtx.py rename to hathor_tests/resources/transaction/test_pushtx.py index 3f488e429..5cbf9a062 100644 --- a/tests/resources/transaction/test_pushtx.py +++ b/hathor_tests/resources/transaction/test_pushtx.py @@ -9,8 +9,8 @@ from hathor.transaction.scripts import P2PKH, parse_address_script from hathor.wallet.base_wallet import WalletInputInfo, WalletOutputInfo from hathor.wallet.resources import SendTokensResource -from tests.resources.base_resource import StubSite, _BaseResourceTest -from tests.utils import add_blocks_unlock_reward, add_tx_with_data_script, create_tokens +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.utils import add_blocks_unlock_reward, add_tx_with_data_script, create_tokens class BasePushTxTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/transaction/test_transaction_confirmation.py b/hathor_tests/resources/transaction/test_transaction_confirmation.py similarity index 94% rename from tests/resources/transaction/test_transaction_confirmation.py rename to hathor_tests/resources/transaction/test_transaction_confirmation.py index 02e91f91d..178f9a939 100644 --- a/tests/resources/transaction/test_transaction_confirmation.py +++ b/hathor_tests/resources/transaction/test_transaction_confirmation.py @@ -2,8 +2,8 @@ from hathor.simulator.utils import add_new_blocks from hathor.transaction.resources import TransactionAccWeightResource -from tests.resources.base_resource import StubSite, _BaseResourceTest -from tests.utils import add_blocks_unlock_reward, add_new_transactions +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.utils import add_blocks_unlock_reward, add_new_transactions class TransactionTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/transaction/test_tx.py b/hathor_tests/resources/transaction/test_tx.py similarity index 99% rename from tests/resources/transaction/test_tx.py rename to hathor_tests/resources/transaction/test_tx.py index a3f287331..3a461e1bd 100644 --- a/tests/resources/transaction/test_tx.py +++ b/hathor_tests/resources/transaction/test_tx.py @@ -7,8 +7,8 @@ from hathor.transaction.token_creation_tx import TokenCreationTransaction from hathor.transaction.token_info import TokenVersion from hathor.transaction.validation_state import ValidationState -from tests.resources.base_resource import StubSite, _BaseResourceTest -from tests.utils import add_blocks_unlock_reward, add_new_transactions +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.utils import add_blocks_unlock_reward, add_new_transactions class TransactionTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/transaction/test_utxo_search.py b/hathor_tests/resources/transaction/test_utxo_search.py similarity index 97% rename from tests/resources/transaction/test_utxo_search.py rename to hathor_tests/resources/transaction/test_utxo_search.py index b2c02cb83..a8361cad2 100644 --- a/tests/resources/transaction/test_utxo_search.py +++ b/hathor_tests/resources/transaction/test_utxo_search.py @@ -3,8 +3,8 @@ from hathor.crypto.util import decode_address from hathor.simulator.utils import add_new_blocks from hathor.transaction.resources import UtxoSearchResource -from tests.resources.base_resource import StubSite, _BaseResourceTest -from tests.utils import add_blocks_unlock_reward +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.utils import add_blocks_unlock_reward class UtxoSearchTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/transaction/test_validate_address.py b/hathor_tests/resources/transaction/test_validate_address.py similarity index 96% rename from tests/resources/transaction/test_validate_address.py rename to hathor_tests/resources/transaction/test_validate_address.py index 24dec4b87..6d89d933b 100644 --- a/tests/resources/transaction/test_validate_address.py +++ b/hathor_tests/resources/transaction/test_validate_address.py @@ -1,7 +1,7 @@ from twisted.internet.defer import inlineCallbacks from hathor.transaction.resources import ValidateAddressResource -from tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest class TransactionTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/wallet/__init__.py b/hathor_tests/resources/wallet/__init__.py similarity index 100% rename from tests/resources/wallet/__init__.py rename to hathor_tests/resources/wallet/__init__.py diff --git a/tests/resources/wallet/test_address.py b/hathor_tests/resources/wallet/test_address.py similarity index 93% rename from tests/resources/wallet/test_address.py rename to hathor_tests/resources/wallet/test_address.py index 290b629d2..174017a81 100644 --- a/tests/resources/wallet/test_address.py +++ b/hathor_tests/resources/wallet/test_address.py @@ -1,7 +1,7 @@ from twisted.internet.defer import inlineCallbacks from hathor.wallet.resources import AddressResource -from tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest class AddressTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/wallet/test_balance.py b/hathor_tests/resources/wallet/test_balance.py similarity index 91% rename from tests/resources/wallet/test_balance.py rename to hathor_tests/resources/wallet/test_balance.py index 63b883771..69740fedf 100644 --- a/tests/resources/wallet/test_balance.py +++ b/hathor_tests/resources/wallet/test_balance.py @@ -5,8 +5,8 @@ from hathor.mining.cpu_mining_service import CpuMiningService from hathor.p2p.resources import MiningResource from hathor.wallet.resources import BalanceResource -from tests.resources.base_resource import StubSite, _BaseResourceTest -from tests.utils import resolve_block_bytes +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.utils import resolve_block_bytes class BalanceTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/wallet/test_history.py b/hathor_tests/resources/wallet/test_history.py similarity index 90% rename from tests/resources/wallet/test_history.py rename to hathor_tests/resources/wallet/test_history.py index cce60475a..d76dee4b3 100644 --- a/tests/resources/wallet/test_history.py +++ b/hathor_tests/resources/wallet/test_history.py @@ -5,8 +5,8 @@ from hathor.mining.cpu_mining_service import CpuMiningService from hathor.p2p.resources import MiningResource from hathor.wallet.resources import HistoryResource -from tests.resources.base_resource import StubSite, _BaseResourceTest -from tests.utils import resolve_block_bytes +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.utils import resolve_block_bytes class HistoryTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/wallet/test_lock.py b/hathor_tests/resources/wallet/test_lock.py similarity index 95% rename from tests/resources/wallet/test_lock.py rename to hathor_tests/resources/wallet/test_lock.py index 356d05ffb..4db724aec 100644 --- a/tests/resources/wallet/test_lock.py +++ b/hathor_tests/resources/wallet/test_lock.py @@ -1,7 +1,7 @@ from twisted.internet.defer import inlineCallbacks from hathor.wallet.resources import LockWalletResource, StateWalletResource, UnlockWalletResource -from tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest class LockTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/wallet/test_nano_contract.py b/hathor_tests/resources/wallet/test_nano_contract.py similarity index 98% rename from tests/resources/wallet/test_nano_contract.py rename to hathor_tests/resources/wallet/test_nano_contract.py index 66228ff4a..7380871d5 100644 --- a/tests/resources/wallet/test_nano_contract.py +++ b/hathor_tests/resources/wallet/test_nano_contract.py @@ -10,8 +10,8 @@ NanoContractExecuteResource, NanoContractMatchValueResource, ) -from tests.resources.base_resource import StubSite, TestDummyRequest, _BaseResourceTest -from tests.utils import add_blocks_unlock_reward +from hathor_tests.resources.base_resource import StubSite, TestDummyRequest, _BaseResourceTest +from hathor_tests.utils import add_blocks_unlock_reward class NanoContractsTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/wallet/test_search_address.py b/hathor_tests/resources/wallet/test_search_address.py similarity index 97% rename from tests/resources/wallet/test_search_address.py rename to hathor_tests/resources/wallet/test_search_address.py index bee2a3b8d..6032fe344 100644 --- a/tests/resources/wallet/test_search_address.py +++ b/hathor_tests/resources/wallet/test_search_address.py @@ -4,8 +4,8 @@ from hathor.simulator.utils import add_new_blocks from hathor.transaction.scripts import parse_address_script from hathor.wallet.resources.thin_wallet import AddressBalanceResource, AddressSearchResource -from tests.resources.base_resource import StubSite, _BaseResourceTest -from tests.utils import add_blocks_unlock_reward, create_tokens +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.utils import add_blocks_unlock_reward, create_tokens class SearchAddressTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/wallet/test_send_tokens.py b/hathor_tests/resources/wallet/test_send_tokens.py similarity index 97% rename from tests/resources/wallet/test_send_tokens.py rename to hathor_tests/resources/wallet/test_send_tokens.py index 34c4026a5..c6814ffb0 100644 --- a/tests/resources/wallet/test_send_tokens.py +++ b/hathor_tests/resources/wallet/test_send_tokens.py @@ -7,8 +7,8 @@ from hathor.p2p.resources import MiningResource from hathor.simulator.utils import add_new_blocks from hathor.wallet.resources import BalanceResource, HistoryResource, SendTokensResource -from tests.resources.base_resource import StubSite, TestDummyRequest, _BaseResourceTest -from tests.utils import add_blocks_unlock_reward, resolve_block_bytes +from hathor_tests.resources.base_resource import StubSite, TestDummyRequest, _BaseResourceTest +from hathor_tests.utils import add_blocks_unlock_reward, resolve_block_bytes class SendTokensTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/wallet/test_thin_wallet.py b/hathor_tests/resources/wallet/test_thin_wallet.py similarity index 99% rename from tests/resources/wallet/test_thin_wallet.py rename to hathor_tests/resources/wallet/test_thin_wallet.py index ee8fef08c..eefaef181 100644 --- a/tests/resources/wallet/test_thin_wallet.py +++ b/hathor_tests/resources/wallet/test_thin_wallet.py @@ -14,8 +14,8 @@ TokenHistoryResource, TokenResource, ) -from tests.resources.base_resource import StubSite, TestDummyRequest, _BaseResourceTest -from tests.utils import add_blocks_unlock_reward, add_new_tx, create_fee_tokens, create_tokens +from hathor_tests.resources.base_resource import StubSite, TestDummyRequest, _BaseResourceTest +from hathor_tests.utils import add_blocks_unlock_reward, add_new_tx, create_fee_tokens, create_tokens class SendTokensTest(_BaseResourceTest._ResourceTest): diff --git a/tests/resources/wallet/test_unlock.py b/hathor_tests/resources/wallet/test_unlock.py similarity index 97% rename from tests/resources/wallet/test_unlock.py rename to hathor_tests/resources/wallet/test_unlock.py index 29c86078f..452fb41bb 100644 --- a/tests/resources/wallet/test_unlock.py +++ b/hathor_tests/resources/wallet/test_unlock.py @@ -2,7 +2,7 @@ from hathor.wallet import HDWallet from hathor.wallet.resources import LockWalletResource, StateWalletResource, UnlockWalletResource -from tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest class UnlockTest(_BaseResourceTest._ResourceTest): diff --git a/tests/serialization/__init__.py b/hathor_tests/serialization/__init__.py similarity index 100% rename from tests/serialization/__init__.py rename to hathor_tests/serialization/__init__.py diff --git a/tests/serialization/test_ecv.py b/hathor_tests/serialization/test_ecv.py similarity index 100% rename from tests/serialization/test_ecv.py rename to hathor_tests/serialization/test_ecv.py diff --git a/tests/serialization/test_leb128.py b/hathor_tests/serialization/test_leb128.py similarity index 100% rename from tests/serialization/test_leb128.py rename to hathor_tests/serialization/test_leb128.py diff --git a/tests/serialization/test_sized_int.py b/hathor_tests/serialization/test_sized_int.py similarity index 100% rename from tests/serialization/test_sized_int.py rename to hathor_tests/serialization/test_sized_int.py diff --git a/tests/simulation/__init__.py b/hathor_tests/simulation/__init__.py similarity index 100% rename from tests/simulation/__init__.py rename to hathor_tests/simulation/__init__.py diff --git a/tests/simulation/base.py b/hathor_tests/simulation/base.py similarity index 96% rename from tests/simulation/base.py rename to hathor_tests/simulation/base.py index 4a8e7a5f2..026d7ac56 100644 --- a/tests/simulation/base.py +++ b/hathor_tests/simulation/base.py @@ -3,7 +3,7 @@ from hathor.manager import HathorManager from hathor.simulator import Simulator from hathor.types import VertexId -from tests import unittest +from hathor_tests import unittest class SimulatorTestCase(unittest.TestCase): diff --git a/tests/simulation/test_simulator.py b/hathor_tests/simulation/test_simulator.py similarity index 99% rename from tests/simulation/test_simulator.py rename to hathor_tests/simulation/test_simulator.py index 9e76869c6..eb74091e3 100644 --- a/tests/simulation/test_simulator.py +++ b/hathor_tests/simulation/test_simulator.py @@ -3,7 +3,7 @@ from hathor.simulator import FakeConnection from hathor.simulator.trigger import All as AllTriggers, StopWhenSynced, Trigger from hathor.verification.vertex_verifier import VertexVerifier -from tests.simulation.base import SimulatorTestCase +from hathor_tests.simulation.base import SimulatorTestCase class RandomSimulatorTestCase(SimulatorTestCase): diff --git a/tests/simulation/test_simulator_itself.py b/hathor_tests/simulation/test_simulator_itself.py similarity index 99% rename from tests/simulation/test_simulator_itself.py rename to hathor_tests/simulation/test_simulator_itself.py index d557c77a3..60ac8eaf3 100644 --- a/tests/simulation/test_simulator_itself.py +++ b/hathor_tests/simulation/test_simulator_itself.py @@ -3,7 +3,7 @@ from hathor.manager import HathorManager from hathor.p2p.peer import PrivatePeer from hathor.simulator import FakeConnection, Simulator -from tests import unittest +from hathor_tests import unittest class SimulatorSelfTestCase(unittest.TestCase): diff --git a/tests/simulation/test_trigger.py b/hathor_tests/simulation/test_trigger.py similarity index 98% rename from tests/simulation/test_trigger.py rename to hathor_tests/simulation/test_trigger.py index 678902d47..1e20e7947 100644 --- a/tests/simulation/test_trigger.py +++ b/hathor_tests/simulation/test_trigger.py @@ -4,7 +4,7 @@ from hathor.simulator import FakeConnection, Simulator from hathor.simulator.trigger import StopAfterMinimumBalance, StopAfterNMinedBlocks, StopWhenSendLineMatch from hathor.util import not_none -from tests import unittest +from hathor_tests import unittest class TriggerTestCase(unittest.TestCase): diff --git a/tests/sysctl/__init__.py b/hathor_tests/sysctl/__init__.py similarity index 100% rename from tests/sysctl/__init__.py rename to hathor_tests/sysctl/__init__.py diff --git a/tests/sysctl/test_core.py b/hathor_tests/sysctl/test_core.py similarity index 95% rename from tests/sysctl/test_core.py rename to hathor_tests/sysctl/test_core.py index d8c76fbe9..8454ba0eb 100644 --- a/tests/sysctl/test_core.py +++ b/hathor_tests/sysctl/test_core.py @@ -1,7 +1,7 @@ from unittest.mock import MagicMock, Mock, call from hathor.sysctl import HathorManagerSysctl -from tests.simulation.base import SimulatorTestCase +from hathor_tests.simulation.base import SimulatorTestCase class HathorManagerSysctlTestCase(SimulatorTestCase): diff --git a/tests/sysctl/test_feature_activation.py b/hathor_tests/sysctl/test_feature_activation.py similarity index 100% rename from tests/sysctl/test_feature_activation.py rename to hathor_tests/sysctl/test_feature_activation.py diff --git a/tests/sysctl/test_p2p.py b/hathor_tests/sysctl/test_p2p.py similarity index 99% rename from tests/sysctl/test_p2p.py rename to hathor_tests/sysctl/test_p2p.py index 0550939e0..460ea884c 100644 --- a/tests/sysctl/test_p2p.py +++ b/hathor_tests/sysctl/test_p2p.py @@ -5,7 +5,7 @@ from hathor.p2p.peer_id import PeerId from hathor.sysctl import ConnectionsManagerSysctl from hathor.sysctl.exception import SysctlException -from tests.simulation.base import SimulatorTestCase +from hathor_tests.simulation.base import SimulatorTestCase class RandomSimulatorTestCase(SimulatorTestCase): diff --git a/tests/sysctl/test_runner.py b/hathor_tests/sysctl/test_runner.py similarity index 100% rename from tests/sysctl/test_runner.py rename to hathor_tests/sysctl/test_runner.py diff --git a/tests/sysctl/test_sysctl.py b/hathor_tests/sysctl/test_sysctl.py similarity index 99% rename from tests/sysctl/test_sysctl.py rename to hathor_tests/sysctl/test_sysctl.py index 01d8b46cc..f676bdf74 100644 --- a/tests/sysctl/test_sysctl.py +++ b/hathor_tests/sysctl/test_sysctl.py @@ -8,7 +8,7 @@ from hathor.sysctl.factory import SysctlFactory from hathor.sysctl.runner import SysctlRunner from hathor.sysctl.sysctl import SysctlCommand -from tests import unittest +from hathor_tests import unittest class SysctlTest(unittest.TestCase): diff --git a/tests/sysctl/test_websocket.py b/hathor_tests/sysctl/test_websocket.py similarity index 98% rename from tests/sysctl/test_websocket.py rename to hathor_tests/sysctl/test_websocket.py index 14e7fd6e4..a61d998c9 100644 --- a/tests/sysctl/test_websocket.py +++ b/hathor_tests/sysctl/test_websocket.py @@ -1,7 +1,7 @@ from hathor.sysctl import WebsocketManagerSysctl from hathor.sysctl.exception import SysctlException from hathor.websocket.factory import HathorAdminWebsocketFactory -from tests import unittest +from hathor_tests import unittest class WebsocketSysctlTestCase(unittest.TestCase): diff --git a/tests/test_memory_reactor_clock.py b/hathor_tests/test_memory_reactor_clock.py similarity index 100% rename from tests/test_memory_reactor_clock.py rename to hathor_tests/test_memory_reactor_clock.py diff --git a/tests/test_utils/__init__.py b/hathor_tests/test_utils/__init__.py similarity index 100% rename from tests/test_utils/__init__.py rename to hathor_tests/test_utils/__init__.py diff --git a/tests/test_utils/test_api.py b/hathor_tests/test_utils/test_api.py similarity index 100% rename from tests/test_utils/test_api.py rename to hathor_tests/test_utils/test_api.py diff --git a/tests/test_utils/test_leb128.py b/hathor_tests/test_utils/test_leb128.py similarity index 100% rename from tests/test_utils/test_leb128.py rename to hathor_tests/test_utils/test_leb128.py diff --git a/tests/test_utils/test_list.py b/hathor_tests/test_utils/test_list.py similarity index 100% rename from tests/test_utils/test_list.py rename to hathor_tests/test_utils/test_list.py diff --git a/tests/tx/__init__.py b/hathor_tests/tx/__init__.py similarity index 100% rename from tests/tx/__init__.py rename to hathor_tests/tx/__init__.py diff --git a/tests/tx/test_accumulated_weight.py b/hathor_tests/tx/test_accumulated_weight.py similarity index 93% rename from tests/tx/test_accumulated_weight.py rename to hathor_tests/tx/test_accumulated_weight.py index 79d06b0e0..3d33c6d8b 100644 --- a/tests/tx/test_accumulated_weight.py +++ b/hathor_tests/tx/test_accumulated_weight.py @@ -1,7 +1,7 @@ from hathor.simulator.utils import add_new_blocks from hathor.utils.weight import weight_to_work -from tests import unittest -from tests.utils import add_blocks_unlock_reward, add_new_transactions +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward, add_new_transactions class AccumulatedWeightTestCase(unittest.TestCase): diff --git a/tests/tx/test_block.py b/hathor_tests/tx/test_block.py similarity index 99% rename from tests/tx/test_block.py rename to hathor_tests/tx/test_block.py index 8f09ab7a0..a4e99d55c 100644 --- a/tests/tx/test_block.py +++ b/hathor_tests/tx/test_block.py @@ -27,7 +27,7 @@ from hathor.transaction.validation_state import ValidationState from hathor.util import not_none from hathor.verification.block_verifier import BlockVerifier -from tests.unittest import TestBuilder +from hathor_tests.unittest import TestBuilder def test_calculate_feature_activation_bit_counts_genesis(): diff --git a/tests/tx/test_blockchain.py b/hathor_tests/tx/test_blockchain.py similarity index 99% rename from tests/tx/test_blockchain.py rename to hathor_tests/tx/test_blockchain.py index 4148ce9a1..13c832cb1 100644 --- a/tests/tx/test_blockchain.py +++ b/hathor_tests/tx/test_blockchain.py @@ -3,8 +3,8 @@ from hathor.daa import DifficultyAdjustmentAlgorithm, TestMode from hathor.simulator.utils import add_new_blocks from hathor.utils.weight import weight_to_work -from tests import unittest -from tests.utils import add_new_transactions +from hathor_tests import unittest +from hathor_tests.utils import add_new_transactions class BlockchainTestCase(unittest.TestCase): diff --git a/tests/tx/test_cache_storage.py b/hathor_tests/tx/test_cache_storage.py similarity index 98% rename from tests/tx/test_cache_storage.py rename to hathor_tests/tx/test_cache_storage.py index d271a00b1..0269026e9 100644 --- a/tests/tx/test_cache_storage.py +++ b/hathor_tests/tx/test_cache_storage.py @@ -2,8 +2,8 @@ from hathor.simulator.utils import add_new_blocks from hathor.transaction import Transaction, TransactionMetadata from hathor.transaction.storage import TransactionCacheStorage -from tests import unittest -from tests.utils import add_new_transactions +from hathor_tests import unittest +from hathor_tests.utils import add_new_transactions CACHE_SIZE = 5 diff --git a/tests/tx/test_fee_header.py b/hathor_tests/tx/test_fee_header.py similarity index 99% rename from tests/tx/test_fee_header.py rename to hathor_tests/tx/test_fee_header.py index f1f1ed075..ac7c254a8 100644 --- a/tests/tx/test_fee_header.py +++ b/hathor_tests/tx/test_fee_header.py @@ -3,7 +3,7 @@ from hathor.transaction import Transaction from hathor.transaction.headers.fee_header import FeeEntry, FeeHeader, FeeHeaderEntry from hathor.types import TokenUid -from tests import unittest +from hathor_tests import unittest class FeeHeaderTest(unittest.TestCase): diff --git a/tests/tx/test_fee_tokens.py b/hathor_tests/tx/test_fee_tokens.py similarity index 99% rename from tests/tx/test_fee_tokens.py rename to hathor_tests/tx/test_fee_tokens.py index 7af49c551..797870987 100644 --- a/tests/tx/test_fee_tokens.py +++ b/hathor_tests/tx/test_fee_tokens.py @@ -26,9 +26,9 @@ from hathor.transaction.token_creation_tx import TokenCreationTransaction from hathor.transaction.token_info import TokenVersion from hathor.transaction.util import get_deposit_token_withdraw_amount -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder -from tests.utils import add_blocks_unlock_reward, create_fee_tokens, create_tokens, get_genesis_key +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.utils import add_blocks_unlock_reward, create_fee_tokens, create_tokens, get_genesis_key class FeeTokenTest(unittest.TestCase): diff --git a/tests/tx/test_generate_tx_parents.py b/hathor_tests/tx/test_generate_tx_parents.py similarity index 98% rename from tests/tx/test_generate_tx_parents.py rename to hathor_tests/tx/test_generate_tx_parents.py index c3742124c..993e3e5ea 100644 --- a/tests/tx/test_generate_tx_parents.py +++ b/hathor_tests/tx/test_generate_tx_parents.py @@ -13,8 +13,8 @@ # limitations under the License. from hathor.transaction import Block, Transaction -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder class GenerateTxParentsTestCase(unittest.TestCase): diff --git a/tests/tx/test_genesis.py b/hathor_tests/tx/test_genesis.py similarity index 99% rename from tests/tx/test_genesis.py rename to hathor_tests/tx/test_genesis.py index ba930c539..7e21eb875 100644 --- a/tests/tx/test_genesis.py +++ b/hathor_tests/tx/test_genesis.py @@ -6,7 +6,7 @@ from hathor.verification.verification_service import VerificationService from hathor.verification.vertex_verifier import VertexVerifier from hathor.verification.vertex_verifiers import VertexVerifiers -from tests import unittest +from hathor_tests import unittest settings = HathorSettings() diff --git a/tests/tx/test_indexes.py b/hathor_tests/tx/test_indexes.py similarity index 98% rename from tests/tx/test_indexes.py rename to hathor_tests/tx/test_indexes.py index 2bc5a382d..031540b6a 100644 --- a/tests/tx/test_indexes.py +++ b/hathor_tests/tx/test_indexes.py @@ -3,11 +3,12 @@ from hathor.simulator.utils import add_new_block, add_new_blocks from hathor.storage.rocksdb_storage import RocksDBStorage from hathor.transaction import Transaction +from hathor.transaction.vertex_children import RocksDBVertexChildrenService from hathor.transaction.vertex_parser import VertexParser from hathor.util import initialize_hd_wallet, iwindows from hathor.wallet import Wallet -from tests import unittest -from tests.utils import DEFAULT_WORDS, add_blocks_unlock_reward, add_custom_tx, add_new_tx, get_genesis_key +from hathor_tests import unittest +from hathor_tests.utils import DEFAULT_WORDS, add_blocks_unlock_reward, add_custom_tx, add_new_tx, get_genesis_key class BaseIndexesTest(unittest.TestCase): @@ -134,7 +135,7 @@ def test_genesis_not_in_mempool(self): def test_utxo_index_genesis(self): from hathor.indexes.utxo_index import UtxoIndexItem - from tests.utils import GENESIS_ADDRESS_B58 + from hathor_tests.utils import GENESIS_ADDRESS_B58 HTR_UID = self._settings.HATHOR_TOKEN_UID @@ -703,11 +704,13 @@ def setUp(self): rocksdb_storage = RocksDBStorage(path=directory) parser = VertexParser(settings=self._settings) nc_storage_factory = NCRocksDBStorageFactory(rocksdb_storage) + vertex_children_service = RocksDBVertexChildrenService(rocksdb_storage) self.tx_storage = TransactionRocksDBStorage( rocksdb_storage, settings=self._settings, vertex_parser=parser, nc_storage_factory=nc_storage_factory, + vertex_children_service=vertex_children_service, ) self.genesis = self.tx_storage.get_all_genesis() self.genesis_blocks = [tx for tx in self.genesis if tx.is_block] diff --git a/tests/tx/test_indexes3.py b/hathor_tests/tx/test_indexes3.py similarity index 97% rename from tests/tx/test_indexes3.py rename to hathor_tests/tx/test_indexes3.py index b0c47ba00..1d20678fe 100644 --- a/tests/tx/test_indexes3.py +++ b/hathor_tests/tx/test_indexes3.py @@ -1,7 +1,7 @@ import pytest from hathor.simulator import FakeConnection -from tests.simulation.base import SimulatorTestCase +from hathor_tests.simulation.base import SimulatorTestCase class SimulatorIndexesTestCase(SimulatorTestCase): @@ -92,7 +92,7 @@ def test_topological_iterators(self): # XXX: sanity check that the children metadata is properly set (this is needed for one of the iterators) for tx in tx_storage.get_all_transactions(): for parent_tx in map(tx_storage.get_transaction, tx.parents): - self.assertIn(tx.hash, parent_tx.get_metadata().children) + self.assertIn(tx.hash, parent_tx.get_children()) # test iterators, name is used to aid in assert messages iterators = [ diff --git a/tests/tx/test_indexes4.py b/hathor_tests/tx/test_indexes4.py similarity index 97% rename from tests/tx/test_indexes4.py rename to hathor_tests/tx/test_indexes4.py index 8416cc21e..72e264810 100644 --- a/tests/tx/test_indexes4.py +++ b/hathor_tests/tx/test_indexes4.py @@ -2,8 +2,8 @@ from hathor.simulator.utils import add_new_blocks, gen_new_tx from hathor.transaction import Transaction from hathor.wallet.base_wallet import WalletOutputInfo -from tests import unittest -from tests.utils import add_blocks_unlock_reward +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward class SimulatorIndexesTestCase(unittest.TestCase): @@ -119,7 +119,7 @@ def test_topological_iterators(self): # XXX: sanity check that the children metadata is properly set (this is needed for one of the iterators) for tx in tx_storage.get_all_transactions(): for parent_tx in map(tx_storage.get_transaction, tx.parents): - self.assertIn(tx.hash, parent_tx.get_metadata().children) + self.assertIn(tx.hash, parent_tx.get_children()) # test iterators, name is used to aid in assert messages iterators = [ diff --git a/tests/tx/test_indexes_nc_history.py b/hathor_tests/tx/test_indexes_nc_history.py similarity index 92% rename from tests/tx/test_indexes_nc_history.py rename to hathor_tests/tx/test_indexes_nc_history.py index a45a5da89..471b9085e 100644 --- a/tests/tx/test_indexes_nc_history.py +++ b/hathor_tests/tx/test_indexes_nc_history.py @@ -7,11 +7,12 @@ from hathor.transaction import Transaction from hathor.transaction.headers import NanoHeader from hathor.transaction.storage import TransactionRocksDBStorage +from hathor.transaction.vertex_children import RocksDBVertexChildrenService from hathor.util import not_none from hathor.wallet import KeyPair, Wallet -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder -from tests.utils import add_blocks_unlock_reward, get_genesis_key +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.utils import add_blocks_unlock_reward, get_genesis_key settings = HathorSettings() @@ -197,10 +198,14 @@ def setUp(self): rocksdb_storage = RocksDBStorage(path=directory) vertex_parser = VertexParser(settings=self._settings) nc_storage_factory = NCRocksDBStorageFactory(rocksdb_storage) - self.tx_storage = TransactionRocksDBStorage(rocksdb_storage, - settings=self._settings, - vertex_parser=vertex_parser, - nc_storage_factory=nc_storage_factory) + vertex_children_service = RocksDBVertexChildrenService(rocksdb_storage) + self.tx_storage = TransactionRocksDBStorage( + rocksdb_storage, + settings=self._settings, + vertex_parser=vertex_parser, + nc_storage_factory=nc_storage_factory, + vertex_children_service=vertex_children_service, + ) self.genesis = self.tx_storage.get_all_genesis() self.genesis_blocks = [tx for tx in self.genesis if tx.is_block] self.genesis_txs = [tx for tx in self.genesis if not tx.is_block] diff --git a/tests/tx/test_mempool_tips_index.py b/hathor_tests/tx/test_mempool_tips_index.py similarity index 99% rename from tests/tx/test_mempool_tips_index.py rename to hathor_tests/tx/test_mempool_tips_index.py index 2bcc35ca5..fff713f1e 100644 --- a/tests/tx/test_mempool_tips_index.py +++ b/hathor_tests/tx/test_mempool_tips_index.py @@ -15,8 +15,8 @@ from hathor.daa import DifficultyAdjustmentAlgorithm, TestMode from hathor.graphviz import GraphvizVisualizer from hathor.transaction import Block, Transaction -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder DEBUG: bool = False diff --git a/tests/tx/test_merged_mining.py b/hathor_tests/tx/test_merged_mining.py similarity index 99% rename from tests/tx/test_merged_mining.py rename to hathor_tests/tx/test_merged_mining.py index 38721170f..41155f2b4 100644 --- a/tests/tx/test_merged_mining.py +++ b/hathor_tests/tx/test_merged_mining.py @@ -5,7 +5,7 @@ from hathor.merged_mining import MergedMiningCoordinator from hathor.merged_mining.bitcoin_rpc import IBitcoinRPC from hathor.merged_mining.util import as_deferred, ensure_deferred -from tests import unittest +from hathor_tests import unittest class SimpleTests(unittest.TestCase): diff --git a/hathor_tests/tx/test_metadata.py b/hathor_tests/tx/test_metadata.py new file mode 100644 index 000000000..44bc42115 --- /dev/null +++ b/hathor_tests/tx/test_metadata.py @@ -0,0 +1,114 @@ +# Copyright 2025 Hathor Labs +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from unittest.mock import Mock + +from hathor import BlueprintId, ContractId, TokenUid +from hathor.feature_activation.feature import Feature +from hathor.feature_activation.model.feature_state import FeatureState +from hathor.nanocontracts.runner.index_records import ( + CreateContractRecord, + CreateTokenRecord, + IndexRecordType, + UpdateAuthoritiesRecord, + UpdateTokenBalanceRecord, +) +from hathor.transaction import TransactionMetadata +from hathor.transaction.nc_execution_state import NCExecutionState +from hathor.transaction.token_info import TokenVersion +from hathor.transaction.types import MetaNCCallRecord +from hathor.transaction.validation_state import ValidationState +from hathor.util import not_none +from hathor_tests import unittest + + +class TestMetadata(unittest.TestCase): + def test_round_trip(self) -> None: + meta = TransactionMetadata() + meta._tx_ref = Mock() + meta.hash = b'abc' + meta.spent_outputs = {0: [b'1', b'2'], 10: [b'3']} + meta.conflict_with = [b'1', b'2'] + meta.voided_by = {b'1', b'2'} + meta.received_by = [1, 2, 3] + meta.twins = [b'1', b'2'] + meta.accumulated_weight = 123 + meta.score = 456 + meta.first_block = b'123' + meta.validation = ValidationState.FULL + meta.nc_block_root_id = b'456' + meta.nc_execution = NCExecutionState.SUCCESS + meta.nc_calls = [ + MetaNCCallRecord( + blueprint_id=b'foo', + contract_id=b'bar', + method_name='aaa', + index_updates=[ + CreateContractRecord( + blueprint_id=BlueprintId(b'bbb'), + contract_id=ContractId(b'ccc'), + ), + CreateTokenRecord( + token_uid=TokenUid(b'ttt'), + amount=123, + token_symbol='s', + token_name='n', + token_version=TokenVersion.FEE, + ), + UpdateTokenBalanceRecord( + token_uid=TokenUid(b'ttt'), + amount=123, + ), + UpdateAuthoritiesRecord( + type=IndexRecordType.REVOKE_AUTHORITIES, + token_uid=TokenUid(b'ttt'), + mint=True, + melt=True, + ), + ], + ), + ] + meta.nc_events = [ + (b'a', b'b'), + (b'c', b'd'), + ] + meta.feature_states = { + Feature.NOP_FEATURE_1: FeatureState.FAILED, + Feature.NOP_FEATURE_2: FeatureState.ACTIVE, + } + + storage_json = meta.to_storage_json() + meta2 = TransactionMetadata.create_from_json(storage_json) + meta3 = TransactionMetadata.from_bytes(meta.to_bytes()) + + assert meta.hash == meta2.hash and meta.hash == meta3.hash + assert meta.spent_outputs == meta2.spent_outputs and meta.spent_outputs == meta3.spent_outputs + assert ( + set(not_none(meta.conflict_with)) == set(not_none(meta2.conflict_with)) + and set(not_none(meta.conflict_with)) == set(not_none(meta3.conflict_with)) + ) + assert meta.voided_by == meta2.voided_by and meta.voided_by == meta3.voided_by + assert meta.received_by == meta2.received_by and meta.received_by == meta3.received_by + assert meta.twins == meta2.twins and meta.twins == meta3.twins + assert ( + meta.accumulated_weight == meta2.accumulated_weight and meta.accumulated_weight == meta3.accumulated_weight + ) + assert meta.score == meta2.score and meta.score == meta3.score + assert meta.first_block == meta2.first_block and meta.first_block == meta3.first_block + assert meta.validation == meta2.validation and meta.validation == meta3.validation + assert meta.nc_block_root_id == meta2.nc_block_root_id and meta.nc_block_root_id == meta3.nc_block_root_id + assert meta.nc_execution == meta2.nc_execution and meta.nc_execution == meta3.nc_execution + assert meta.nc_calls == meta2.nc_calls and meta.nc_calls == meta3.nc_calls + assert meta.nc_events == meta2.nc_events and meta.nc_events == meta3.nc_events + assert meta.feature_states == meta2.feature_states and meta.feature_states == meta3.feature_states diff --git a/tests/tx/test_mining.py b/hathor_tests/tx/test_mining.py similarity index 99% rename from tests/tx/test_mining.py rename to hathor_tests/tx/test_mining.py index 0e62acd30..f0473217f 100644 --- a/tests/tx/test_mining.py +++ b/hathor_tests/tx/test_mining.py @@ -4,7 +4,7 @@ from hathor.simulator.utils import add_new_blocks from hathor.transaction import Block from hathor.utils.weight import weight_to_work -from tests import unittest +from hathor_tests import unittest class MiningTest(unittest.TestCase): diff --git a/tests/tx/test_multisig.py b/hathor_tests/tx/test_multisig.py similarity index 98% rename from tests/tx/test_multisig.py rename to hathor_tests/tx/test_multisig.py index 82ac152d9..b8015db22 100644 --- a/tests/tx/test_multisig.py +++ b/hathor_tests/tx/test_multisig.py @@ -8,8 +8,8 @@ from hathor.transaction.scripts import P2PKH, MultiSig, create_output_script, parse_address_script, script_eval from hathor.wallet.base_wallet import WalletBalance, WalletOutputInfo from hathor.wallet.util import generate_multisig_address, generate_multisig_redeem_script, generate_signature -from tests import unittest -from tests.utils import add_blocks_unlock_reward +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward class MultisigTestCase(unittest.TestCase): diff --git a/tests/tx/test_nano_contracts.py b/hathor_tests/tx/test_nano_contracts.py similarity index 98% rename from tests/tx/test_nano_contracts.py rename to hathor_tests/tx/test_nano_contracts.py index b23addf81..9dc195cba 100644 --- a/tests/tx/test_nano_contracts.py +++ b/hathor_tests/tx/test_nano_contracts.py @@ -5,7 +5,7 @@ from hathor.transaction import Transaction, TxInput, TxOutput from hathor.transaction.scripts import P2PKH, NanoContractMatchValues, script_eval from hathor.util import json_dumpb -from tests import unittest +from hathor_tests import unittest class NanoContracts(unittest.TestCase): diff --git a/tests/tx/test_nano_header.py b/hathor_tests/tx/test_nano_header.py similarity index 99% rename from tests/tx/test_nano_header.py rename to hathor_tests/tx/test_nano_header.py index 1d1fd7194..fe9f15275 100644 --- a/tests/tx/test_nano_header.py +++ b/hathor_tests/tx/test_nano_header.py @@ -9,8 +9,8 @@ from hathor.transaction.headers.nano_header import ADDRESS_LEN_BYTES, NanoHeaderAction from hathor.transaction.token_creation_tx import TokenCreationTransaction from hathor.transaction.util import VerboseCallback -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder class MyTestBlueprint(Blueprint): diff --git a/tests/tx/test_prometheus.py b/hathor_tests/tx/test_prometheus.py similarity index 96% rename from tests/tx/test_prometheus.py rename to hathor_tests/tx/test_prometheus.py index d7784de18..5b4f63854 100644 --- a/tests/tx/test_prometheus.py +++ b/hathor_tests/tx/test_prometheus.py @@ -4,8 +4,8 @@ from hathor.prometheus import PrometheusMetricsExporter from hathor.simulator.utils import add_new_blocks -from tests import unittest -from tests.utils import add_new_transactions +from hathor_tests import unittest +from hathor_tests.utils import add_new_transactions class PrometheusTest(unittest.TestCase): diff --git a/tests/tx/test_reward_lock.py b/hathor_tests/tx/test_reward_lock.py similarity index 98% rename from tests/tx/test_reward_lock.py rename to hathor_tests/tx/test_reward_lock.py index bb9cb11a5..7ff261358 100644 --- a/tests/tx/test_reward_lock.py +++ b/hathor_tests/tx/test_reward_lock.py @@ -9,9 +9,9 @@ from hathor.transaction.exceptions import RewardLocked from hathor.transaction.scripts import P2PKH from hathor.wallet import Wallet -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder -from tests.utils import add_blocks_unlock_reward, get_genesis_key +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.utils import add_blocks_unlock_reward, get_genesis_key DEBUG: bool = False @@ -192,7 +192,7 @@ def test_mempool_tx_invalid_after_reorg(self) -> None: # assert that the tx has been removed from its dependencies' metadata for parent_id in tx.parents: parent = self.manager.tx_storage.get_transaction(parent_id) - assert tx.hash not in parent.get_metadata().children + assert tx.hash not in parent.get_children() for tx_input in tx.inputs: spent_tx = tx.get_spent_tx(tx_input) diff --git a/tests/tx/test_scripts.py b/hathor_tests/tx/test_scripts.py similarity index 99% rename from tests/tx/test_scripts.py rename to hathor_tests/tx/test_scripts.py index 89cbe5183..a72d8409a 100644 --- a/tests/tx/test_scripts.py +++ b/hathor_tests/tx/test_scripts.py @@ -51,8 +51,8 @@ ) from hathor.transaction.scripts.script_context import ScriptContext from hathor.wallet import HDWallet -from tests import unittest -from tests.utils import BURN_ADDRESS, get_genesis_key +from hathor_tests import unittest +from hathor_tests.utils import BURN_ADDRESS, get_genesis_key class TestScripts(unittest.TestCase): diff --git a/tests/tx/test_static_metadata.py b/hathor_tests/tx/test_static_metadata.py similarity index 100% rename from tests/tx/test_static_metadata.py rename to hathor_tests/tx/test_static_metadata.py diff --git a/tests/tx/test_stratum.py b/hathor_tests/tx/test_stratum.py similarity index 99% rename from tests/tx/test_stratum.py rename to hathor_tests/tx/test_stratum.py index 6c7060479..d1e8bf7a8 100644 --- a/tests/tx/test_stratum.py +++ b/hathor_tests/tx/test_stratum.py @@ -21,7 +21,7 @@ StratumFactory, ) from hathor.transaction.block import Block -from tests import unittest +from hathor_tests import unittest def _send_subscribe(protocol, id=None): diff --git a/tests/tx/test_timelock.py b/hathor_tests/tx/test_timelock.py similarity index 98% rename from tests/tx/test_timelock.py rename to hathor_tests/tx/test_timelock.py index cf829cf2a..82eca54c5 100644 --- a/tests/tx/test_timelock.py +++ b/hathor_tests/tx/test_timelock.py @@ -4,8 +4,8 @@ from hathor.transaction import Transaction from hathor.wallet.base_wallet import WalletBalance, WalletInputInfo, WalletOutputInfo from hathor.wallet.exceptions import InsufficientFunds -from tests import unittest -from tests.utils import add_blocks_unlock_reward +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward class TimelockTransactionTestCase(unittest.TestCase): diff --git a/tests/tx/test_tips.py b/hathor_tests/tx/test_tips.py similarity index 98% rename from tests/tx/test_tips.py rename to hathor_tests/tx/test_tips.py index 0c6e231eb..cd87723f6 100644 --- a/tests/tx/test_tips.py +++ b/hathor_tests/tx/test_tips.py @@ -1,7 +1,7 @@ from hathor.simulator.utils import add_new_block, add_new_blocks from hathor.transaction import Transaction -from tests import unittest -from tests.utils import add_blocks_unlock_reward, add_new_double_spending, add_new_transactions +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward, add_new_double_spending, add_new_transactions class TipsTestCase(unittest.TestCase): diff --git a/tests/tx/test_token_validation.py b/hathor_tests/tx/test_token_validation.py similarity index 100% rename from tests/tx/test_token_validation.py rename to hathor_tests/tx/test_token_validation.py diff --git a/tests/tx/test_tokens.py b/hathor_tests/tx/test_tokens.py similarity index 99% rename from tests/tx/test_tokens.py rename to hathor_tests/tx/test_tokens.py index cf8861a2b..1e25f478d 100644 --- a/tests/tx/test_tokens.py +++ b/hathor_tests/tx/test_tokens.py @@ -11,8 +11,8 @@ from hathor.transaction.token_creation_tx import TokenCreationTransaction from hathor.transaction.token_info import TokenVersion from hathor.transaction.util import get_deposit_token_deposit_amount, get_deposit_token_withdraw_amount, int_to_bytes -from tests import unittest -from tests.utils import add_blocks_unlock_reward, add_new_double_spending, create_tokens, get_genesis_key +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward, add_new_double_spending, create_tokens, get_genesis_key class TokenTest(unittest.TestCase): diff --git a/tests/tx/test_traversal.py b/hathor_tests/tx/test_traversal.py similarity index 97% rename from tests/tx/test_traversal.py rename to hathor_tests/tx/test_traversal.py index 0631f2ee7..6041082f2 100644 --- a/tests/tx/test_traversal.py +++ b/hathor_tests/tx/test_traversal.py @@ -2,8 +2,8 @@ from hathor.simulator.utils import add_new_blocks from hathor.transaction.storage.traversal import BFSOrderWalk, BFSTimestampWalk, DFSWalk -from tests import unittest -from tests.utils import add_blocks_unlock_reward, add_new_transactions, add_new_tx +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward, add_new_transactions, add_new_tx class BaseTraversalTestCase(unittest.TestCase): diff --git a/tests/tx/test_tx.py b/hathor_tests/tx/test_tx.py similarity index 99% rename from tests/tx/test_tx.py rename to hathor_tests/tx/test_tx.py index 438724d98..597907c58 100644 --- a/tests/tx/test_tx.py +++ b/hathor_tests/tx/test_tx.py @@ -37,8 +37,13 @@ from hathor.transaction.util import int_to_bytes from hathor.transaction.validation_state import ValidationState from hathor.wallet import Wallet -from tests import unittest -from tests.utils import add_blocks_unlock_reward, add_new_transactions, create_script_with_sigops, get_genesis_key +from hathor_tests import unittest +from hathor_tests.utils import ( + add_blocks_unlock_reward, + add_new_transactions, + create_script_with_sigops, + get_genesis_key, +) class TransactionTest(unittest.TestCase): @@ -204,20 +209,17 @@ def test_children_update(self): tx.get_metadata().validation = ValidationState.FULL # get info before update - children_len = [] + old_children_sets = [] for parent in tx.get_parents(): - metadata = parent.get_metadata() - children_len.append(len(metadata.children)) + old_children_sets.append(set(parent.get_children())) # update metadata tx.init_static_metadata_from_storage(self._settings, self.tx_storage) tx.update_initial_metadata() # genesis transactions should have only this tx in their children set - for old_len, parent in zip(children_len, tx.get_parents()): - metadata = parent.get_metadata() - self.assertEqual(len(metadata.children) - old_len, 1) - self.assertEqual(metadata.children.pop(), tx.hash) + for old_children, parent in zip(old_children_sets, tx.get_parents()): + self.assertEqual(set(parent.get_children()) - old_children, {tx.hash}) def test_block_inputs(self): # a block with inputs should be invalid diff --git a/tests/tx/test_tx_deserialization.py b/hathor_tests/tx/test_tx_deserialization.py similarity index 99% rename from tests/tx/test_tx_deserialization.py rename to hathor_tests/tx/test_tx_deserialization.py index 38f64f4ac..deb12e101 100644 --- a/tests/tx/test_tx_deserialization.py +++ b/hathor_tests/tx/test_tx_deserialization.py @@ -5,7 +5,7 @@ from hathor.transaction.token_creation_tx import TokenCreationTransaction from hathor.verification.verification_service import VerificationService from hathor.verification.vertex_verifiers import VertexVerifiers -from tests import unittest +from hathor_tests import unittest class _BaseTest: diff --git a/tests/tx/test_tx_serialization.py b/hathor_tests/tx/test_tx_serialization.py similarity index 97% rename from tests/tx/test_tx_serialization.py rename to hathor_tests/tx/test_tx_serialization.py index eebe37162..cd0725ede 100644 --- a/tests/tx/test_tx_serialization.py +++ b/hathor_tests/tx/test_tx_serialization.py @@ -2,8 +2,8 @@ from hathor.simulator.utils import add_new_blocks from hathor.transaction import Transaction from hathor.wallet.base_wallet import WalletOutputInfo -from tests import unittest -from tests.utils import add_blocks_unlock_reward +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward class BaseSerializationTest(unittest.TestCase): diff --git a/tests/tx/test_tx_storage.py b/hathor_tests/tx/test_tx_storage.py similarity index 98% rename from tests/tx/test_tx_storage.py rename to hathor_tests/tx/test_tx_storage.py index 84bd53948..d8be9853a 100644 --- a/tests/tx/test_tx_storage.py +++ b/hathor_tests/tx/test_tx_storage.py @@ -12,9 +12,9 @@ from hathor.transaction.scripts import P2PKH from hathor.transaction.storage.exceptions import TransactionDoesNotExist from hathor.transaction.validation_state import ValidationState -from tests import unittest -from tests.unittest import TestBuilder -from tests.utils import BURN_ADDRESS, add_blocks_unlock_reward, add_new_transactions, add_new_tx, create_tokens +from hathor_tests import unittest +from hathor_tests.unittest import TestBuilder +from hathor_tests.utils import BURN_ADDRESS, add_blocks_unlock_reward, add_new_transactions, add_new_tx, create_tokens class BaseTransactionStorageTest(unittest.TestCase): @@ -453,8 +453,6 @@ def test_save_metadata(self): metadata = tx.get_metadata() metadata.spent_outputs[1].append(self.genesis_blocks[0].hash) - random_tx = bytes.fromhex('0000222e64683b966b4268f387c269915cc61f6af5329823a93e3696cb0f2222') - metadata.children.append(random_tx) self.tx_storage.save_transaction(tx, only_metadata=True) tx2 = self.tx_storage.get_transaction(tx.hash) diff --git a/tests/tx/test_validation_states.py b/hathor_tests/tx/test_validation_states.py similarity index 100% rename from tests/tx/test_validation_states.py rename to hathor_tests/tx/test_validation_states.py diff --git a/tests/tx/test_verification.py b/hathor_tests/tx/test_verification.py similarity index 99% rename from tests/tx/test_verification.py rename to hathor_tests/tx/test_verification.py index 4dc173dbb..c0586d94d 100644 --- a/tests/tx/test_verification.py +++ b/hathor_tests/tx/test_verification.py @@ -26,8 +26,8 @@ from hathor.verification.token_creation_transaction_verifier import TokenCreationTransactionVerifier from hathor.verification.transaction_verifier import TransactionVerifier from hathor.verification.vertex_verifier import VertexVerifier -from tests import unittest -from tests.utils import add_blocks_unlock_reward, create_tokens, get_genesis_key +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward, create_tokens, get_genesis_key class VerificationTest(unittest.TestCase): diff --git a/tests/tx/test_verification_mempool.py b/hathor_tests/tx/test_verification_mempool.py similarity index 99% rename from tests/tx/test_verification_mempool.py rename to hathor_tests/tx/test_verification_mempool.py index 247a2104c..4089b3811 100644 --- a/tests/tx/test_verification_mempool.py +++ b/hathor_tests/tx/test_verification_mempool.py @@ -34,8 +34,8 @@ from hathor.verification.nano_header_verifier import MAX_SEQNUM_DIFF_MEMPOOL from hathor.verification.transaction_verifier import MAX_BETWEEN_CONFLICTS, MAX_WITHIN_CONFLICTS from hathor.verification.vertex_verifier import MAX_PAST_TIMESTAMP_ALLOWED -from tests import unittest -from tests.dag_builder.builder import TestDAGBuilder +from hathor_tests import unittest +from hathor_tests.dag_builder.builder import TestDAGBuilder class MyTestBlueprint(Blueprint): diff --git a/tests/unittest.py b/hathor_tests/unittest.py similarity index 99% rename from tests/unittest.py rename to hathor_tests/unittest.py index 53264ea10..54281aeba 100644 --- a/tests/unittest.py +++ b/hathor_tests/unittest.py @@ -34,8 +34,8 @@ from hathor.util import Random, initialize_hd_wallet, not_none from hathor.verification.verification_params import VerificationParams from hathor.wallet import BaseWallet, Wallet -from tests.test_memory_reactor_clock import TestMemoryReactorClock -from tests.utils import DEFAULT_WORDS +from hathor_tests.test_memory_reactor_clock import TestMemoryReactorClock +from hathor_tests.utils import DEFAULT_WORDS logger = get_logger() main = ut_main diff --git a/tests/utils.py b/hathor_tests/utils.py similarity index 99% rename from tests/utils.py rename to hathor_tests/utils.py index ed7cdd815..666298c87 100644 --- a/tests/utils.py +++ b/hathor_tests/utils.py @@ -361,7 +361,7 @@ def execute_mining( prefix: str = settings.API_VERSION_PREFIX ) -> None: """Execute a mining on a given server""" - from hathor.cli.mining import create_parser, execute + from hathor_cli.mining import create_parser, execute partial_url = '{}:{}/{}/'.format(host, port, prefix) url = urllib.parse.urljoin(partial_url, path) parser = create_parser() @@ -380,7 +380,7 @@ def execute_tx_gen( prefix: str = settings.API_VERSION_PREFIX ) -> None: """Execute a tx generator on a given server""" - from hathor.cli.tx_generator import create_parser, execute + from hathor_cli.tx_generator import create_parser, execute url = '{}:{}/{}/'.format(host, port, prefix) parser = create_parser() argv = [url, '--count', str(count)] @@ -755,7 +755,6 @@ class EventMocker: conflict_with=[], voided_by=[], received_by=[], - children=[], twins=[], accumulated_weight=10.0, score=20.0, diff --git a/tests/utils_modules/__init__.py b/hathor_tests/utils_modules/__init__.py similarity index 100% rename from tests/utils_modules/__init__.py rename to hathor_tests/utils_modules/__init__.py diff --git a/tests/utils_modules/fixtures/empty.yml b/hathor_tests/utils_modules/fixtures/empty.yml similarity index 100% rename from tests/utils_modules/fixtures/empty.yml rename to hathor_tests/utils_modules/fixtures/empty.yml diff --git a/tests/utils_modules/fixtures/empty_extends.yml b/hathor_tests/utils_modules/fixtures/empty_extends.yml similarity index 100% rename from tests/utils_modules/fixtures/empty_extends.yml rename to hathor_tests/utils_modules/fixtures/empty_extends.yml diff --git a/tests/utils_modules/fixtures/invalid_extends.yml b/hathor_tests/utils_modules/fixtures/invalid_extends.yml similarity index 100% rename from tests/utils_modules/fixtures/invalid_extends.yml rename to hathor_tests/utils_modules/fixtures/invalid_extends.yml diff --git a/tests/utils_modules/fixtures/mainnet_extends.yml b/hathor_tests/utils_modules/fixtures/mainnet_extends.yml similarity index 100% rename from tests/utils_modules/fixtures/mainnet_extends.yml rename to hathor_tests/utils_modules/fixtures/mainnet_extends.yml diff --git a/tests/utils_modules/fixtures/number.yml b/hathor_tests/utils_modules/fixtures/number.yml similarity index 100% rename from tests/utils_modules/fixtures/number.yml rename to hathor_tests/utils_modules/fixtures/number.yml diff --git a/tests/utils_modules/fixtures/self_extends.yml b/hathor_tests/utils_modules/fixtures/self_extends.yml similarity index 100% rename from tests/utils_modules/fixtures/self_extends.yml rename to hathor_tests/utils_modules/fixtures/self_extends.yml diff --git a/tests/utils_modules/fixtures/valid.yml b/hathor_tests/utils_modules/fixtures/valid.yml similarity index 100% rename from tests/utils_modules/fixtures/valid.yml rename to hathor_tests/utils_modules/fixtures/valid.yml diff --git a/tests/utils_modules/fixtures/valid_extends.yml b/hathor_tests/utils_modules/fixtures/valid_extends.yml similarity index 100% rename from tests/utils_modules/fixtures/valid_extends.yml rename to hathor_tests/utils_modules/fixtures/valid_extends.yml diff --git a/tests/utils_modules/test_named_tuple.py b/hathor_tests/utils_modules/test_named_tuple.py similarity index 100% rename from tests/utils_modules/test_named_tuple.py rename to hathor_tests/utils_modules/test_named_tuple.py diff --git a/tests/utils_modules/test_yaml.py b/hathor_tests/utils_modules/test_yaml.py similarity index 100% rename from tests/utils_modules/test_yaml.py rename to hathor_tests/utils_modules/test_yaml.py diff --git a/tests/verification/test_fee_header_verifier.py b/hathor_tests/verification/test_fee_header_verifier.py similarity index 99% rename from tests/verification/test_fee_header_verifier.py rename to hathor_tests/verification/test_fee_header_verifier.py index c4c53243e..bc0330309 100644 --- a/tests/verification/test_fee_header_verifier.py +++ b/hathor_tests/verification/test_fee_header_verifier.py @@ -5,7 +5,7 @@ from hathor.transaction.headers.fee_header import FeeHeader, FeeHeaderEntry from hathor.types import TokenUid from hathor.verification.fee_header_verifier import MAX_FEES_LEN, FeeHeaderVerifier -from tests import unittest +from hathor_tests import unittest class TestFeeHeaderVerifier(unittest.TestCase): diff --git a/tests/wallet/__init__.py b/hathor_tests/wallet/__init__.py similarity index 100% rename from tests/wallet/__init__.py rename to hathor_tests/wallet/__init__.py diff --git a/tests/wallet/test_balance_update.py b/hathor_tests/wallet/test_balance_update.py similarity index 99% rename from tests/wallet/test_balance_update.py rename to hathor_tests/wallet/test_balance_update.py index c7148546c..758285ba4 100644 --- a/tests/wallet/test_balance_update.py +++ b/hathor_tests/wallet/test_balance_update.py @@ -4,8 +4,8 @@ from hathor.transaction.scripts import P2PKH from hathor.wallet.base_wallet import SpentTx, UnspentTx, WalletBalance, WalletInputInfo, WalletOutputInfo from hathor.wallet.exceptions import PrivateKeyNotFound -from tests import unittest -from tests.utils import add_blocks_unlock_reward, create_tokens +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward, create_tokens class HathorSyncMethodsTestCase(unittest.TestCase): diff --git a/tests/wallet/test_index.py b/hathor_tests/wallet/test_index.py similarity index 95% rename from tests/wallet/test_index.py rename to hathor_tests/wallet/test_index.py index 803ae3129..65a11833b 100644 --- a/tests/wallet/test_index.py +++ b/hathor_tests/wallet/test_index.py @@ -2,8 +2,8 @@ from hathor.simulator.utils import add_new_blocks from hathor.transaction import Transaction from hathor.wallet.base_wallet import WalletOutputInfo -from tests import unittest -from tests.utils import add_blocks_unlock_reward +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward class WalletIndexTest(unittest.TestCase): diff --git a/tests/wallet/test_wallet.py b/hathor_tests/wallet/test_wallet.py similarity index 99% rename from tests/wallet/test_wallet.py rename to hathor_tests/wallet/test_wallet.py index 535904afc..626ec1e6f 100644 --- a/tests/wallet/test_wallet.py +++ b/hathor_tests/wallet/test_wallet.py @@ -11,8 +11,8 @@ from hathor.wallet.base_wallet import WalletBalance, WalletInputInfo, WalletOutputInfo from hathor.wallet.exceptions import InsufficientFunds, InvalidAddress, OutOfUnusedAddresses, WalletLocked from hathor.wallet.keypair import KeyPair -from tests import unittest -from tests.utils import add_blocks_unlock_reward, create_tokens, get_genesis_key +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward, create_tokens, get_genesis_key BLOCK_REWARD = 300 diff --git a/tests/wallet/test_wallet_hd.py b/hathor_tests/wallet/test_wallet_hd.py similarity index 98% rename from tests/wallet/test_wallet_hd.py rename to hathor_tests/wallet/test_wallet_hd.py index dae63f102..0b06205ed 100644 --- a/tests/wallet/test_wallet_hd.py +++ b/hathor_tests/wallet/test_wallet_hd.py @@ -4,8 +4,8 @@ from hathor.wallet import HDWallet from hathor.wallet.base_wallet import WalletBalance, WalletInputInfo, WalletOutputInfo from hathor.wallet.exceptions import InsufficientFunds -from tests import unittest -from tests.utils import add_blocks_unlock_reward +from hathor_tests import unittest +from hathor_tests.utils import add_blocks_unlock_reward class WalletHDTest(unittest.TestCase): diff --git a/tests/websocket/__init__.py b/hathor_tests/websocket/__init__.py similarity index 100% rename from tests/websocket/__init__.py rename to hathor_tests/websocket/__init__.py diff --git a/tests/websocket/test_async_iterators.py b/hathor_tests/websocket/test_async_iterators.py similarity index 97% rename from tests/websocket/test_async_iterators.py rename to hathor_tests/websocket/test_async_iterators.py index 0cab7af54..6d54afbfe 100644 --- a/tests/websocket/test_async_iterators.py +++ b/hathor_tests/websocket/test_async_iterators.py @@ -11,8 +11,8 @@ aiter_xpub_addresses, gap_limit_search, ) -from tests.unittest import TestCase -from tests.utils import GENESIS_ADDRESS_B58 +from hathor_tests.unittest import TestCase +from hathor_tests.utils import GENESIS_ADDRESS_B58 T = TypeVar('T') diff --git a/tests/websocket/test_streamer.py b/hathor_tests/websocket/test_streamer.py similarity index 97% rename from tests/websocket/test_streamer.py rename to hathor_tests/websocket/test_streamer.py index 9436c6215..c7cf09cbd 100644 --- a/tests/websocket/test_streamer.py +++ b/hathor_tests/websocket/test_streamer.py @@ -7,8 +7,8 @@ from hathor.websocket.factory import HathorAdminWebsocketFactory from hathor.websocket.iterators import AddressItem, ManualAddressSequencer, gap_limit_search from hathor.websocket.streamer import HistoryStreamer, StreamerState -from tests.unittest import TestCase -from tests.utils import GENESIS_ADDRESS_B58 +from hathor_tests.unittest import TestCase +from hathor_tests.utils import GENESIS_ADDRESS_B58 class AsyncIteratorsTestCase(TestCase): diff --git a/tests/websocket/test_wallet_events.py b/hathor_tests/websocket/test_wallet_events.py similarity index 97% rename from tests/websocket/test_wallet_events.py rename to hathor_tests/websocket/test_wallet_events.py index 0fbd350a1..41bf9f76f 100644 --- a/tests/websocket/test_wallet_events.py +++ b/hathor_tests/websocket/test_wallet_events.py @@ -19,8 +19,8 @@ from hathor.pubsub import HathorEvents from hathor.transaction import Block, Transaction from hathor.transaction.nc_execution_state import NCExecutionState -from tests.dag_builder.builder import TestDAGBuilder -from tests.nanocontracts.blueprints.unittest import BlueprintTestCase +from hathor_tests.dag_builder.builder import TestDAGBuilder +from hathor_tests.nanocontracts.blueprints.unittest import BlueprintTestCase class MyBlueprint(Blueprint): diff --git a/tests/websocket/test_websocket.py b/hathor_tests/websocket/test_websocket.py similarity index 99% rename from tests/websocket/test_websocket.py rename to hathor_tests/websocket/test_websocket.py index 9ee0e44a5..de564e507 100644 --- a/tests/websocket/test_websocket.py +++ b/hathor_tests/websocket/test_websocket.py @@ -9,7 +9,7 @@ from hathor.wallet.base_wallet import SpentTx, UnspentTx, WalletBalance from hathor.websocket import WebsocketStatsResource from hathor.websocket.factory import HathorAdminWebsocketFactory, HathorAdminWebsocketProtocol -from tests.resources.base_resource import StubSite, _BaseResourceTest +from hathor_tests.resources.base_resource import StubSite, _BaseResourceTest class WebsocketTest(_BaseResourceTest._ResourceTest): diff --git a/poetry.lock b/poetry.lock index 5ac42efdd..27d78cf64 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand. [[package]] name = "aiohappyeyeballs" @@ -727,14 +727,14 @@ test = ["coverage", "mock (>=4)", "pytest (>=7)", "pytest-cov", "pytest-mock (>= [[package]] name = "hathorlib" -version = "0.11.0" +version = "0.12.0" description = "Hathor Network base objects library" optional = false python-versions = "<4,>=3.9" groups = ["main"] files = [ - {file = "hathorlib-0.11.0-py3-none-any.whl", hash = "sha256:2ff1c62bf34daadb562b91079eed36c00d25da68e2350c95f3aedd4fe990a17c"}, - {file = "hathorlib-0.11.0.tar.gz", hash = "sha256:b276b52bb651d2c2e575bb2cbff9195dbfde26ef7b8e2bc4944f69900bc31b6a"}, + {file = "hathorlib-0.12.0-py3-none-any.whl", hash = "sha256:f9868399519eac5efdec2c93e2fa122fcc1cf6b74fcd1efac918573d690caaa5"}, + {file = "hathorlib-0.12.0.tar.gz", hash = "sha256:09828665d081c57218b74427bf85c559e79b29c93c998fce4a49a3fd83d6c7a3"}, ] [package.dependencies] @@ -1682,7 +1682,6 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -2557,4 +2556,4 @@ sentry = ["sentry-sdk", "structlog-sentry"] [metadata] lock-version = "2.1" python-versions = ">=3.11,<4" -content-hash = "11820c4aa99b3e99394bca09b415e867ad016c706c372a515aa031063db5998f" +content-hash = "50458e313bb3781eff00d88daaa4020c69a25737ef836785fde5a8087ef2fc85" diff --git a/pyproject.toml b/pyproject.toml index 5101e7ee0..2055668cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ [tool.poetry] name = "hathor" -version = "0.67.1" +version = "0.68.0" description = "Hathor Network full-node" authors = ["Hathor Team "] license = "Apache-2.0" @@ -29,10 +29,14 @@ classifiers = [ "License :: OSI Approved :: Apache Software License", "Private :: Do Not Upload", ] -exclude = ["tests", "tests.*"] +exclude = ["hathor_tests", "hathor_tests.*"] +packages = [ + { include = "hathor" }, + { include = "hathor_cli" }, +] [tool.poetry.scripts] -hathor-cli = 'hathor.cli.main:main' +hathor-cli = 'hathor_cli.main:main' [tool.poetry.group.dev.dependencies] flake8 = "~7.1.1" @@ -74,7 +78,7 @@ idna = "~3.4" setproctitle = "^1.3.3" sentry-sdk = {version = "^1.5.11", optional = true} structlog-sentry = {version = "^1.4.0", optional = true} -hathorlib = "^0.11.0" +hathorlib = "^0.12.0" pydantic = "~1.10.17" pyyaml = "^6.0.1" typing-extensions = "~4.12.2" @@ -87,7 +91,7 @@ sentry = ["sentry-sdk", "structlog-sentry"] combine_as_imports = true default_section = "THIRDPARTY" include_trailing_comma = true -known_first_party = "hathor,tests" +known_first_party = "hathor,hathor_tests" line_length = 119 multi_line_output = 3 @@ -142,16 +146,16 @@ module = [ "hathor.feature_activation.*", "hathor.event.*", "hathor.verification.*", - "tests.consensus.*", - "tests.crypto.*", - "tests.event.*", - "tests.execution_manager.*", - "tests.feature_activation.*", - "tests.p2p.*", - "tests.pubsub.*", - "tests.simulation.*", - "tests.unittest", - "tests.utils", + "hathor_tests.consensus.*", + "hathor_tests.crypto.*", + "hathor_tests.event.*", + "hathor_tests.execution_manager.*", + "hathor_tests.feature_activation.*", + "hathor_tests.p2p.*", + "hathor_tests.pubsub.*", + "hathor_tests.simulation.*", + "hathor_tests.unittest", + "hathor_tests.utils", ] strict_equality = true strict_concatenate = true @@ -170,12 +174,12 @@ warn_untyped_fields = true [tool.pytest.ini_options] minversion = "6.0" -testpaths = ["tests"] +testpaths = ["hathor_tests"] addopts = "-n auto" markers = [ "slow", ] -norecursedirs = ["tests/nanocontracts/test_blueprints"] +norecursedirs = ["hathor_tests/nanocontracts/test_blueprints"] [build-system] requires = ["poetry-core >= 1.3.2", "cython < 0.30"] diff --git a/setup.cfg b/setup.cfg index 42b90ba75..2de78a6b1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ branch = True omit = # Cli files have a different test coverage target - hathor/cli/* + hathor_cli/* # Subprocess storage will be revisited later hathor/transaction/storage/subprocess_storage.py diff --git a/slow_tests/test_simulator.py b/slow_tests/test_simulator.py index f5477ad59..7f6aeb134 100644 --- a/slow_tests/test_simulator.py +++ b/slow_tests/test_simulator.py @@ -5,9 +5,9 @@ from hathor.transaction import BaseTransaction from hathor.transaction.genesis import genesis_transactions from hathor.wallet import HDWallet -from tests import unittest -from tests.clock import HeapClock -from tests.utils import FakeConnection, MinerSimulator, RandomTransactionGenerator, Simulator +from hathor_tests import unittest +from hathor_tests.clock import HeapClock +from hathor_tests.utils import FakeConnection, MinerSimulator, RandomTransactionGenerator, Simulator class HathorSyncMethodsTestCase(unittest.TestCase): diff --git a/tests/event/test_event_manager.py b/tests/event/test_event_manager.py deleted file mode 100644 index b77c8cf62..000000000 --- a/tests/event/test_event_manager.py +++ /dev/null @@ -1,87 +0,0 @@ -from hathor.event.model.event_type import EventType -from hathor.event.storage import EventRocksDBStorage -from hathor.pubsub import HathorEvents -from hathor.util import not_none -from tests import unittest - - -class EventManagerTest(unittest.TestCase): - def setUp(self) -> None: - super().setUp() - self.network = 'testnet' - self.event_storage = EventRocksDBStorage( - rocksdb_storage=self.create_rocksdb_storage(), - ) - self.manager = self.create_peer( - self.network, - enable_event_queue=True, - event_storage=self.event_storage - ) - - def test_if_event_is_persisted(self) -> None: - block = self.manager.tx_storage.get_best_block() - self.manager.pubsub.publish(HathorEvents.NETWORK_NEW_TX_ACCEPTED, tx=block) - self.run_to_completion() - self.assertIsNotNone(self.event_storage.get_event(0)) - - def _fake_reorg_started(self) -> None: - block = self.manager.tx_storage.get_best_block() - # XXX: since we're faking these events, they don't neet to be consistent - self.manager.pubsub.publish(HathorEvents.REORG_STARTED, old_best_height=1, old_best_block=block, - new_best_height=1, new_best_block=block, reorg_size=1, common_block=block) - - def _fake_reorg_finished(self) -> None: - self.manager.pubsub.publish(HathorEvents.REORG_FINISHED) - - def test_event_group(self) -> None: - self._fake_reorg_started() - self._fake_reorg_finished() - self._fake_reorg_started() - self._fake_reorg_finished() - self.run_to_completion() - - event0 = not_none(self.event_storage.get_event(0)) - event1 = not_none(self.event_storage.get_event(1)) - event2 = not_none(self.event_storage.get_event(2)) - event3 = not_none(self.event_storage.get_event(3)) - event4 = not_none(self.event_storage.get_event(4)) - event5 = not_none(self.event_storage.get_event(5)) - event6 = not_none(self.event_storage.get_event(6)) - event7 = not_none(self.event_storage.get_event(7)) - event8 = not_none(self.event_storage.get_event(8)) - - self.assertEqual(EventType(event0.type), EventType.LOAD_STARTED) - self.assertEqual(EventType(event1.type), EventType.NEW_VERTEX_ACCEPTED) - self.assertEqual(EventType(event2.type), EventType.NEW_VERTEX_ACCEPTED) - self.assertEqual(EventType(event3.type), EventType.NEW_VERTEX_ACCEPTED) - self.assertEqual(EventType(event4.type), EventType.LOAD_FINISHED) - self.assertEqual(EventType(event5.type), EventType.REORG_STARTED) - - self.assertIsNotNone(event5.group_id) - self.assertEqual(EventType(event6.type), EventType.REORG_FINISHED) - self.assertIsNotNone(event6.group_id) - self.assertEqual(event5.group_id, event6.group_id) - - self.assertNotEqual(event6.group_id, event7.group_id) - self.assertIsNotNone(event7.group_id) - self.assertEqual(event7.group_id, event8.group_id) - - def test_cannot_start_group_twice(self) -> None: - self._fake_reorg_started() - self.run_to_completion() - with self.assertRaises(AssertionError): - self._fake_reorg_started() - self.run_to_completion() - - def test_cannot_finish_group_that_was_not_started(self) -> None: - with self.assertRaises(AssertionError): - self._fake_reorg_finished() - self.run_to_completion() - - def test_cannot_finish_group_twice(self) -> None: - self._fake_reorg_started() - self._fake_reorg_finished() - self.run_to_completion() - with self.assertRaises(AssertionError): - self._fake_reorg_finished() - self.run_to_completion()