Skip to content

Conversation

@buffalu
Copy link
Contributor

@buffalu buffalu commented Nov 19, 2022

Fix:

  • starting at the last slot in the epoch, loop backwards until there's a block that returns a result and take a snapshot there.

if [ $exit_status -ne 0 ]; then
echo "solana-ledger-tool returned $exit_status"
exit $exit_status
echo "solana-ledger-tool returned $exit_status"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this check not get executed due to set -eux on line 9?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eg

#!/bin/bash

set -exu
function foo {
  rm aldskjdjkldlkjadskjldkjlskjlkjdlslkjda
  echo $?
}

foo

echo 'finished'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

➜  ~ bash demo.sh
+ foo
+ rm aldskjdjkldlkjadskjldkjlskjlkjdlslkjda
rm: cannot remove 'aldskjdjkldlkjadskjldkjlskjlkjdlslkjda': No such file or directory
➜  ~ echo $?
1

the echo finished never runs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah im not totally sure why it doesn't work, there's a comment above it.

segfaultdoc
segfaultdoc previously approved these changes Nov 19, 2022
@buffalu buffalu merged commit b9643ed into master Nov 20, 2022
@buffalu buffalu deleted the lb/fix_autosnapshot branch November 20, 2022 00:01
@buffalu buffalu restored the lb/fix_autosnapshot branch November 20, 2022 00:01
@buffalu buffalu deleted the lb/fix_autosnapshot branch November 20, 2022 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants