-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuilder.py
More file actions
29 lines (24 loc) · 716 Bytes
/
builder.py
File metadata and controls
29 lines (24 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class Builder:
def __init__(self, parent_builder=None):
self.parent_builder = parent_builder
def build(self, callback=True, counter=0):
if callback and self.parent_builder is not None:
self.parent_builder.register(self)
return self.parent_builder
else:
return self.build_impl(counter)
def build_impl(self, counter):
raise NotImplementedError
def register(self, child_builder):
raise NotImplementedError
"""
SimulationBuilder(configpath, configname)
.beacon_node(4)
.debug(True)
.profile(True)
.validators(7)
.keydir(keydir)
.build()
.build()
.build()
"""