-
Notifications
You must be signed in to change notification settings - Fork 9
refactor: spv cleanup #126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a8c0697
refactor: spv clean up
QuantumExplorer c8dbac7
more work
QuantumExplorer 3e3bb60
clean up
QuantumExplorer ff6c2e3
fixes
QuantumExplorer 0165ab2
more clean up
QuantumExplorer 1a1b413
updated docs.
QuantumExplorer 39a7b6b
small fixes
QuantumExplorer 164b8a0
Merge branch 'v0.40-dev' into refactor/spvCleanup
QuantumExplorer 84057e7
more work
QuantumExplorer b3437f5
fixes
QuantumExplorer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,134 @@ | ||
| name: Verify FFI Documentation | ||
|
|
||
| on: | ||
| push: | ||
| paths: | ||
| - 'key-wallet-ffi/src/**/*.rs' | ||
| - 'key-wallet-ffi/FFI_API.md' | ||
| - 'key-wallet-ffi/scripts/generate_ffi_docs.py' | ||
| - 'dash-spv-ffi/src/**/*.rs' | ||
| - 'dash-spv-ffi/FFI_API.md' | ||
| - 'dash-spv-ffi/scripts/generate_ffi_docs.py' | ||
| - '.github/workflows/verify-ffi-docs.yml' | ||
| pull_request: | ||
| paths: | ||
| - 'key-wallet-ffi/src/**/*.rs' | ||
| - 'key-wallet-ffi/FFI_API.md' | ||
| - 'key-wallet-ffi/scripts/generate_ffi_docs.py' | ||
| - 'dash-spv-ffi/src/**/*.rs' | ||
| - 'dash-spv-ffi/FFI_API.md' | ||
| - 'dash-spv-ffi/scripts/generate_ffi_docs.py' | ||
| - '.github/workflows/verify-ffi-docs.yml' | ||
|
|
||
| jobs: | ||
| verify-key-wallet-docs: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.10' | ||
|
|
||
| - name: Generate key-wallet-ffi documentation | ||
| run: | | ||
| cd key-wallet-ffi | ||
| python3 scripts/generate_ffi_docs.py | ||
|
|
||
| - name: Check if key-wallet-ffi documentation is up to date | ||
| run: | | ||
| cd key-wallet-ffi | ||
| if ! git diff --exit-code FFI_API.md; then | ||
| echo "❌ key-wallet-ffi documentation is out of date!" | ||
| echo "" | ||
| echo "The FFI_API.md file needs to be regenerated." | ||
| echo "Please run the following command and commit the changes:" | ||
| echo "" | ||
| echo " cd key-wallet-ffi && make update-docs" | ||
| echo "" | ||
| echo "Changes detected:" | ||
| git diff FFI_API.md | ||
| exit 1 | ||
| else | ||
| echo "✅ key-wallet-ffi documentation is up to date" | ||
| fi | ||
|
|
||
| verify-dash-spv-docs: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.10' | ||
|
|
||
| - name: Generate dash-spv-ffi documentation | ||
| run: | | ||
| cd dash-spv-ffi | ||
| python3 scripts/generate_ffi_docs.py | ||
|
|
||
| - name: Check if dash-spv-ffi documentation is up to date | ||
| run: | | ||
| cd dash-spv-ffi | ||
| if ! git diff --exit-code FFI_API.md; then | ||
| echo "❌ dash-spv-ffi documentation is out of date!" | ||
| echo "" | ||
| echo "The FFI_API.md file needs to be regenerated." | ||
| echo "Please run the following command and commit the changes:" | ||
| echo "" | ||
| echo " cd dash-spv-ffi && make update-docs" | ||
| echo "" | ||
| echo "Changes detected:" | ||
| git diff FFI_API.md | ||
| exit 1 | ||
| else | ||
| echo "✅ dash-spv-ffi documentation is up to date" | ||
| fi | ||
|
|
||
| update-docs-comment: | ||
| runs-on: ubuntu-latest | ||
| if: failure() && github.event_name == 'pull_request' | ||
| needs: [verify-key-wallet-docs, verify-dash-spv-docs] | ||
|
|
||
| permissions: | ||
| pull-requests: write | ||
|
|
||
| steps: | ||
| - name: Comment on PR | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| github.rest.issues.createComment({ | ||
| issue_number: context.issue.number, | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| body: `## ⚠️ FFI Documentation Update Required | ||
|
|
||
| The FFI API documentation is out of date. Please regenerate it by running: | ||
|
|
||
| For key-wallet-ffi: | ||
| \`\`\`bash | ||
| cd key-wallet-ffi | ||
| make update-docs | ||
| \`\`\` | ||
|
|
||
| For dash-spv-ffi: | ||
| \`\`\`bash | ||
| cd dash-spv-ffi | ||
| make update-docs | ||
| \`\`\` | ||
|
|
||
| Then commit the changes: | ||
| \`\`\`bash | ||
| git add */FFI_API.md | ||
| git commit -m "docs: update FFI API documentation" | ||
| \`\`\` | ||
|
|
||
| This ensures the documentation stays in sync with the actual FFI functions.` | ||
| }) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,3 +45,4 @@ cobertura.xml | |
|
|
||
| # Build scripts artifacts | ||
| *.log | ||
| /dash-spv-ffi/peer_reputation.json | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.