Solution to easy exercises: 00, 01, and 02 - #5
Open
0xlaga wants to merge 2 commits into
Open
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This pull request adds solutions for the first three functional test exercises from the workshop materials, including the initial sanity check (Exercise 00). Each script is implemented according to Bitcoin Core functional test conventions and workshop guidelines.
Details
0. Exercise 00: Hello World
File: test/functional/feature_hello_world.py
Runs a basic test tthat prints "Hello Brazil!!!"
1. Exercise 01: Basic Wallet RPC Flow
File: test/functional/wallet_rpc_basics.py
Uses two nodes and two wallets.
Mines blocks to fund one wallet, performs a transaction, checks mempool status, and verifies balances before and after confirmation.
Demonstrates correct use of wallet RPCs and balance assertions.
2. Exercise 02: Node Arguments + Debug Log with Prune Mode
File: feature_prune_debug_log.py
Tests node restart with and without prune mode.
Uses assert_debug_log() to verify presence/absence of prune-related log messages.
Confirms prune mode status via RPC before and after enabling.
Additional Changes
All new test scripts are added to the test runner for harness integration.
Code follows workshop hints and Bitcoin Core functional test conventions.
Testing
All scripts were executed via the functional test runner and verified for correctness.
Tests pass and provide clear log output for each step.Summary
This pull request adds solutions for the first three functional test exercises from the workshop materials, including the initial sanity check (Exercise 00). Each script is implemented according to Bitcoin Core functional test conventions and workshop guidelines.