mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Protocol refactoring. Each bundle now consists of a signed header and zero or more signed batches. There is no overall signature on the bundle, since the bundle's contents may need to be processed before the entire bundle has been read. The protocol does not prevent an adversary from removing batches from a bundle, reordering batches, moving them from one bundle to another, etc. However, since each batch is signed and acknowledged independently, no such guarantees are required. Bundle IDs will go away when the retransmission mechanism is changed.
This commit is contained in:
@@ -10,6 +10,7 @@ import net.sf.briar.api.db.DbException;
|
||||
import net.sf.briar.api.db.Status;
|
||||
import net.sf.briar.api.protocol.AuthorId;
|
||||
import net.sf.briar.api.protocol.BatchBuilder;
|
||||
import net.sf.briar.api.protocol.HeaderBuilder;
|
||||
import net.sf.briar.api.protocol.Message;
|
||||
import net.sf.briar.api.protocol.MessageId;
|
||||
|
||||
@@ -27,6 +28,7 @@ DatabaseCleaner.Callback {
|
||||
|
||||
protected final Database<Txn> db;
|
||||
protected final DatabaseCleaner cleaner;
|
||||
protected final Provider<HeaderBuilder> headerBuilderProvider;
|
||||
protected final Provider<BatchBuilder> batchBuilderProvider;
|
||||
|
||||
private final Object spaceLock = new Object();
|
||||
@@ -36,9 +38,11 @@ DatabaseCleaner.Callback {
|
||||
private volatile boolean writesAllowed = true;
|
||||
|
||||
DatabaseComponentImpl(Database<Txn> db, DatabaseCleaner cleaner,
|
||||
Provider<HeaderBuilder> headerBuilderProvider,
|
||||
Provider<BatchBuilder> batchBuilderProvider) {
|
||||
this.db = db;
|
||||
this.cleaner = cleaner;
|
||||
this.headerBuilderProvider = headerBuilderProvider;
|
||||
this.batchBuilderProvider = batchBuilderProvider;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user