Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions examples/src/main/kotlin/Kyoto.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ fun main() {
val peer: Peer = Peer(ip, 18444u, false)
val peers: List<Peer> = listOf(peer)

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)

Expand All @@ -40,7 +36,6 @@ fun main() {
.peers(peers)
.connections(1u)
.scanType(ScanType.Sync)
.dataDir(persistenceFilePath.toString())
.build(wallet)
val client = lightClient.client
val node = lightClient.node
Expand Down
8 changes: 0 additions & 8 deletions lib/src/test/kotlin/org/bitcoindevkit/CbfSyncTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ package org.bitcoindevkit
import org.junit.jupiter.api.Nested
import org.kotlinbitcointools.regtesttoolbox.regenv.RegEnv
import kotlinx.coroutines.runBlocking
import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.Paths
import kotlin.test.Test

class CbfSyncTest {
Expand All @@ -28,18 +25,13 @@ class CbfSyncTest {
regtestEnv.send(newAddress.toString(), 0.12345678, 2.0)
regtestEnv.mine(2)

val persistenceDir: Path = Paths.get("src/test/data").toAbsolutePath().normalize()
Files.createDirectories(persistenceDir)
val persistenceFilePath: Path = Files.createTempDirectory(persistenceDir, "kyoto_data_")

val ip: IpAddress = IpAddress.fromIpv4(127u, 0u, 0u, 1u)
val peer1: Peer = Peer(ip, 18444u, false)
val peers: List<Peer> = listOf(peer1)
val (client, node) = CbfBuilder()
.peers(peers)
.connections(1u)
.scanType(ScanType.Sync)
.dataDir(persistenceFilePath.toString())
.build(wallet)

node.run()
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-linux-x86_64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ rustup target add $COMPILATION_TARGET
cargo build --locked --profile release-smaller --target $COMPILATION_TARGET

# Generate Kotlin bindings using uniffi-bindgen
cargo run --bin uniffi-bindgen generate --library ./$TARGET_DIR/$LIB_NAME --language kotlin --out-dir ../../lib/src/main/kotlin/ --no-format
cargo run --features uniffi-bindgen --bin uniffi-bindgen generate --library ./$TARGET_DIR/$LIB_NAME --language kotlin --out-dir ../../lib/src/main/kotlin/ --no-format

# Copy the binary to the resources directory
mkdir -p ../../lib/src/main/$RESOURCE_DIR/
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-macos-aarch64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ rustup target add $COMPILATION_TARGET
cargo build --locked --profile release-smaller --target $COMPILATION_TARGET

# Generate Kotlin bindings using uniffi-bindgen
cargo run --bin uniffi-bindgen generate --library ./$TARGET_DIR/$LIB_NAME --language kotlin --out-dir ../../lib/src/main/kotlin/ --no-format
cargo run --features uniffi-bindgen --bin uniffi-bindgen generate --library ./$TARGET_DIR/$LIB_NAME --language kotlin --out-dir ../../lib/src/main/kotlin/ --no-format

# Copy the binary to the resources directory
mkdir -p ../../lib/src/main/$RESOURCE_DIR/
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-macos-x86_64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ rustup target add $COMPILATION_TARGET
cargo build --locked --profile release-smaller --target $COMPILATION_TARGET

# Generate Kotlin bindings using uniffi-bindgen
cargo run --bin uniffi-bindgen generate --library ./$TARGET_DIR/$LIB_NAME --language kotlin --out-dir ../../lib/src/main/kotlin/ --no-format
cargo run --features uniffi-bindgen --bin uniffi-bindgen generate --library ./$TARGET_DIR/$LIB_NAME --language kotlin --out-dir ../../lib/src/main/kotlin/ --no-format

# Copy the binary to the resources directory
mkdir -p ../../lib/src/main/$RESOURCE_DIR/
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-windows-x86_64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ rustup target add $COMPILATION_TARGET
cargo build --locked --profile release-smaller --target $COMPILATION_TARGET

# Generate Kotlin bindings using uniffi-bindgen
cargo run --bin uniffi-bindgen generate --library ./$TARGET_DIR/$LIB_NAME --language kotlin --out-dir ../../lib/src/main/kotlin/ --no-format
cargo run --features uniffi-bindgen --bin uniffi-bindgen generate --library ./$TARGET_DIR/$LIB_NAME --language kotlin --out-dir ../../lib/src/main/kotlin/ --no-format

# Copy the binary to the resources directory
mkdir -p ../../lib/src/main/$RESOURCE_DIR/
Expand Down