Skip to content

Commit 6e94474

Browse files
committed
Fixed
1 parent 4834f74 commit 6e94474

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/test/kotlin/org/example/AppTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ fun String.sha256(): String {
4444

4545
class Blockchain(private val difficulty: Int = 4) {
4646
val chain: MutableList<Block> = mutableListOf()
47-
val pendingTransactions: MutableList<Transaction> = mutableListOf()
47+
private val pendingTransactions: MutableList<Transaction> = mutableListOf()
4848
private val miningReward: Double = 50.0
4949

5050
init {
@@ -56,7 +56,7 @@ class Blockchain(private val difficulty: Int = 4) {
5656
return Block(0, "0", System.currentTimeMillis(), listOf(Transaction("0", "Genesis", 0.0)))
5757
}
5858

59-
fun getLatestBlock(): Block = chain.last()
59+
private fun getLatestBlock(): Block = chain.last()
6060

6161
fun addTransaction(transaction: Transaction) {
6262
// In a real blockchain, you would include validations (e.g., digital signatures, balance checks).

0 commit comments

Comments
 (0)