Skip to content

Commit

Permalink
fix: add --locked to cargo install to avoid issues with dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
joske committed Feb 2, 2024
1 parent 0765e54 commit 8babab8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ cd snarkOS

Lastly, install `snarkOS`:
```
cargo install --path .
cargo install --locked --path .
```

Please ensure ports `4133/tcp` and `3033/tcp` are open on your router and OS firewall.
Expand Down
2 changes: 1 addition & 1 deletion build_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ source $HOME/.cargo/env

# Install snarkOS
# cargo clean
cargo install --path .
cargo install --locked --path .

echo "=================================================="
echo " Attention - Please ensure ports 4133 and 3033"
Expand Down
6 changes: 3 additions & 3 deletions devnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ total_validators=${total_validators:-4}
read -p "Enter the total number of clients (default: 2): " total_clients
total_clients=${total_clients:-2}

# Ask the user if they want to run 'cargo install --path .' or use a pre-installed binary
read -p "Do you want to run 'cargo install --path .' to build the binary? (y/n, default: y): " build_binary
# Ask the user if they want to run 'cargo install --locked --path .' or use a pre-installed binary
read -p "Do you want to run 'cargo install --locked --path .' to build the binary? (y/n, default: y): " build_binary
build_binary=${build_binary:-y}

# Ask the user whether to clear the existing ledger history
Expand All @@ -18,7 +18,7 @@ clear_ledger=${clear_ledger:-n}

if [[ $build_binary == "y" ]]; then
# Build the binary using 'cargo install --path .'
cargo install --path . || exit 1
cargo install --locked --path . || exit 1
fi

# Clear the ledger logs for each validator if the user chooses to clear ledger
Expand Down
2 changes: 1 addition & 1 deletion node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ pub fn notification_message() -> String {
- If participating, BE PREPARED TO RESET YOUR NODE AT ANY TIME.
- When a reset occurs, RUN THE FOLLOWING TO RESET YOUR NODE:
- git checkout testnet3 && git pull
- cargo install --path .
- cargo install --locked --path .
- snarkos clean
- snarkos start --nodisplay --client
Expand Down

0 comments on commit 8babab8

Please sign in to comment.