Skip to content

Commit

Permalink
test: print satoshi amounts in all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderbiscuit committed Feb 3, 2025
1 parent 17a15cb commit 6b8b1b6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class LiveWalletTest {
for (tx in transactions) {
val sentAndReceived = wallet.sentAndReceived(tx.transaction)
println("Transaction: ${tx.transaction.computeTxid()}")
println("Sent ${sentAndReceived.sent}")
println("Received ${sentAndReceived.received}")
println("Sent ${sentAndReceived.sent.toSat()}")
println("Received ${sentAndReceived.received.toSat()}")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class LiveWalletTest {
for (tx in transactions) {
val sentAndReceived = wallet.sentAndReceived(tx.transaction)
println("Transaction: ${tx.transaction.computeTxid()}")
println("Sent ${sentAndReceived.sent}")
println("Received ${sentAndReceived.received}")
println("Sent ${sentAndReceived.sent.toSat()}")
println("Received ${sentAndReceived.received.toSat()}")
}
}

Expand Down Expand Up @@ -91,7 +91,7 @@ class LiveWalletTest {
println("Txid is: ${tx.computeTxid()}")

val txFee: Amount = wallet.calculateFee(tx)
println("Tx fee is: ${txFee}")
println("Tx fee is: ${txFee.toSat()}")

val feeRate: FeeRate = wallet.calculateFeeRate(tx)
println("Tx fee rate is: ${feeRate.toSatPerVbCeil()} sat/vB")
Expand Down
1 change: 1 addition & 0 deletions bdk-python/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ src/bdkpython/*.so
build/

testing-setup-py-simple-example.py
localenvironment/
2 changes: 1 addition & 1 deletion bdk-swift/Tests/BitcoinDevKitTests/LiveWalletTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ final class LiveWalletTests: XCTestCase {
let tx: Transaction = try! psbt.extractTx()
print(tx.computeTxid())
let fee: Amount = try wallet.calculateFee(tx: tx)
print("Transaction Fee: \(fee)")
print("Transaction Fee: \(fee.toSat())")
let feeRate: FeeRate = try wallet.calculateFeeRate(tx: tx)
print("Transaction Fee Rate: \(feeRate.toSatPerVbCeil()) sat/vB")

Expand Down

0 comments on commit 6b8b1b6

Please sign in to comment.