From fa23bddeae13300eff0c5a7853e287d6ad9d1bc9 Mon Sep 17 00:00:00 2001 From: Danut Ilisei Date: Fri, 18 Oct 2024 11:24:15 +0300 Subject: [PATCH] fix: remove validator fee from same-blockchain bids --- docker-compose.yml | 8 ++++---- pantos/servicenode/business/plugins.py | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 367861b..4e6e42a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -67,10 +67,10 @@ services: target: /opt/pantos/pantos-service-node/alembic.ini - action: sync+restart path: service-node-config.env - target: /root/service-node-config.env + target: /etc/pantos/service-node-config.env - action: sync+restart path: bids.yml - target: /etc/service-node-bids.yml + target: /etc/pantos/service-node-bids.yml - action: rebuild path: Dockerfile - action: rebuild @@ -141,10 +141,10 @@ services: target: /opt/pantos/pantos-service-node/alembic.ini - action: sync+restart path: service-node-config.env - target: /root/service-node-config.env + target: /etc/pantos/service-node-config.env - action: sync+restart path: bids.yml - target: /etc/service-node-bids.yml + target: /etc/pantos/service-node-bids.yml - action: rebuild path: Dockerfile - action: rebuild diff --git a/pantos/servicenode/business/plugins.py b/pantos/servicenode/business/plugins.py index 9f9545a..5960a78 100644 --- a/pantos/servicenode/business/plugins.py +++ b/pantos/servicenode/business/plugins.py @@ -69,8 +69,9 @@ def replace_bids(self, source_blockchain: Blockchain) -> int: bids, delay = bid_plugin.get_bids(source_blockchain.value, destination_blockchain.value, **bids_arguments) - self.__add_validator_fee(bids, source_blockchain_factor, - destination_blockchain_factor) + if source_blockchain is not destination_blockchain: + self.__add_validator_fee(bids, source_blockchain_factor, + destination_blockchain_factor) _logger.debug(f'Saving {len(bids)} bids in database') bids = [dataclasses.asdict(bid) for bid in bids] replace_bids(source_blockchain.value,