💬 Add logs to mempool
This commit is contained in:
@@ -31,6 +31,7 @@ class MemPool {
|
||||
private func validateTransaction(_ transaction: Transaction) -> Bool {
|
||||
// Vérifications basiques
|
||||
if transaction.amount <= 0 {
|
||||
print("MemPool: Transaction refusée - montant invalide")
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -41,11 +42,18 @@ class MemPool {
|
||||
|
||||
// Vérifier la signature
|
||||
if !transaction.isSignatureValid() {
|
||||
print("MemPool: Transaction refusée - signature invalide")
|
||||
return false
|
||||
}
|
||||
|
||||
// Vérifier le solde
|
||||
return accountManager.canProcessTransaction(transaction)
|
||||
if !accountManager.canProcessTransaction(transaction) {
|
||||
print("MemPool: Transaction refusée - solde insuffisant")
|
||||
return false
|
||||
}
|
||||
|
||||
print("MemPool: Transaction validée avec succès")
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user