Skip to content

Commit

Permalink
Do not check signer/validate address in dry run mode (#615)
Browse files Browse the repository at this point in the history
* Do not check signer in dry run mode
* Update contributors.csv
* Contributor: redref, Effort=1h
* Reviewer: vkresch, Effort=0.5h
  • Loading branch information
redref authored Sep 22, 2022
1 parent e09c3dd commit b9cc98d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions contributors.csv
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ sebuhbitcoin, tz1R664EP6wjcM1RSUVJ7nrJisTpBW9QyJzP, Documentation and testing an
ericlavoie, tz1ekt9uG1SdHQ6dc175uANbFPgbMM5iciGq, Core developer - helping out where I can
pea-io, tz1RVXV1KVPprRcgffz1DrsqKwnLG3ZT9NEw, Contributed to the Docker image
NeoktaLabs, tz1UvkANVPWppVgMkLnvN7BwYZsCP7vm6NVd, Contributed to testing of TRD
redref, tz3Vq38qYD3GEbWcXHMLt5PaASZrkDtEiA8D, Contributed to dry-run mode without signer
5 changes: 4 additions & 1 deletion src/config/yaml_baking_conf_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def __init__(
node_url,
block_api=None,
api_base_url=None,
dry_run=False,
) -> None:
super().__init__(yaml_text)
self.clnt_mngr = clnt_mngr
Expand All @@ -59,6 +60,7 @@ def __init__(
network_config, node_url, api_base_url=api_base_url
)
self.block_api = block_api
self.dry_run = dry_run

def parse(self):
yaml_conf_dict = super().parse()
Expand Down Expand Up @@ -191,7 +193,8 @@ def validate_payment_address(self, conf_obj):
)

if len(pymnt_addr) == PKH_LENGHT and pymnt_addr.startswith("tz"):
self.clnt_mngr.check_pkh_known_by_signer(pymnt_addr)
if not self.dry_run:
self.clnt_mngr.check_pkh_known_by_signer(pymnt_addr)

conf_obj[("__%s_type" % PAYMENT_ADDRESS)] = AddrType.TZ
conf_obj[("__%s_pkh" % PAYMENT_ADDRESS)] = pymnt_addr
Expand Down
1 change: 1 addition & 0 deletions src/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def onbakingaddress(input):
network_config,
args.node_endpoint,
api_base_url=args.api_base_url,
dry_run=args.dry_run,
)
parser.set(BAKING_ADDRESS, input)
fsm.go()
Expand Down
1 change: 1 addition & 0 deletions src/util/config_life_cycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def do_build_parser(self, e):
network_config=self.__nw_cfg,
node_url=self.args.node_endpoint,
api_base_url=self.args.api_base_url,
dry_run=self.args.dry_run,
)

def do_parse_cfg(self, e):
Expand Down

0 comments on commit b9cc98d

Please sign in to comment.