diff --git a/examples/src/main/kotlin/Kyoto.kt b/examples/src/main/kotlin/Kyoto.kt index c4b75af..edda3f5 100644 --- a/examples/src/main/kotlin/Kyoto.kt +++ b/examples/src/main/kotlin/Kyoto.kt @@ -8,8 +8,7 @@ import java.nio.file.Files import java.nio.file.Paths import org.slf4j.Logger import org.slf4j.LoggerFactory - - +import java.nio.file.Path fun main() { // Regtest environment must have Compact block filter enabled to run this @@ -19,9 +18,10 @@ fun main() { val ip: IpAddress = IpAddress.fromIpv4(127u, 0u, 0u, 1u) val peer: Peer = Peer(ip, 18444u, false) val peers: List = listOf(peer) - val currentPath = Paths.get("examples/data").toAbsolutePath().normalize() - println("Current path: $currentPath") - val persistenceFilePath = Files.createTempDirectory(currentPath, "kyoto-data_") + + val persistenceDir: Path = Paths.get("examples/data").toAbsolutePath().normalize() + Files.createDirectories(persistenceDir) + val persistenceFilePath: Path = Files.createTempDirectory(persistenceDir, "kyoto-data_") val wallet = getNewWallet(ActiveWalletScriptType.P2WPKH, Network.REGTEST) val address = wallet.revealNextAddress(KeychainKind.EXTERNAL) diff --git a/justfile b/justfile index 9360374..6eaa68e 100644 --- a/justfile +++ b/justfile @@ -37,7 +37,7 @@ submodule-to-master: && git pull origin master [group("Build")] -[doc("Build the library for given ARCH.")] +[doc("Build the library for given ARCH. Will use the committed version of the submodule.")] build ARCH="macos-aarch64": bash ./scripts/build-{{ARCH}}.sh @@ -56,6 +56,8 @@ clean: rm -rf ./bdk-ffi/bdk-ffi/target/ rm -rf ./build/ rm -rf ./lib/build/ + rm -rf ./examples/build/ + rm -rf ./examples/data/ [group("Test")] [doc("Run all tests, unless a specific test is provided.")]