Skip to content
Snippets Groups Projects
Commit 36be3773 authored by Xavier Perret's avatar Xavier Perret
Browse files

method to check presence of transaction in db

parent 039a0000
No related branches found
No related tags found
1 merge request!2added file to separate client function from the server
...@@ -284,3 +284,13 @@ func TestObjectStorage() { ...@@ -284,3 +284,13 @@ func TestObjectStorage() {
log.Fatalf("Failure: %+v", err) log.Fatalf("Failure: %+v", err)
} }
} }
func IsTransactionInDatabase(objectStorage Blob, trans Transaction) bool {
db := ReadDatabaseFromBlobStorage(objectStorage)
for _, t := range db {
if t.Id == trans.Id {
return true
}
}
return false
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment