Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove validator fee from same-blockchain bids #124

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions pantos/servicenode/business/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down