Skip to content
This repository was archived by the owner on Jan 19, 2024. It is now read-only.
Open
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: 8 additions & 0 deletions src/dune/dune.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,10 @@ def init_project(self, name, dir, cmake=True):

def create_snapshot(self):
ctx = self._context.get_ctx()
if ctx.http_port == '':
print('Could not find running node. Check you have bootstrapped DUNE and started a node.')
raise dune_error()

url = "http://"+ctx.http_port+"/v1/producer/create_snapshot"
stdout, stderr, ec = self._docker.execute_cmd(['curl', '-X', 'POST', url])
print(stdout)
Expand All @@ -356,6 +360,10 @@ def deploy_contract(self, dir, acnt):

def preactivate_feature(self):
ctx = self._context.get_ctx()
if ctx.http_port == '':
print('Could not find running node. Check you have bootstrapped DUNE and started a node.')
raise dune_error()

stdout, stderr, ec = self._docker.execute_cmd(['curl', '--noproxy', '-x', 'POST', ctx.http_port+'/v1/producer/schedule_protocol_feature_activations', '-d', '{"protocol_features_to_activate": ["0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd"]}'])

if ec != 0:
Expand Down